From 4041364ae8c0fd9f25563363d25e5bcaefaef394 Mon Sep 17 00:00:00 2001 From: Jason Song Date: Sun, 7 Jun 2026 10:32:14 +0800 Subject: [PATCH] chore: refocus repository on openapi contract --- .github/workflows/ci_general.yml | 8 + .gitignore | 3 + CHANGELOG.md | 3 + README.md | 20 +- clean.sh | 14 +- generate.sh | 298 +- java-client/.github/workflows/maven.yml | 30 - java-client/.gitignore | 21 - java-client/.openapi-generator-ignore | 23 - java-client/.openapi-generator/FILES | 197 - java-client/.openapi-generator/VERSION | 1 - java-client/.travis.yml | 22 - java-client/README.md | 340 - java-client/api/openapi.yaml | 8711 ---------------- java-client/build.gradle | 168 - java-client/build.sbt | 28 - java-client/docs/AccessKeyManagementApi.md | 380 - java-client/docs/AppManagementApi.md | 795 -- java-client/docs/AppNamespaceManagementApi.md | 514 - java-client/docs/ClusterManagementApi.md | 236 - java-client/docs/EnvironmentManagementApi.md | 73 - java-client/docs/ExceptionResponse.md | 13 - java-client/docs/InstanceManagementApi.md | 315 - java-client/docs/ItemManagementApi.md | 1133 --- .../docs/NamespaceBranchManagementApi.md | 570 -- .../docs/NamespaceGrayDelReleaseDTO.md | 15 - .../docs/NamespaceLockManagementApi.md | 83 - java-client/docs/NamespaceManagementApi.md | 686 -- java-client/docs/NamespaceReleaseDTO.md | 14 - java-client/docs/OpenAccessKeyDTO.md | 20 - java-client/docs/OpenAppDTO.md | 23 - java-client/docs/OpenAppNamespaceDTO.md | 22 - java-client/docs/OpenAppRoleUserDTO.md | 11 - java-client/docs/OpenClusterDTO.md | 21 - .../docs/OpenClusterNamespaceRoleUserDTO.md | 14 - java-client/docs/OpenCreateAppDTO.md | 13 - java-client/docs/OpenCreateNamespaceDTO.md | 14 - java-client/docs/OpenEnvClusterDTO.md | 11 - java-client/docs/OpenEnvClusterInfo.md | 13 - .../docs/OpenEnvNamespaceRoleUserDTO.md | 14 - java-client/docs/OpenGrayReleaseRuleDTO.md | 21 - .../docs/OpenGrayReleaseRuleItemDTO.md | 13 - java-client/docs/OpenInstanceConfigDTO.md | 12 - java-client/docs/OpenInstanceDTO.md | 16 - java-client/docs/OpenInstancePageDTO.md | 14 - java-client/docs/OpenItemDTO.md | 22 - java-client/docs/OpenItemDiffDTO.md | 15 - java-client/docs/OpenItemExtendDTO.md | 16 - java-client/docs/OpenItemPageDTO.md | 14 - java-client/docs/OpenMissEnvDTO.md | 11 - java-client/docs/OpenNamespaceDTO.md | 24 - java-client/docs/OpenNamespaceExtendDTO.md | 12 - java-client/docs/OpenNamespaceIdentifier.md | 13 - java-client/docs/OpenNamespaceLockDTO.md | 14 - java-client/docs/OpenNamespaceRoleUserDTO.md | 13 - java-client/docs/OpenNamespaceSyncDTO.md | 11 - java-client/docs/OpenNamespaceTextModel.md | 17 - java-client/docs/OpenNamespaceUsageDTO.md | 17 - java-client/docs/OpenOrganizationDto.md | 11 - .../docs/OpenPermissionConditionDTO.md | 10 - java-client/docs/OpenReleaseChangeDTO.md | 13 - java-client/docs/OpenReleaseDTO.md | 23 - java-client/docs/OpenReleaseDiffDTO.md | 10 - java-client/docs/OpenUserDTO.md | 14 - java-client/docs/OpenUserInfoDTO.md | 13 - java-client/docs/OrganizationManagementApi.md | 74 - java-client/docs/PermissionManagementApi.md | 1933 ---- java-client/docs/PortalManagementApi.md | 2611 ----- java-client/docs/ReleaseManagementApi.md | 631 -- java-client/docs/UserManagementApi.md | 374 - java-client/git_push.sh | 57 - java-client/gradle.properties | 6 - java-client/gradle/wrapper/gradle-wrapper.jar | Bin 59536 -> 0 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 - java-client/gradlew | 234 - java-client/gradlew.bat | 89 - java-client/pom.xml | 353 - java-client/settings.gradle | 1 - java-client/src/main/AndroidManifest.xml | 3 - .../org/openapitools/client/ApiCallback.java | 61 - .../org/openapitools/client/ApiClient.java | 1548 --- .../org/openapitools/client/ApiException.java | 165 - .../org/openapitools/client/ApiResponse.java | 75 - .../openapitools/client/Configuration.java | 40 - .../client/GzipRequestInterceptor.java | 84 - .../java/org/openapitools/client/JSON.java | 438 - .../java/org/openapitools/client/Pair.java | 56 - .../client/ProgressRequestBody.java | 72 - .../client/ProgressResponseBody.java | 69 - .../client/ServerConfiguration.java | 58 - .../openapitools/client/ServerVariable.java | 23 - .../org/openapitools/client/StringUtil.java | 82 - .../client/api/AccessKeyManagementApi.java | 795 -- .../client/api/AppManagementApi.java | 1521 --- .../client/api/AppNamespaceManagementApi.java | 1032 -- .../client/api/ClusterManagementApi.java | 533 - .../client/api/EnvironmentManagementApi.java | 187 - .../client/api/InstanceManagementApi.java | 762 -- .../client/api/ItemManagementApi.java | 2521 ----- .../api/NamespaceBranchManagementApi.java | 1298 --- .../api/NamespaceLockManagementApi.java | 228 - .../client/api/NamespaceManagementApi.java | 1423 --- .../client/api/OrganizationManagementApi.java | 193 - .../client/api/PermissionManagementApi.java | 3840 ------- .../client/api/PortalManagementApi.java | 4945 --------- .../client/api/ReleaseManagementApi.java | 1382 --- .../client/api/UserManagementApi.java | 834 -- .../openapitools/client/auth/ApiKeyAuth.java | 79 - .../client/auth/Authentication.java | 35 - .../client/auth/HttpBasicAuth.java | 56 - .../client/auth/HttpBearerAuth.java | 62 - .../client/model/AbstractOpenApiSchema.java | 148 - .../client/model/ExceptionResponse.java | 294 - .../model/NamespaceGrayDelReleaseDTO.java | 338 - .../client/model/NamespaceReleaseDTO.java | 296 - .../client/model/OpenAccessKeyDTO.java | 507 - .../openapitools/client/model/OpenAppDTO.java | 578 -- .../client/model/OpenAppNamespaceDTO.java | 541 - .../client/model/OpenAppRoleUserDTO.java | 259 - .../client/model/OpenClusterDTO.java | 510 - .../OpenClusterNamespaceRoleUserDTO.java | 371 - .../client/model/OpenCreateAppDTO.java | 278 - .../client/model/OpenCreateNamespaceDTO.java | 299 - .../client/model/OpenEnvClusterDTO.java | 248 - .../client/model/OpenEnvClusterInfo.java | 318 - .../model/OpenEnvNamespaceRoleUserDTO.java | 371 - .../client/model/OpenGrayReleaseRuleDTO.java | 538 - .../model/OpenGrayReleaseRuleItemDTO.java | 288 - .../client/model/OpenInstanceConfigDTO.java | 270 - .../client/model/OpenInstanceDTO.java | 411 - .../client/model/OpenInstancePageDTO.java | 312 - .../client/model/OpenItemDTO.java | 543 - .../client/model/OpenItemDiffDTO.java | 420 - .../client/model/OpenItemExtendDTO.java | 349 - .../client/model/OpenItemPageDTO.java | 312 - .../client/model/OpenMissEnvDTO.java | 234 - .../client/model/OpenNamespaceDTO.java | 630 -- .../client/model/OpenNamespaceExtendDTO.java | 262 - .../client/model/OpenNamespaceIdentifier.java | 299 - .../client/model/OpenNamespaceLockDTO.java | 293 - .../model/OpenNamespaceRoleUserDTO.java | 340 - .../client/model/OpenNamespaceSyncDTO.java | 279 - .../client/model/OpenNamespaceTextModel.java | 420 - .../client/model/OpenNamespaceUsageDTO.java | 383 - .../client/model/OpenOrganizationDto.java | 237 - .../model/OpenPermissionConditionDTO.java | 203 - .../client/model/OpenReleaseChangeDTO.java | 299 - .../client/model/OpenReleaseDTO.java | 582 -- .../client/model/OpenReleaseDiffDTO.java | 228 - .../client/model/OpenUserDTO.java | 327 - .../client/model/OpenUserInfoDTO.java | 296 - .../api/AccessKeyManagementApiTest.java | 116 - .../client/api/AppManagementApiTest.java | 197 - .../api/AppNamespaceManagementApiTest.java | 143 - .../client/api/ClusterManagementApiTest.java | 83 - .../api/EnvironmentManagementApiTest.java | 45 - .../client/api/InstanceManagementApiTest.java | 102 - .../client/api/ItemManagementApiTest.java | 302 - .../api/NamespaceBranchManagementApiTest.java | 171 - .../api/NamespaceLockManagementApiTest.java | 50 - .../api/NamespaceManagementApiTest.java | 187 - .../api/OrganizationManagementApiTest.java | 47 - .../api/PermissionManagementApiTest.java | 463 - .../client/api/PortalManagementApiTest.java | 588 -- .../client/api/ReleaseManagementApiTest.java | 180 - .../client/api/UserManagementApiTest.java | 110 - .../client/model/ExceptionResponseTest.java | 72 - .../model/NamespaceGrayDelReleaseDTOTest.java | 81 - .../client/model/NamespaceReleaseDTOTest.java | 71 - .../client/model/OpenAccessKeyDTOTest.java | 127 - .../client/model/OpenAppDTOTest.java | 143 - .../client/model/OpenAppNamespaceDTOTest.java | 135 - .../client/model/OpenAppRoleUserDTOTest.java | 58 - .../client/model/OpenClusterDTOTest.java | 127 - .../OpenClusterNamespaceRoleUserDTOTest.java | 82 - .../client/model/OpenCreateAppDTOTest.java | 66 - .../model/OpenCreateNamespaceDTOTest.java | 71 - .../client/model/OpenEnvClusterDTOTest.java | 57 - .../client/model/OpenEnvClusterInfoTest.java | 74 - .../OpenEnvNamespaceRoleUserDTOTest.java | 82 - .../model/OpenGrayReleaseRuleDTOTest.java | 130 - .../model/OpenGrayReleaseRuleItemDTOTest.java | 65 - .../model/OpenInstanceConfigDTOTest.java | 64 - .../client/model/OpenInstanceDTOTest.java | 98 - .../client/model/OpenInstancePageDTOTest.java | 74 - .../client/model/OpenItemDTOTest.java | 136 - .../client/model/OpenItemDiffDTOTest.java | 91 - .../client/model/OpenItemExtendDTOTest.java | 87 - .../client/model/OpenItemPageDTOTest.java | 74 - .../client/model/OpenMissEnvDTOTest.java | 55 - .../client/model/OpenNamespaceDTOTest.java | 155 - .../model/OpenNamespaceExtendDTOTest.java | 63 - .../model/OpenNamespaceIdentifierTest.java | 71 - .../model/OpenNamespaceLockDTOTest.java | 71 - .../model/OpenNamespaceRoleUserDTOTest.java | 74 - .../model/OpenNamespaceSyncDTOTest.java | 59 - .../model/OpenNamespaceTextModelTest.java | 103 - .../model/OpenNamespaceUsageDTOTest.java | 95 - .../client/model/OpenOrganizationDtoTest.java | 55 - .../model/OpenPermissionConditionDTOTest.java | 47 - .../model/OpenReleaseChangeDTOTest.java | 71 - .../client/model/OpenReleaseDTOTest.java | 145 - .../client/model/OpenReleaseDiffDTOTest.java | 50 - .../client/model/OpenUserDTOTest.java | 79 - .../client/model/OpenUserInfoDTOTest.java | 71 - openapitools.json | 2 +- python/.gitignore | 67 - python/.gitlab-ci.yml | 24 - python/.openapi-generator-ignore | 23 - python/.openapi-generator/FILES | 216 - python/.openapi-generator/VERSION | 1 - python/.travis.yml | 13 - python/README.md | 428 - python/apollo_openapi/__init__.py | 27 - python/apollo_openapi/api_client.py | 1498 --- python/apollo_openapi/apis/__init__.py | 3 - python/apollo_openapi/apis/path_to_api.py | 335 - python/apollo_openapi/apis/paths/__init__.py | 3 - .../paths/openapi_v1_apollo_audit_logs.py | 7 - ..._audit_logs_by_name_or_type_or_operator.py | 7 - ...apollo_audit_logs_data_influences_field.py | 7 - .../openapi_v1_apollo_audit_logs_op_name.py | 7 - .../openapi_v1_apollo_audit_properties.py | 7 - .../paths/openapi_v1_apollo_audit_trace.py | 7 - .../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 - ...p_id_appnamespaces_namespace_name_usage.py | 7 - ...openapi_v1_apps_app_id_env_cluster_info.py | 7 - .../openapi_v1_apps_app_id_envclusters.py | 7 - ...napi_v1_apps_app_id_envs_env_accesskeys.py | 9 - ...pp_id_envs_env_accesskeys_access_key_id.py | 7 - ...env_accesskeys_access_key_id_activation.py | 7 - ...v_accesskeys_access_key_id_deactivation.py | 7 - ...d_envs_env_clusters_cluster_name_export.py | 9 - ...d_envs_env_clusters_cluster_name_import.py | 7 - ...lusters_cluster_name_missing_namespaces.py | 9 - ..._cluster_name_namespaces_namespace_name.py | 7 - ..._name_namespaces_namespace_name_commits.py | 7 - ..._namespaces_namespace_name_items_export.py | 7 - ..._namespaces_namespace_name_items_import.py | 7 - ...paces_namespace_name_releases_histories.py | 7 - ...er_name_namespaces_namespace_name_usage.py | 7 - ...cluster_name_namespaces_permission_init.py | 7 - ..._namespaces_permissions_permission_type.py | 7 - ...ters_cluster_name_namespaces_role_users.py | 7 - ...v_clusters_cluster_name_roles_role_type.py | 9 - ...espace_name_permissions_permission_type.py | 7 - ...nv_namespaces_namespace_name_role_users.py | 7 - ...mespaces_namespace_name_roles_role_type.py | 9 - .../paths/openapi_v1_apps_app_id_miss_envs.py | 7 - ...mespaces_namespace_name_permission_init.py | 7 - ...espace_name_permissions_permission_type.py | 7 - ...id_namespaces_namespace_name_role_users.py | 7 - ...mespaces_namespace_name_roles_role_type.py | 9 - ..._apps_app_id_namespaces_releases_status.py | 7 - ...apps_app_id_permissions_permission_type.py | 7 - .../openapi_v1_apps_app_id_role_users.py | 7 - .../openapi_v1_apps_app_id_roles_master.py | 9 - .../openapi_v1_apps_app_id_roles_role_type.py | 9 - .../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 - ...openapi_v1_apps_search_by_appid_or_name.py | 7 - .../apis/paths/openapi_v1_configs_export.py | 7 - .../apis/paths/openapi_v1_configs_import.py | 7 - .../openapi_v1_consumer_tokens_by_app_id.py | 7 - .../apis/paths/openapi_v1_consumers.py | 9 - .../paths/openapi_v1_consumers_by_app_id.py | 7 - .../openapi_v1_consumers_token_assign_role.py | 7 - .../apis/paths/openapi_v1_envs.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 - ...espace_name_associated_public_namespace.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 - ...er_name_namespaces_namespace_name_items.py | 11 - ...me_namespaces_namespace_name_items_diff.py | 7 - ...ame_namespaces_namespace_name_items_key.py | 11 - ...espaces_namespace_name_items_revocation.py | 7 - ...spaces_namespace_name_items_synchronize.py | 7 - ...espaces_namespace_name_items_validation.py | 7 - ...ter_name_namespaces_namespace_name_lock.py | 7 - ...name_namespaces_namespace_name_releases.py | 7 - ...mespaces_namespace_name_releases_active.py | 7 - ...mespaces_namespace_name_releases_latest.py | 7 - ...napi_v1_envs_env_instances_by_namespace.py | 7 - ...tances_by_namespace_and_releases_not_in.py | 7 - ...penapi_v1_envs_env_instances_by_release.py | 7 - ...openapi_v1_envs_env_releases_comparison.py | 7 - ...openapi_v1_envs_env_releases_release_id.py | 7 - ...1_envs_env_releases_release_id_rollback.py | 7 - .../apis/paths/openapi_v1_favorites.py | 9 - .../paths/openapi_v1_favorites_favorite_id.py | 9 - ...global_search_item_info_by_key_or_value.py | 7 - .../apis/paths/openapi_v1_import.py | 7 - .../apis/paths/openapi_v1_namespaces.py | 7 - .../apis/paths/openapi_v1_organizations.py | 7 - .../apis/paths/openapi_v1_page_settings.py | 7 - .../apis/paths/openapi_v1_permissions_root.py | 7 - ...api_v1_server_envs_env_config_db_config.py | 9 - ...vs_env_config_db_config_find_all_config.py | 7 - .../openapi_v1_server_portal_db_config.py | 9 - ...server_portal_db_config_find_all_config.py | 7 - .../apis/paths/openapi_v1_system_info.py | 7 - .../paths/openapi_v1_system_info_health.py | 7 - ...penapi_v1_system_role_manage_app_master.py | 7 - ...napi_v1_system_roles_create_application.py | 11 - ...tem_roles_create_application_role_users.py | 7 - .../apis/paths/openapi_v1_user.py | 7 - .../apis/paths/openapi_v1_users.py | 9 - .../apis/paths/openapi_v1_users_enabled.py | 7 - .../apis/paths/openapi_v1_users_user_id.py | 7 - python/apollo_openapi/apis/tag_to_api.py | 59 - python/apollo_openapi/apis/tags/__init__.py | 23 - .../apis/tags/access_key_management_api.py | 30 - .../apis/tags/app_management_api.py | 42 - .../apis/tags/app_namespace_management_api.py | 34 - .../apis/tags/cluster_management_api.py | 26 - .../apis/tags/environment_management_api.py | 22 - .../apis/tags/instance_management_api.py | 28 - .../apis/tags/item_management_api.py | 48 - .../tags/namespace_branch_management_api.py | 34 - .../tags/namespace_lock_management_api.py | 22 - .../apis/tags/namespace_management_api.py | 38 - .../apis/tags/organization_management_api.py | 22 - .../apis/tags/permission_management_api.py | 72 - .../apis/tags/portal_management_api.py | 92 - .../apis/tags/release_management_api.py | 36 - .../apis/tags/user_management_api.py | 30 - python/apollo_openapi/configuration.py | 469 - python/apollo_openapi/exceptions.py | 146 - python/apollo_openapi/model/__init__.py | 5 - .../model/exception_response.py | 107 - .../model/exception_response.pyi | 107 - python/apollo_openapi/model/map_string.py | 56 - python/apollo_openapi/model/map_string.pyi | 56 - .../model/namespace_gray_del_release_dto.py | 141 - .../model/namespace_gray_del_release_dto.pyi | 141 - .../model/namespace_release_dto.py | 109 - .../model/namespace_release_dto.pyi | 109 - .../model/open_access_key_dto.py | 177 - .../model/open_access_key_dto.pyi | 177 - python/apollo_openapi/model/open_app_dto.py | 199 - python/apollo_openapi/model/open_app_dto.pyi | 199 - .../model/open_app_namespace_dto.py | 189 - .../model/open_app_namespace_dto.pyi | 189 - .../model/open_app_role_user_dto.py | 114 - .../model/open_app_role_user_dto.pyi | 114 - .../apollo_openapi/model/open_cluster_dto.py | 179 - .../apollo_openapi/model/open_cluster_dto.pyi | 179 - .../open_cluster_namespace_role_user_dto.py | 169 - .../open_cluster_namespace_role_user_dto.pyi | 169 - .../model/open_create_app_dto.py | 127 - .../model/open_create_app_dto.pyi | 126 - .../model/open_create_namespace_dto.py | 109 - .../model/open_create_namespace_dto.pyi | 109 - .../model/open_env_cluster_dto.py | 109 - .../model/open_env_cluster_dto.pyi | 109 - .../model/open_env_cluster_info.py | 134 - .../model/open_env_cluster_info.pyi | 134 - .../model/open_env_namespace_role_user_dto.py | 169 - .../open_env_namespace_role_user_dto.pyi | 169 - .../model/open_gray_release_rule_dto.py | 207 - .../model/open_gray_release_rule_dto.pyi | 206 - .../model/open_gray_release_rule_item_dto.py | 145 - .../model/open_gray_release_rule_item_dto.pyi | 143 - .../model/open_instance_config_dto.py | 102 - .../model/open_instance_config_dto.pyi | 102 - .../apollo_openapi/model/open_instance_dto.py | 164 - .../model/open_instance_dto.pyi | 164 - .../model/open_instance_page_dto.py | 136 - .../model/open_instance_page_dto.pyi | 136 - .../model/open_item_diff_dto.py | 208 - .../model/open_item_diff_dto.pyi | 208 - python/apollo_openapi/model/open_item_dto.py | 194 - python/apollo_openapi/model/open_item_dto.pyi | 194 - .../model/open_item_extend_dto.py | 129 - .../model/open_item_extend_dto.pyi | 129 - .../model/open_item_page_dto.py | 136 - .../model/open_item_page_dto.pyi | 136 - .../apollo_openapi/model/open_miss_env_dto.py | 87 - .../model/open_miss_env_dto.pyi | 87 - .../model/open_namespace_dto.py | 240 - .../model/open_namespace_dto.pyi | 240 - .../model/open_namespace_extend_dto.py | 97 - .../model/open_namespace_extend_dto.pyi | 97 - .../model/open_namespace_identifier.py | 107 - .../model/open_namespace_identifier.pyi | 107 - .../model/open_namespace_lock_dto.py | 109 - .../model/open_namespace_lock_dto.pyi | 109 - .../model/open_namespace_role_user_dto.py | 159 - .../model/open_namespace_role_user_dto.pyi | 159 - .../model/open_namespace_sync_dto.py | 140 - .../model/open_namespace_sync_dto.pyi | 140 - .../model/open_namespace_text_model.py | 147 - .../model/open_namespace_text_model.pyi | 147 - .../model/open_namespace_usage_dto.py | 139 - .../model/open_namespace_usage_dto.pyi | 139 - .../model/open_organization_dto.py | 87 - .../model/open_organization_dto.pyi | 87 - .../model/open_permission_condition_dto.py | 77 - .../model/open_permission_condition_dto.pyi | 77 - .../model/open_release_change_dto.py | 107 - .../model/open_release_change_dto.pyi | 107 - .../model/open_release_diff_dto.py | 104 - .../model/open_release_diff_dto.pyi | 104 - .../apollo_openapi/model/open_release_dto.py | 204 - .../apollo_openapi/model/open_release_dto.pyi | 204 - python/apollo_openapi/model/open_user_dto.py | 117 - python/apollo_openapi/model/open_user_dto.pyi | 117 - .../model/open_user_info_dto.py | 107 - .../model/open_user_info_dto.pyi | 107 - .../model/string_to_string_bool_map.py | 84 - .../model/string_to_string_bool_map.pyi | 84 - python/apollo_openapi/models/__init__.py | 54 - python/apollo_openapi/paths/__init__.py | 115 - .../openapi_v1_apollo_audit_logs/__init__.py | 7 - .../paths/openapi_v1_apollo_audit_logs/get.py | 324 - .../openapi_v1_apollo_audit_logs/get.pyi | 316 - .../__init__.py | 7 - .../get.py | 334 - .../get.pyi | 326 - .../__init__.py | 7 - .../get.py | 354 - .../get.pyi | 346 - .../__init__.py | 7 - .../get.py | 352 - .../get.pyi | 344 - .../__init__.py | 7 - .../openapi_v1_apollo_audit_properties/get.py | 239 - .../get.pyi | 231 - .../openapi_v1_apollo_audit_trace/__init__.py | 7 - .../openapi_v1_apollo_audit_trace/get.py | 316 - .../openapi_v1_apollo_audit_trace/get.pyi | 308 - .../openapi_v1_appnamespaces/__init__.py | 7 - .../paths/openapi_v1_appnamespaces/get.py | 266 - .../paths/openapi_v1_appnamespaces/get.pyi | 258 - .../paths/openapi_v1_apps/__init__.py | 7 - .../paths/openapi_v1_apps/get.py | 341 - .../paths/openapi_v1_apps/get.pyi | 332 - .../paths/openapi_v1_apps/post.py | 369 - .../paths/openapi_v1_apps/post.pyi | 359 - .../paths/openapi_v1_apps_app_id/__init__.py | 7 - .../paths/openapi_v1_apps_app_id/delete.py | 382 - .../paths/openapi_v1_apps_app_id/delete.pyi | 372 - .../paths/openapi_v1_apps_app_id/get.py | 316 - .../paths/openapi_v1_apps_app_id/get.pyi | 307 - .../paths/openapi_v1_apps_app_id/put.py | 483 - .../paths/openapi_v1_apps_app_id/put.pyi | 473 - .../__init__.py | 7 - .../get.py | 320 - .../get.pyi | 312 - .../post.py | 490 - .../post.pyi | 480 - .../__init__.py | 7 - .../delete.py | 325 - .../delete.pyi | 317 - .../get.py | 358 - .../get.pyi | 350 - .../__init__.py | 7 - .../get.py | 329 - .../get.pyi | 321 - .../__init__.py | 7 - .../get.py | 320 - .../get.pyi | 312 - .../__init__.py | 7 - .../openapi_v1_apps_app_id_envclusters/get.py | 341 - .../get.pyi | 332 - .../__init__.py | 7 - .../get.py | 329 - .../get.pyi | 321 - .../post.py | 358 - .../post.pyi | 350 - .../__init__.py | 7 - .../delete.py | 334 - .../delete.pyi | 326 - .../__init__.py | 7 - .../put.py | 343 - .../put.pyi | 335 - .../__init__.py | 7 - .../put.py | 334 - .../put.pyi | 326 - .../__init__.py | 7 - .../get.py | 311 - .../get.pyi | 303 - .../head.py | 280 - .../head.pyi | 272 - .../__init__.py | 7 - .../post.py | 481 - .../post.pyi | 473 - .../__init__.py | 7 - .../get.py | 333 - .../get.pyi | 325 - .../post.py | 334 - .../post.pyi | 326 - .../__init__.py | 7 - .../delete.py | 343 - .../delete.pyi | 335 - .../__init__.py | 7 - .../get.py | 414 - .../get.pyi | 406 - .../__init__.py | 7 - .../get.py | 320 - .../get.pyi | 312 - .../__init__.py | 7 - .../post.py | 433 - .../post.pyi | 425 - .../__init__.py | 7 - .../get.py | 405 - .../get.pyi | 397 - .../__init__.py | 7 - .../get.py | 347 - .../get.pyi | 339 - .../__init__.py | 7 - .../post.py | 334 - .../post.pyi | 326 - .../__init__.py | 7 - .../get.py | 377 - .../get.pyi | 369 - .../__init__.py | 7 - .../get.py | 313 - .../get.pyi | 305 - .../__init__.py | 7 - .../delete.py | 353 - .../delete.pyi | 345 - .../post.py | 353 - .../post.pyi | 345 - .../__init__.py | 7 - .../get.py | 377 - .../get.pyi | 369 - .../__init__.py | 7 - .../get.py | 313 - .../get.pyi | 305 - .../__init__.py | 7 - .../delete.py | 353 - .../delete.pyi | 345 - .../post.py | 353 - .../post.pyi | 345 - .../__init__.py | 7 - .../openapi_v1_apps_app_id_miss_envs/get.py | 341 - .../openapi_v1_apps_app_id_miss_envs/get.pyi | 332 - .../__init__.py | 7 - .../post.py | 325 - .../post.pyi | 317 - .../__init__.py | 7 - .../get.py | 368 - .../get.pyi | 360 - .../__init__.py | 7 - .../get.py | 304 - .../get.pyi | 296 - .../__init__.py | 7 - .../delete.py | 344 - .../delete.pyi | 336 - .../post.py | 344 - .../post.pyi | 336 - .../__init__.py | 7 - .../get.py | 295 - .../get.pyi | 287 - .../__init__.py | 7 - .../get.py | 359 - .../get.pyi | 351 - .../__init__.py | 7 - .../openapi_v1_apps_app_id_role_users/get.py | 295 - .../openapi_v1_apps_app_id_role_users/get.pyi | 287 - .../__init__.py | 7 - .../delete.py | 326 - .../delete.pyi | 318 - .../post.py | 326 - .../post.pyi | 318 - .../__init__.py | 7 - .../delete.py | 335 - .../delete.pyi | 327 - .../post.py | 433 - .../post.pyi | 425 - .../openapi_v1_apps_authorized/__init__.py | 7 - .../paths/openapi_v1_apps_authorized/get.py | 287 - .../paths/openapi_v1_apps_authorized/get.pyi | 278 - .../paths/openapi_v1_apps_by_self/__init__.py | 7 - .../paths/openapi_v1_apps_by_self/get.py | 368 - .../paths/openapi_v1_apps_by_self/get.pyi | 353 - .../openapi_v1_apps_envs_env/__init__.py | 7 - .../paths/openapi_v1_apps_envs_env/post.py | 483 - .../paths/openapi_v1_apps_envs_env/post.pyi | 473 - .../__init__.py | 7 - .../get.py | 311 - .../get.pyi | 303 - .../openapi_v1_configs_export/__init__.py | 7 - .../paths/openapi_v1_configs_export/get.py | 294 - .../paths/openapi_v1_configs_export/get.pyi | 286 - .../openapi_v1_configs_import/__init__.py | 7 - .../paths/openapi_v1_configs_import/post.py | 416 - .../paths/openapi_v1_configs_import/post.pyi | 408 - .../__init__.py | 7 - .../get.py | 294 - .../get.pyi | 286 - .../paths/openapi_v1_consumers/__init__.py | 7 - .../paths/openapi_v1_consumers/get.py | 324 - .../paths/openapi_v1_consumers/get.pyi | 316 - .../paths/openapi_v1_consumers/post.py | 390 - .../paths/openapi_v1_consumers/post.pyi | 382 - .../__init__.py | 7 - .../openapi_v1_consumers_by_app_id/delete.py | 263 - .../openapi_v1_consumers_by_app_id/delete.pyi | 255 - .../__init__.py | 7 - .../post.py | 479 - .../post.pyi | 471 - .../paths/openapi_v1_envs/__init__.py | 7 - .../paths/openapi_v1_envs/get.py | 261 - .../paths/openapi_v1_envs/get.pyi | 253 - .../__init__.py | 7 - .../get.py | 394 - .../get.pyi | 386 - .../__init__.py | 7 - .../post.py | 442 - .../post.pyi | 432 - .../__init__.py | 7 - .../delete.py | 420 - .../delete.pyi | 409 - .../get.py | 334 - .../get.pyi | 325 - .../__init__.py | 7 - .../get.py | 402 - .../get.pyi | 394 - .../__init__.py | 7 - .../get.py | 386 - .../get.pyi | 378 - .../__init__.py | 7 - .../get.py | 376 - .../get.pyi | 368 - .../__init__.py | 7 - .../get.py | 397 - .../get.pyi | 388 - .../post.py | 376 - .../post.pyi | 368 - .../__init__.py | 7 - .../delete.py | 352 - .../delete.pyi | 344 - .../post.py | 496 - .../post.pyi | 488 - .../__init__.py | 7 - .../post.py | 486 - .../post.pyi | 478 - .../__init__.py | 7 - .../get.py | 377 - .../get.pyi | 368 - .../__init__.py | 7 - .../post.py | 528 - .../post.pyi | 518 - .../__init__.py | 7 - .../post.py | 486 - .../post.pyi | 478 - .../__init__.py | 7 - .../get.py | 331 - .../get.pyi | 323 - .../put.py | 455 - .../put.pyi | 447 - .../__init__.py | 7 - .../delete.py | 353 - .../delete.pyi | 345 - .../get.py | 352 - .../get.pyi | 343 - .../put.py | 549 - .../put.pyi | 538 - .../__init__.py | 7 - .../get.py | 320 - .../get.pyi | 312 - .../__init__.py | 7 - .../get.py | 424 - .../get.pyi | 409 - .../post.py | 517 - .../post.pyi | 507 - .../put.py | 490 - .../put.pyi | 481 - .../__init__.py | 7 - .../post.py | 445 - .../post.pyi | 437 - .../__init__.py | 7 - .../delete.py | 352 - .../delete.pyi | 344 - .../get.py | 352 - .../get.pyi | 343 - .../put.py | 549 - .../put.pyi | 538 - .../__init__.py | 7 - .../post.py | 409 - .../post.pyi | 399 - .../__init__.py | 7 - .../post.py | 510 - .../post.pyi | 500 - .../__init__.py | 7 - .../post.py | 433 - .../post.pyi | 424 - .../__init__.py | 7 - .../get.py | 322 - .../get.pyi | 314 - .../__init__.py | 7 - .../post.py | 518 - .../post.pyi | 508 - .../__init__.py | 7 - .../get.py | 412 - .../get.pyi | 404 - .../__init__.py | 7 - .../get.py | 343 - .../get.pyi | 334 - .../__init__.py | 7 - .../get.py | 415 - .../get.pyi | 401 - .../__init__.py | 7 - .../get.py | 405 - .../get.pyi | 397 - .../__init__.py | 7 - .../get.py | 370 - .../get.pyi | 362 - .../__init__.py | 7 - .../get.py | 360 - .../get.pyi | 352 - .../__init__.py | 7 - .../get.py | 304 - .../get.pyi | 296 - .../__init__.py | 7 - .../put.py | 334 - .../put.pyi | 326 - .../paths/openapi_v1_favorites/__init__.py | 7 - .../paths/openapi_v1_favorites/get.py | 342 - .../paths/openapi_v1_favorites/get.pyi | 334 - .../paths/openapi_v1_favorites/post.py | 333 - .../paths/openapi_v1_favorites/post.pyi | 325 - .../__init__.py | 7 - .../delete.py | 262 - .../delete.pyi | 254 - .../openapi_v1_favorites_favorite_id/put.py | 262 - .../openapi_v1_favorites_favorite_id/put.pyi | 254 - .../__init__.py | 7 - .../get.py | 302 - .../get.pyi | 294 - .../paths/openapi_v1_import/__init__.py | 7 - .../paths/openapi_v1_import/post.py | 416 - .../paths/openapi_v1_import/post.pyi | 408 - .../paths/openapi_v1_namespaces/__init__.py | 7 - .../paths/openapi_v1_namespaces/post.py | 387 - .../paths/openapi_v1_namespaces/post.pyi | 379 - .../openapi_v1_organizations/__init__.py | 7 - .../paths/openapi_v1_organizations/get.py | 287 - .../paths/openapi_v1_organizations/get.pyi | 278 - .../openapi_v1_page_settings/__init__.py | 7 - .../paths/openapi_v1_page_settings/get.py | 239 - .../paths/openapi_v1_page_settings/get.pyi | 231 - .../openapi_v1_permissions_root/__init__.py | 7 - .../paths/openapi_v1_permissions_root/get.py | 296 - .../paths/openapi_v1_permissions_root/get.pyi | 288 - .../__init__.py | 7 - .../delete.py | 327 - .../delete.pyi | 319 - .../post.py | 390 - .../post.pyi | 382 - .../__init__.py | 7 - .../get.py | 315 - .../get.pyi | 307 - .../__init__.py | 7 - .../delete.py | 263 - .../delete.pyi | 255 - .../post.py | 333 - .../post.pyi | 325 - .../__init__.py | 7 - .../get.py | 261 - .../get.pyi | 253 - .../paths/openapi_v1_system_info/__init__.py | 7 - .../paths/openapi_v1_system_info/get.py | 239 - .../paths/openapi_v1_system_info/get.pyi | 231 - .../openapi_v1_system_info_health/__init__.py | 7 - .../openapi_v1_system_info_health/get.py | 294 - .../openapi_v1_system_info_health/get.pyi | 286 - .../__init__.py | 7 - .../get.py | 267 - .../get.pyi | 259 - .../__init__.py | 7 - .../delete.py | 272 - .../delete.pyi | 264 - .../get.py | 322 - .../get.pyi | 314 - .../post.py | 379 - .../post.pyi | 371 - .../__init__.py | 7 - .../get.py | 261 - .../get.pyi | 253 - .../paths/openapi_v1_user/__init__.py | 7 - .../paths/openapi_v1_user/get.py | 282 - .../paths/openapi_v1_user/get.pyi | 272 - .../paths/openapi_v1_users/__init__.py | 7 - .../paths/openapi_v1_users/get.py | 405 - .../paths/openapi_v1_users/get.pyi | 389 - .../paths/openapi_v1_users/post.py | 435 - .../paths/openapi_v1_users/post.pyi | 425 - .../openapi_v1_users_enabled/__init__.py | 7 - .../paths/openapi_v1_users_enabled/put.py | 426 - .../paths/openapi_v1_users_enabled/put.pyi | 416 - .../openapi_v1_users_user_id/__init__.py | 7 - .../paths/openapi_v1_users_user_id/get.py | 356 - .../paths/openapi_v1_users_user_id/get.pyi | 345 - python/apollo_openapi/rest.py | 256 - python/apollo_openapi/schemas.py | 2474 ----- .../docs/apis/tags/AccessKeyManagementApi.md | 710 -- python/docs/apis/tags/AppManagementApi.md | 1518 --- .../apis/tags/AppNamespaceManagementApi.md | 946 -- python/docs/apis/tags/ClusterManagementApi.md | 495 - .../apis/tags/EnvironmentManagementApi.md | 87 - .../docs/apis/tags/InstanceManagementApi.md | 611 -- python/docs/apis/tags/ItemManagementApi.md | 2753 ----- .../apis/tags/NamespaceBranchManagementApi.md | 1302 --- .../apis/tags/NamespaceLockManagementApi.md | 135 - .../docs/apis/tags/NamespaceManagementApi.md | 1326 --- .../apis/tags/OrganizationManagementApi.md | 105 - .../docs/apis/tags/PermissionManagementApi.md | 3412 ------- python/docs/apis/tags/PortalManagementApi.md | 4378 -------- python/docs/apis/tags/ReleaseManagementApi.md | 1328 --- python/docs/apis/tags/UserManagementApi.md | 763 -- python/docs/models/ExceptionResponse.md | 17 - python/docs/models/MapString.md | 13 - .../docs/models/NamespaceGrayDelReleaseDTO.md | 34 - python/docs/models/NamespaceReleaseDTO.md | 19 - python/docs/models/OpenAccessKeyDTO.md | 24 - python/docs/models/OpenAppDTO.md | 28 - python/docs/models/OpenAppNamespaceDTO.md | 27 - python/docs/models/OpenAppRoleUserDTO.md | 27 - python/docs/models/OpenClusterDTO.md | 26 - .../models/OpenClusterNamespaceRoleUserDTO.md | 42 - python/docs/models/OpenCreateAppDTO.md | 32 - python/docs/models/OpenCreateNamespaceDTO.md | 19 - python/docs/models/OpenEnvClusterDTO.md | 29 - python/docs/models/OpenEnvClusterInfo.md | 31 - .../models/OpenEnvNamespaceRoleUserDTO.md | 42 - python/docs/models/OpenGrayReleaseRuleDTO.md | 40 - .../docs/models/OpenGrayReleaseRuleItemDTO.md | 46 - python/docs/models/OpenInstanceConfigDTO.md | 16 - python/docs/models/OpenInstanceDTO.md | 34 - python/docs/models/OpenInstancePageDTO.md | 33 - python/docs/models/OpenItemDTO.md | 27 - python/docs/models/OpenItemDiffDTO.md | 55 - python/docs/models/OpenItemExtendDTO.md | 21 - python/docs/models/OpenItemPageDTO.md | 33 - python/docs/models/OpenMissEnvDTO.md | 15 - python/docs/models/OpenNamespaceDTO.md | 43 - python/docs/models/OpenNamespaceExtendDTO.md | 16 - python/docs/models/OpenNamespaceIdentifier.md | 17 - python/docs/models/OpenNamespaceLockDTO.md | 19 - .../docs/models/OpenNamespaceRoleUserDTO.md | 41 - python/docs/models/OpenNamespaceSyncDTO.md | 43 - python/docs/models/OpenNamespaceTextModel.md | 21 - python/docs/models/OpenNamespaceUsageDTO.md | 22 - python/docs/models/OpenOrganizationDto.md | 15 - .../docs/models/OpenPermissionConditionDTO.md | 14 - python/docs/models/OpenReleaseChangeDTO.md | 17 - python/docs/models/OpenReleaseDTO.md | 28 - python/docs/models/OpenReleaseDiffDTO.md | 28 - python/docs/models/OpenUserDTO.md | 18 - python/docs/models/OpenUserInfoDTO.md | 17 - python/docs/models/StringToStringBoolMap.md | 25 - python/git_push.sh | 57 - python/requirements.txt | 6 - python/setup.cfg | 2 - python/setup.py | 46 - python/test-requirements.txt | 3 - python/test/__init__.py | 1 - python/test/test_models/__init__.py | 1 - .../test_models/test_exception_response.py | 24 - python/test/test_models/test_map_string.py | 24 - .../test_namespace_gray_del_release_dto.py | 24 - .../test_models/test_namespace_release_dto.py | 24 - .../test_models/test_open_access_key_dto.py | 24 - python/test/test_models/test_open_app_dto.py | 24 - .../test_open_app_namespace_dto.py | 24 - .../test_open_app_role_user_dto.py | 24 - .../test/test_models/test_open_cluster_dto.py | 24 - ...st_open_cluster_namespace_role_user_dto.py | 24 - .../test_models/test_open_create_app_dto.py | 24 - .../test_open_create_namespace_dto.py | 24 - .../test_models/test_open_env_cluster_dto.py | 24 - .../test_models/test_open_env_cluster_info.py | 24 - .../test_open_env_namespace_role_user_dto.py | 24 - .../test_open_gray_release_rule_dto.py | 24 - .../test_open_gray_release_rule_item_dto.py | 24 - .../test_open_instance_config_dto.py | 24 - .../test_models/test_open_instance_dto.py | 24 - .../test_open_instance_page_dto.py | 24 - .../test_models/test_open_item_diff_dto.py | 24 - python/test/test_models/test_open_item_dto.py | 24 - .../test_models/test_open_item_extend_dto.py | 24 - .../test_models/test_open_item_page_dto.py | 24 - .../test_models/test_open_miss_env_dto.py | 24 - .../test_models/test_open_namespace_dto.py | 24 - .../test_open_namespace_extend_dto.py | 24 - .../test_open_namespace_identifier.py | 24 - .../test_open_namespace_lock_dto.py | 24 - .../test_open_namespace_role_user_dto.py | 24 - .../test_open_namespace_sync_dto.py | 24 - .../test_open_namespace_text_model.py | 24 - .../test_open_namespace_usage_dto.py | 24 - .../test_models/test_open_organization_dto.py | 24 - .../test_open_permission_condition_dto.py | 24 - .../test_open_release_change_dto.py | 24 - .../test_models/test_open_release_diff_dto.py | 24 - .../test/test_models/test_open_release_dto.py | 24 - python/test/test_models/test_open_user_dto.py | 24 - .../test_models/test_open_user_info_dto.py | 24 - .../test_string_to_string_bool_map.py | 24 - python/test/test_paths/__init__.py | 68 - .../__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_get.py | 41 - .../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 | 42 - .../test_openapi_v1_apps_app_id/__init__.py | 1 - .../test_delete.py | 40 - .../test_openapi_v1_apps_app_id/test_get.py | 41 - .../test_openapi_v1_apps_app_id/test_put.py | 42 - .../__init__.py | 1 - .../test_get.py | 41 - .../test_post.py | 43 - .../__init__.py | 1 - .../test_delete.py | 40 - .../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_post.py | 41 - .../__init__.py | 1 - .../test_delete.py | 40 - .../__init__.py | 1 - .../test_put.py | 40 - .../__init__.py | 1 - .../test_put.py | 40 - .../__init__.py | 1 - .../test_get.py | 41 - .../test_head.py | 40 - .../__init__.py | 1 - .../test_post.py | 40 - .../__init__.py | 1 - .../test_get.py | 41 - .../test_post.py | 40 - .../__init__.py | 1 - .../test_delete.py | 40 - .../__init__.py | 1 - .../test_get.py | 41 - .../__init__.py | 1 - .../test_get.py | 41 - .../__init__.py | 1 - .../test_post.py | 40 - .../__init__.py | 1 - .../test_get.py | 41 - .../__init__.py | 1 - .../test_get.py | 41 - .../__init__.py | 1 - .../test_post.py | 40 - .../__init__.py | 1 - .../test_get.py | 41 - .../__init__.py | 1 - .../test_get.py | 41 - .../__init__.py | 1 - .../test_delete.py | 40 - .../test_post.py | 40 - .../__init__.py | 1 - .../test_get.py | 41 - .../__init__.py | 1 - .../test_get.py | 41 - .../__init__.py | 1 - .../test_delete.py | 40 - .../test_post.py | 40 - .../__init__.py | 1 - .../test_get.py | 41 - .../__init__.py | 1 - .../test_post.py | 40 - .../__init__.py | 1 - .../test_get.py | 41 - .../__init__.py | 1 - .../test_get.py | 41 - .../__init__.py | 1 - .../test_delete.py | 40 - .../test_post.py | 40 - .../__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_delete.py | 40 - .../test_post.py | 40 - .../__init__.py | 1 - .../test_delete.py | 40 - .../test_post.py | 40 - .../__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 | 42 - .../__init__.py | 1 - .../test_get.py | 41 - .../__init__.py | 1 - .../test_get.py | 41 - .../__init__.py | 1 - .../test_post.py | 40 - .../__init__.py | 1 - .../test_get.py | 41 - .../test_openapi_v1_consumers/__init__.py | 1 - .../test_openapi_v1_consumers/test_get.py | 41 - .../test_openapi_v1_consumers/test_post.py | 43 - .../__init__.py | 1 - .../test_delete.py | 40 - .../__init__.py | 1 - .../test_post.py | 43 - .../test_openapi_v1_envs/__init__.py | 1 - .../test_openapi_v1_envs/test_get.py | 41 - .../__init__.py | 1 - .../test_get.py | 41 - .../__init__.py | 1 - .../test_post.py | 43 - .../__init__.py | 1 - .../test_delete.py | 40 - .../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_post.py | 41 - .../__init__.py | 1 - .../test_delete.py | 40 - .../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_post.py | 43 - .../__init__.py | 1 - .../test_get.py | 41 - .../test_put.py | 42 - .../__init__.py | 1 - .../test_delete.py | 40 - .../test_get.py | 41 - .../test_put.py | 42 - .../__init__.py | 1 - .../test_get.py | 41 - .../__init__.py | 1 - .../test_get.py | 41 - .../test_post.py | 43 - .../test_put.py | 42 - .../__init__.py | 1 - .../test_post.py | 43 - .../__init__.py | 1 - .../test_delete.py | 40 - .../test_get.py | 41 - .../test_put.py | 42 - .../__init__.py | 1 - .../test_post.py | 40 - .../__init__.py | 1 - .../test_post.py | 42 - .../__init__.py | 1 - .../test_post.py | 42 - .../__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_get.py | 41 - .../__init__.py | 1 - .../test_get.py | 41 - .../__init__.py | 1 - .../test_put.py | 40 - .../test_openapi_v1_favorites/__init__.py | 1 - .../test_openapi_v1_favorites/test_get.py | 41 - .../test_openapi_v1_favorites/test_post.py | 43 - .../__init__.py | 1 - .../test_delete.py | 40 - .../test_put.py | 40 - .../__init__.py | 1 - .../test_get.py | 41 - .../test_openapi_v1_import/__init__.py | 1 - .../test_openapi_v1_import/test_post.py | 40 - .../test_openapi_v1_namespaces/__init__.py | 1 - .../test_openapi_v1_namespaces/test_post.py | 42 - .../test_openapi_v1_organizations/__init__.py | 1 - .../test_openapi_v1_organizations/test_get.py | 41 - .../test_openapi_v1_page_settings/__init__.py | 1 - .../test_openapi_v1_page_settings/test_get.py | 41 - .../__init__.py | 1 - .../test_get.py | 41 - .../__init__.py | 1 - .../test_delete.py | 40 - .../test_post.py | 43 - .../__init__.py | 1 - .../test_get.py | 41 - .../__init__.py | 1 - .../test_delete.py | 40 - .../test_post.py | 43 - .../__init__.py | 1 - .../test_get.py | 41 - .../test_openapi_v1_system_info/__init__.py | 1 - .../test_openapi_v1_system_info/test_get.py | 41 - .../__init__.py | 1 - .../test_get.py | 41 - .../__init__.py | 1 - .../test_get.py | 41 - .../__init__.py | 1 - .../test_delete.py | 40 - .../test_get.py | 41 - .../test_post.py | 40 - .../__init__.py | 1 - .../test_get.py | 41 - .../test_openapi_v1_user/__init__.py | 1 - .../test_openapi_v1_user/test_get.py | 41 - .../test_openapi_v1_users/__init__.py | 1 - .../test_openapi_v1_users/test_get.py | 41 - .../test_openapi_v1_users/test_post.py | 42 - .../test_openapi_v1_users_enabled/__init__.py | 1 - .../test_openapi_v1_users_enabled/test_put.py | 42 - .../test_openapi_v1_users_user_id/__init__.py | 1 - .../test_openapi_v1_users_user_id/test_get.py | 41 - python/tox.ini | 10 - rust/.gitignore | 3 - rust/.openapi-generator-ignore | 23 - rust/.openapi-generator/FILES | 88 - rust/.openapi-generator/VERSION | 1 - rust/.travis.yml | 1 - rust/Cargo.toml | 18 - rust/README.md | 94 - rust/docs/ExceptionResponse.md | 12 - rust/docs/NamespaceGrayDelReleaseDto.md | 13 - rust/docs/NamespaceReleaseDto.md | 12 - rust/docs/OpenAccessKeyDto.md | 19 - rust/docs/OpenAppDto.md | 21 - rust/docs/OpenAppNamespaceDto.md | 20 - rust/docs/OpenAppRoleUserDto.md | 10 - rust/docs/OpenClusterDto.md | 19 - rust/docs/OpenClusterNamespaceRoleUserDto.md | 13 - rust/docs/OpenCreateAppDto.md | 11 - rust/docs/OpenCreateNamespaceDto.md | 12 - rust/docs/OpenEnvClusterDto.md | 10 - rust/docs/OpenEnvClusterInfo.md | 12 - rust/docs/OpenEnvNamespaceRoleUserDto.md | 13 - rust/docs/OpenGrayReleaseRuleDto.md | 19 - rust/docs/OpenGrayReleaseRuleItemDto.md | 11 - rust/docs/OpenInstanceConfigDto.md | 11 - rust/docs/OpenInstanceDto.md | 15 - rust/docs/OpenInstancePageDto.md | 12 - rust/docs/OpenItemDiffDto.md | 14 - rust/docs/OpenItemDto.md | 20 - rust/docs/OpenItemExtendDto.md | 14 - rust/docs/OpenItemPageDto.md | 12 - rust/docs/OpenMissEnvDto.md | 10 - rust/docs/OpenNamespaceDto.md | 22 - rust/docs/OpenNamespaceExtendDto.md | 11 - rust/docs/OpenNamespaceIdentifier.md | 12 - rust/docs/OpenNamespaceLockDto.md | 12 - rust/docs/OpenNamespaceRoleUserDto.md | 12 - rust/docs/OpenNamespaceSyncDto.md | 10 - rust/docs/OpenNamespaceTextModel.md | 16 - rust/docs/OpenNamespaceUsageDto.md | 15 - rust/docs/OpenOrganizationDto.md | 10 - rust/docs/OpenPermissionConditionDto.md | 9 - rust/docs/OpenReleaseChangeDto.md | 12 - rust/docs/OpenReleaseDiffDto.md | 9 - rust/docs/OpenReleaseDto.md | 21 - rust/docs/OpenUserDto.md | 13 - rust/docs/OpenUserInfoDto.md | 12 - rust/git_push.sh | 57 - rust/src/apis/configuration.rs | 52 - rust/src/apis/mod.rs | 94 - rust/src/lib.rs | 10 - rust/src/models/exception_response.rs | 38 - rust/src/models/mod.rs | 78 - .../models/namespace_gray_del_release_dto.rs | 44 - rust/src/models/namespace_release_dto.rs | 40 - rust/src/models/open_access_key_dto.rs | 66 - rust/src/models/open_app_dto.rs | 75 - rust/src/models/open_app_namespace_dto.rs | 72 - rust/src/models/open_app_role_user_dto.rs | 30 - rust/src/models/open_cluster_dto.rs | 68 - .../open_cluster_namespace_role_user_dto.rs | 42 - rust/src/models/open_create_app_dto.rs | 35 - rust/src/models/open_create_namespace_dto.rs | 40 - rust/src/models/open_env_cluster_dto.rs | 30 - rust/src/models/open_env_cluster_info.rs | 38 - .../open_env_namespace_role_user_dto.rs | 42 - rust/src/models/open_gray_release_rule_dto.rs | 68 - .../models/open_gray_release_rule_item_dto.rs | 36 - rust/src/models/open_instance_config_dto.rs | 33 - rust/src/models/open_instance_dto.rs | 50 - rust/src/models/open_instance_page_dto.rs | 40 - rust/src/models/open_item_diff_dto.rs | 42 - rust/src/models/open_item_dto.rs | 71 - rust/src/models/open_item_extend_dto.rs | 48 - rust/src/models/open_item_page_dto.rs | 40 - rust/src/models/open_miss_env_dto.rs | 29 - rust/src/models/open_namespace_dto.rs | 79 - rust/src/models/open_namespace_extend_dto.rs | 34 - rust/src/models/open_namespace_identifier.rs | 38 - rust/src/models/open_namespace_lock_dto.rs | 40 - .../models/open_namespace_role_user_dto.rs | 38 - rust/src/models/open_namespace_sync_dto.rs | 30 - rust/src/models/open_namespace_text_model.rs | 54 - rust/src/models/open_namespace_usage_dto.rs | 52 - rust/src/models/open_organization_dto.rs | 30 - .../models/open_permission_condition_dto.rs | 26 - rust/src/models/open_release_change_dto.rs | 38 - rust/src/models/open_release_diff_dto.rs | 26 - rust/src/models/open_release_dto.rs | 75 - rust/src/models/open_user_dto.rs | 42 - rust/src/models/open_user_info_dto.rs | 38 - .../.mvn/wrapper/MavenWrapperDownloader.java | 117 - spring-boot2/.mvn/wrapper/maven-wrapper.jar | Bin 50710 -> 0 bytes .../.mvn/wrapper/maven-wrapper.properties | 2 - spring-boot2/.openapi-generator-ignore | 23 - spring-boot2/.openapi-generator/FILES | 95 - spring-boot2/.openapi-generator/VERSION | 1 - spring-boot2/README.md | 27 - spring-boot2/mvnw | 310 - spring-boot2/mvnw.cmd | 182 - spring-boot2/pom.xml | 74 - .../server/OpenApiGeneratorApplication.java | 30 - .../openapi/server/RFC3339DateFormat.java | 38 - .../server/api/AccessKeyManagementApi.java | 221 - .../api/AccessKeyManagementApiController.java | 44 - .../api/AccessKeyManagementApiDelegate.java | 135 - .../apollo/openapi/server/api/ApiUtil.java | 19 - .../openapi/server/api/AppManagementApi.java | 469 - .../api/AppManagementApiController.java | 49 - .../server/api/AppManagementApiDelegate.java | 262 - .../server/api/AppNamespaceManagementApi.java | 298 - .../AppNamespaceManagementApiController.java | 47 - .../AppNamespaceManagementApiDelegate.java | 195 - .../server/api/ClusterManagementApi.java | 176 - .../api/ClusterManagementApiController.java | 45 - .../api/ClusterManagementApiDelegate.java | 104 - .../server/api/EnvironmentManagementApi.java | 70 - .../EnvironmentManagementApiController.java | 43 - .../api/EnvironmentManagementApiDelegate.java | 46 - .../server/api/InstanceManagementApi.java | 200 - .../api/InstanceManagementApiController.java | 45 - .../api/InstanceManagementApiDelegate.java | 136 - .../openapi/server/api/ItemManagementApi.java | 703 -- .../api/ItemManagementApiController.java | 49 - .../server/api/ItemManagementApiDelegate.java | 421 - .../api/NamespaceBranchManagementApi.java | 355 - ...amespaceBranchManagementApiController.java | 48 - .../NamespaceBranchManagementApiDelegate.java | 241 - .../api/NamespaceLockManagementApi.java | 78 - .../NamespaceLockManagementApiController.java | 44 - .../NamespaceLockManagementApiDelegate.java | 54 - .../server/api/NamespaceManagementApi.java | 381 - .../api/NamespaceManagementApiController.java | 47 - .../api/NamespaceManagementApiDelegate.java | 252 - .../server/api/OrganizationManagementApi.java | 76 - .../OrganizationManagementApiController.java | 45 - .../OrganizationManagementApiDelegate.java | 49 - .../server/api/PermissionManagementApi.java | 989 -- .../PermissionManagementApiController.java | 50 - .../api/PermissionManagementApiDelegate.java | 586 -- .../server/api/PortalManagementApi.java | 1311 --- .../api/PortalManagementApiController.java | 43 - .../api/PortalManagementApiDelegate.java | 707 -- .../server/api/ReleaseManagementApi.java | 381 - .../api/ReleaseManagementApiController.java | 48 - .../api/ReleaseManagementApiDelegate.java | 262 - .../openapi/server/api/UserManagementApi.java | 259 - .../api/UserManagementApiController.java | 46 - .../server/api/UserManagementApiDelegate.java | 142 - .../openapi/server/config/HomeController.java | 20 - .../server/config/SpringDocConfiguration.java | 35 - .../server/model/ExceptionResponse.java | 157 - .../model/NamespaceGrayDelReleaseDTO.java | 190 - .../server/model/NamespaceReleaseDTO.java | 155 - .../server/model/OpenAccessKeyDTO.java | 322 - .../openapi/server/model/OpenAppDTO.java | 371 - .../server/model/OpenAppNamespaceDTO.java | 347 - .../server/model/OpenAppRoleUserDTO.java | 118 - .../openapi/server/model/OpenClusterDTO.java | 323 - .../OpenClusterNamespaceRoleUserDTO.java | 199 - .../server/model/OpenCreateAppDTO.java | 145 - .../server/model/OpenCreateNamespaceDTO.java | 155 - .../server/model/OpenEnvClusterDTO.java | 117 - .../server/model/OpenEnvClusterInfo.java | 166 - .../model/OpenEnvNamespaceRoleUserDTO.java | 199 - .../server/model/OpenGrayReleaseRuleDTO.java | 337 - .../model/OpenGrayReleaseRuleItemDTO.java | 154 - .../server/model/OpenInstanceConfigDTO.java | 131 - .../openapi/server/model/OpenInstanceDTO.java | 238 - .../server/model/OpenInstancePageDTO.java | 167 - .../openapi/server/model/OpenItemDTO.java | 348 - .../openapi/server/model/OpenItemDiffDTO.java | 233 - .../server/model/OpenItemExtendDTO.java | 203 - .../openapi/server/model/OpenItemPageDTO.java | 167 - .../openapi/server/model/OpenMissEnvDTO.java | 106 - .../server/model/OpenNamespaceDTO.java | 408 - .../server/model/OpenNamespaceExtendDTO.java | 130 - .../server/model/OpenNamespaceIdentifier.java | 154 - .../server/model/OpenNamespaceLockDTO.java | 155 - .../model/OpenNamespaceRoleUserDTO.java | 175 - .../server/model/OpenNamespaceSyncDTO.java | 128 - .../server/model/OpenNamespaceTextModel.java | 250 - .../server/model/OpenNamespaceUsageDTO.java | 227 - .../server/model/OpenOrganizationDto.java | 106 - .../model/OpenPermissionConditionDTO.java | 82 - .../server/model/OpenReleaseChangeDTO.java | 154 - .../openapi/server/model/OpenReleaseDTO.java | 382 - .../server/model/OpenReleaseDiffDTO.java | 94 - .../openapi/server/model/OpenUserDTO.java | 178 - .../openapi/server/model/OpenUserInfoDTO.java | 154 - .../src/main/resources/application.properties | 3 - spring-boot2/src/main/resources/openapi.yaml | 8987 ----------------- .../OpenApiGeneratorApplicationTests.java | 13 - templates/python/api_client.handlebars | 1509 --- tests/test_audit_display_name_fields.py | 2 - tests/test_generation_workflow.py | 48 + tests/test_user_management_contract.py | 32 - typescript/.gitignore | 4 - typescript/.npmignore | 1 - typescript/.openapi-generator-ignore | 23 - typescript/.openapi-generator/FILES | 64 - typescript/.openapi-generator/VERSION | 1 - typescript/README.md | 45 - typescript/package.json | 19 - typescript/src/apis/AccessKeyManagementApi.ts | 291 - typescript/src/apis/AppManagementApi.ts | 519 - .../src/apis/AppNamespaceManagementApi.ts | 370 - typescript/src/apis/ClusterManagementApi.ts | 189 - .../src/apis/EnvironmentManagementApi.ts | 54 - typescript/src/apis/InstanceManagementApi.ts | 320 - typescript/src/apis/ItemManagementApi.ts | 977 -- .../src/apis/NamespaceBranchManagementApi.ts | 516 - .../src/apis/NamespaceLockManagementApi.ts | 84 - typescript/src/apis/NamespaceManagementApi.ts | 533 - .../src/apis/OrganizationManagementApi.ts | 64 - .../src/apis/PermissionManagementApi.ts | 1437 --- typescript/src/apis/PortalManagementApi.ts | 1842 ---- typescript/src/apis/ReleaseManagementApi.ts | 540 - typescript/src/apis/UserManagementApi.ts | 265 - typescript/src/apis/index.ts | 17 - typescript/src/index.ts | 5 - typescript/src/models/ExceptionResponse.ts | 87 - .../src/models/NamespaceGrayDelReleaseDTO.ts | 95 - typescript/src/models/NamespaceReleaseDTO.ts | 87 - typescript/src/models/OpenAccessKeyDTO.ts | 143 - typescript/src/models/OpenAppDTO.ts | 159 - typescript/src/models/OpenAppNamespaceDTO.ts | 151 - typescript/src/models/OpenAppRoleUserDTO.ts | 78 - typescript/src/models/OpenClusterDTO.ts | 143 - .../models/OpenClusterNamespaceRoleUserDTO.ts | 102 - typescript/src/models/OpenCreateAppDTO.ts | 86 - .../src/models/OpenCreateNamespaceDTO.ts | 87 - typescript/src/models/OpenEnvClusterDTO.ts | 71 - typescript/src/models/OpenEnvClusterInfo.ts | 94 - .../src/models/OpenEnvNamespaceRoleUserDTO.ts | 102 - .../src/models/OpenGrayReleaseRuleDTO.ts | 150 - .../src/models/OpenGrayReleaseRuleItemDTO.ts | 79 - .../src/models/OpenInstanceConfigDTO.ts | 86 - typescript/src/models/OpenInstanceDTO.ts | 118 - typescript/src/models/OpenInstancePageDTO.ts | 94 - typescript/src/models/OpenItemDTO.ts | 158 - typescript/src/models/OpenItemDiffDTO.ts | 116 - typescript/src/models/OpenItemExtendDTO.ts | 103 - typescript/src/models/OpenItemPageDTO.ts | 94 - typescript/src/models/OpenMissEnvDTO.ts | 71 - typescript/src/models/OpenNamespaceDTO.ts | 180 - .../src/models/OpenNamespaceExtendDTO.ts | 79 - .../src/models/OpenNamespaceIdentifier.ts | 87 - typescript/src/models/OpenNamespaceLockDTO.ts | 87 - .../src/models/OpenNamespaceRoleUserDTO.ts | 94 - typescript/src/models/OpenNamespaceSyncDTO.ts | 84 - .../src/models/OpenNamespaceTextModel.ts | 119 - .../src/models/OpenNamespaceUsageDTO.ts | 111 - typescript/src/models/OpenOrganizationDto.ts | 71 - .../src/models/OpenPermissionConditionDTO.ts | 63 - typescript/src/models/OpenReleaseChangeDTO.ts | 87 - typescript/src/models/OpenReleaseDTO.ts | 159 - typescript/src/models/OpenReleaseDiffDTO.ts | 70 - typescript/src/models/OpenUserDTO.ts | 95 - typescript/src/models/OpenUserInfoDTO.ts | 87 - typescript/src/models/index.ts | 41 - typescript/src/runtime.ts | 424 - typescript/tsconfig.json | 20 - 1427 files changed, 152 insertions(+), 257256 deletions(-) delete mode 100644 java-client/.github/workflows/maven.yml delete mode 100644 java-client/.gitignore delete mode 100644 java-client/.openapi-generator-ignore delete mode 100644 java-client/.openapi-generator/FILES delete mode 100644 java-client/.openapi-generator/VERSION delete mode 100644 java-client/.travis.yml delete mode 100644 java-client/README.md delete mode 100644 java-client/api/openapi.yaml delete mode 100644 java-client/build.gradle delete mode 100644 java-client/build.sbt delete mode 100644 java-client/docs/AccessKeyManagementApi.md delete mode 100644 java-client/docs/AppManagementApi.md delete mode 100644 java-client/docs/AppNamespaceManagementApi.md delete mode 100644 java-client/docs/ClusterManagementApi.md delete mode 100644 java-client/docs/EnvironmentManagementApi.md delete mode 100644 java-client/docs/ExceptionResponse.md delete mode 100644 java-client/docs/InstanceManagementApi.md delete mode 100644 java-client/docs/ItemManagementApi.md delete mode 100644 java-client/docs/NamespaceBranchManagementApi.md delete mode 100644 java-client/docs/NamespaceGrayDelReleaseDTO.md delete mode 100644 java-client/docs/NamespaceLockManagementApi.md delete mode 100644 java-client/docs/NamespaceManagementApi.md delete mode 100644 java-client/docs/NamespaceReleaseDTO.md delete mode 100644 java-client/docs/OpenAccessKeyDTO.md delete mode 100644 java-client/docs/OpenAppDTO.md delete mode 100644 java-client/docs/OpenAppNamespaceDTO.md delete mode 100644 java-client/docs/OpenAppRoleUserDTO.md delete mode 100644 java-client/docs/OpenClusterDTO.md delete mode 100644 java-client/docs/OpenClusterNamespaceRoleUserDTO.md delete mode 100644 java-client/docs/OpenCreateAppDTO.md delete mode 100644 java-client/docs/OpenCreateNamespaceDTO.md delete mode 100644 java-client/docs/OpenEnvClusterDTO.md delete mode 100644 java-client/docs/OpenEnvClusterInfo.md delete mode 100644 java-client/docs/OpenEnvNamespaceRoleUserDTO.md delete mode 100644 java-client/docs/OpenGrayReleaseRuleDTO.md delete mode 100644 java-client/docs/OpenGrayReleaseRuleItemDTO.md delete mode 100644 java-client/docs/OpenInstanceConfigDTO.md delete mode 100644 java-client/docs/OpenInstanceDTO.md delete mode 100644 java-client/docs/OpenInstancePageDTO.md delete mode 100644 java-client/docs/OpenItemDTO.md delete mode 100644 java-client/docs/OpenItemDiffDTO.md delete mode 100644 java-client/docs/OpenItemExtendDTO.md delete mode 100644 java-client/docs/OpenItemPageDTO.md delete mode 100644 java-client/docs/OpenMissEnvDTO.md delete mode 100644 java-client/docs/OpenNamespaceDTO.md delete mode 100644 java-client/docs/OpenNamespaceExtendDTO.md delete mode 100644 java-client/docs/OpenNamespaceIdentifier.md delete mode 100644 java-client/docs/OpenNamespaceLockDTO.md delete mode 100644 java-client/docs/OpenNamespaceRoleUserDTO.md delete mode 100644 java-client/docs/OpenNamespaceSyncDTO.md delete mode 100644 java-client/docs/OpenNamespaceTextModel.md delete mode 100644 java-client/docs/OpenNamespaceUsageDTO.md delete mode 100644 java-client/docs/OpenOrganizationDto.md delete mode 100644 java-client/docs/OpenPermissionConditionDTO.md delete mode 100644 java-client/docs/OpenReleaseChangeDTO.md delete mode 100644 java-client/docs/OpenReleaseDTO.md delete mode 100644 java-client/docs/OpenReleaseDiffDTO.md delete mode 100644 java-client/docs/OpenUserDTO.md delete mode 100644 java-client/docs/OpenUserInfoDTO.md delete mode 100644 java-client/docs/OrganizationManagementApi.md delete mode 100644 java-client/docs/PermissionManagementApi.md delete mode 100644 java-client/docs/PortalManagementApi.md delete mode 100644 java-client/docs/ReleaseManagementApi.md delete mode 100644 java-client/docs/UserManagementApi.md delete mode 100644 java-client/git_push.sh delete mode 100644 java-client/gradle.properties delete mode 100644 java-client/gradle/wrapper/gradle-wrapper.jar delete mode 100644 java-client/gradle/wrapper/gradle-wrapper.properties delete mode 100644 java-client/gradlew delete mode 100644 java-client/gradlew.bat delete mode 100644 java-client/pom.xml delete mode 100644 java-client/settings.gradle delete mode 100644 java-client/src/main/AndroidManifest.xml delete mode 100644 java-client/src/main/java/org/openapitools/client/ApiCallback.java delete mode 100644 java-client/src/main/java/org/openapitools/client/ApiClient.java delete mode 100644 java-client/src/main/java/org/openapitools/client/ApiException.java delete mode 100644 java-client/src/main/java/org/openapitools/client/ApiResponse.java delete mode 100644 java-client/src/main/java/org/openapitools/client/Configuration.java delete mode 100644 java-client/src/main/java/org/openapitools/client/GzipRequestInterceptor.java delete mode 100644 java-client/src/main/java/org/openapitools/client/JSON.java delete mode 100644 java-client/src/main/java/org/openapitools/client/Pair.java delete mode 100644 java-client/src/main/java/org/openapitools/client/ProgressRequestBody.java delete mode 100644 java-client/src/main/java/org/openapitools/client/ProgressResponseBody.java delete mode 100644 java-client/src/main/java/org/openapitools/client/ServerConfiguration.java delete mode 100644 java-client/src/main/java/org/openapitools/client/ServerVariable.java delete mode 100644 java-client/src/main/java/org/openapitools/client/StringUtil.java delete mode 100644 java-client/src/main/java/org/openapitools/client/api/AccessKeyManagementApi.java delete mode 100644 java-client/src/main/java/org/openapitools/client/api/AppManagementApi.java delete mode 100644 java-client/src/main/java/org/openapitools/client/api/AppNamespaceManagementApi.java delete mode 100644 java-client/src/main/java/org/openapitools/client/api/ClusterManagementApi.java delete mode 100644 java-client/src/main/java/org/openapitools/client/api/EnvironmentManagementApi.java delete mode 100644 java-client/src/main/java/org/openapitools/client/api/InstanceManagementApi.java delete mode 100644 java-client/src/main/java/org/openapitools/client/api/ItemManagementApi.java delete mode 100644 java-client/src/main/java/org/openapitools/client/api/NamespaceBranchManagementApi.java delete mode 100644 java-client/src/main/java/org/openapitools/client/api/NamespaceLockManagementApi.java delete mode 100644 java-client/src/main/java/org/openapitools/client/api/NamespaceManagementApi.java delete mode 100644 java-client/src/main/java/org/openapitools/client/api/OrganizationManagementApi.java delete mode 100644 java-client/src/main/java/org/openapitools/client/api/PermissionManagementApi.java delete mode 100644 java-client/src/main/java/org/openapitools/client/api/PortalManagementApi.java delete mode 100644 java-client/src/main/java/org/openapitools/client/api/ReleaseManagementApi.java delete mode 100644 java-client/src/main/java/org/openapitools/client/api/UserManagementApi.java delete mode 100644 java-client/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java delete mode 100644 java-client/src/main/java/org/openapitools/client/auth/Authentication.java delete mode 100644 java-client/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java delete mode 100644 java-client/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/ExceptionResponse.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/NamespaceReleaseDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenAccessKeyDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenAppDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenAppNamespaceDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenAppRoleUserDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenClusterDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenClusterNamespaceRoleUserDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenCreateAppDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenCreateNamespaceDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterInfo.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenEnvNamespaceRoleUserDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenInstanceConfigDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenInstanceDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenInstancePageDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenItemDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenItemDiffDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenItemExtendDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenItemPageDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenMissEnvDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenNamespaceDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenNamespaceExtendDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenNamespaceIdentifier.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenNamespaceLockDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenNamespaceRoleUserDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenNamespaceSyncDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenNamespaceTextModel.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenNamespaceUsageDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenOrganizationDto.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenPermissionConditionDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenReleaseChangeDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenReleaseDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenReleaseDiffDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenUserDTO.java delete mode 100644 java-client/src/main/java/org/openapitools/client/model/OpenUserInfoDTO.java delete mode 100644 java-client/src/test/java/org/openapitools/client/api/AccessKeyManagementApiTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/api/AppManagementApiTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/api/AppNamespaceManagementApiTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/api/ClusterManagementApiTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/api/EnvironmentManagementApiTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/api/InstanceManagementApiTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/api/ItemManagementApiTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/api/NamespaceBranchManagementApiTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/api/NamespaceLockManagementApiTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/api/NamespaceManagementApiTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/api/OrganizationManagementApiTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/api/PermissionManagementApiTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/api/PortalManagementApiTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/api/ReleaseManagementApiTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/api/UserManagementApiTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/ExceptionResponseTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/NamespaceReleaseDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenAccessKeyDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenAppDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenAppNamespaceDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenAppRoleUserDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenClusterDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenClusterNamespaceRoleUserDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenCreateAppDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenCreateNamespaceDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterInfoTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenEnvNamespaceRoleUserDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenInstanceConfigDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenInstanceDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenInstancePageDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenItemDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenItemDiffDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenItemExtendDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenItemPageDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenMissEnvDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenNamespaceDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenNamespaceExtendDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenNamespaceIdentifierTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenNamespaceLockDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenNamespaceRoleUserDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenNamespaceSyncDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenNamespaceTextModelTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenNamespaceUsageDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenOrganizationDtoTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenPermissionConditionDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenReleaseChangeDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenReleaseDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenReleaseDiffDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenUserDTOTest.java delete mode 100644 java-client/src/test/java/org/openapitools/client/model/OpenUserInfoDTOTest.java delete mode 100644 python/.gitignore delete mode 100644 python/.gitlab-ci.yml delete mode 100644 python/.openapi-generator-ignore delete mode 100644 python/.openapi-generator/FILES delete mode 100644 python/.openapi-generator/VERSION delete mode 100644 python/.travis.yml delete mode 100644 python/README.md delete mode 100644 python/apollo_openapi/__init__.py delete mode 100644 python/apollo_openapi/api_client.py delete mode 100644 python/apollo_openapi/apis/__init__.py delete mode 100644 python/apollo_openapi/apis/path_to_api.py delete mode 100644 python/apollo_openapi/apis/paths/__init__.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_logs.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_logs_by_name_or_type_or_operator.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_logs_data_influences_field.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_logs_op_name.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_properties.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_trace.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_appnamespaces.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_appnamespaces.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_env_cluster_info.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envclusters.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_accesskeys.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_miss_envs.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permission_init.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_namespace_name_role_users.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_releases_status.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_permissions_permission_type.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_role_users.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_roles_master.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_roles_role_type.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_authorized.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_by_self.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_envs_env.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_apps_search_by_appid_or_name.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_configs_export.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_configs_import.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_consumer_tokens_by_app_id.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_consumers.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_consumers_by_app_id.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_consumers_token_assign_role.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.py delete 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 delete 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 delete 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 delete 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 delete 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 delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_namespace.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_release.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_comparison.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_release_id.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_release_id_rollback.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_favorites.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_favorites_favorite_id.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_global_search_item_info_by_key_or_value.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_import.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_namespaces.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_organizations.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_page_settings.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_permissions_root.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_server_envs_env_config_db_config.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_server_envs_env_config_db_config_find_all_config.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_server_portal_db_config.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_server_portal_db_config_find_all_config.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_system_info.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_system_info_health.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_system_role_manage_app_master.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_system_roles_create_application.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_system_roles_create_application_role_users.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_user.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_users.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_users_enabled.py delete mode 100644 python/apollo_openapi/apis/paths/openapi_v1_users_user_id.py delete mode 100644 python/apollo_openapi/apis/tag_to_api.py delete mode 100644 python/apollo_openapi/apis/tags/__init__.py delete mode 100644 python/apollo_openapi/apis/tags/access_key_management_api.py delete mode 100644 python/apollo_openapi/apis/tags/app_management_api.py delete mode 100644 python/apollo_openapi/apis/tags/app_namespace_management_api.py delete mode 100644 python/apollo_openapi/apis/tags/cluster_management_api.py delete mode 100644 python/apollo_openapi/apis/tags/environment_management_api.py delete mode 100644 python/apollo_openapi/apis/tags/instance_management_api.py delete mode 100644 python/apollo_openapi/apis/tags/item_management_api.py delete mode 100644 python/apollo_openapi/apis/tags/namespace_branch_management_api.py delete mode 100644 python/apollo_openapi/apis/tags/namespace_lock_management_api.py delete mode 100644 python/apollo_openapi/apis/tags/namespace_management_api.py delete mode 100644 python/apollo_openapi/apis/tags/organization_management_api.py delete mode 100644 python/apollo_openapi/apis/tags/permission_management_api.py delete mode 100644 python/apollo_openapi/apis/tags/portal_management_api.py delete mode 100644 python/apollo_openapi/apis/tags/release_management_api.py delete mode 100644 python/apollo_openapi/apis/tags/user_management_api.py delete mode 100644 python/apollo_openapi/configuration.py delete mode 100644 python/apollo_openapi/exceptions.py delete mode 100644 python/apollo_openapi/model/__init__.py delete mode 100644 python/apollo_openapi/model/exception_response.py delete mode 100644 python/apollo_openapi/model/exception_response.pyi delete mode 100644 python/apollo_openapi/model/map_string.py delete mode 100644 python/apollo_openapi/model/map_string.pyi delete mode 100644 python/apollo_openapi/model/namespace_gray_del_release_dto.py delete mode 100644 python/apollo_openapi/model/namespace_gray_del_release_dto.pyi delete mode 100644 python/apollo_openapi/model/namespace_release_dto.py delete mode 100644 python/apollo_openapi/model/namespace_release_dto.pyi delete mode 100644 python/apollo_openapi/model/open_access_key_dto.py delete mode 100644 python/apollo_openapi/model/open_access_key_dto.pyi delete mode 100644 python/apollo_openapi/model/open_app_dto.py delete mode 100644 python/apollo_openapi/model/open_app_dto.pyi delete mode 100644 python/apollo_openapi/model/open_app_namespace_dto.py delete mode 100644 python/apollo_openapi/model/open_app_namespace_dto.pyi delete mode 100644 python/apollo_openapi/model/open_app_role_user_dto.py delete mode 100644 python/apollo_openapi/model/open_app_role_user_dto.pyi delete mode 100644 python/apollo_openapi/model/open_cluster_dto.py delete mode 100644 python/apollo_openapi/model/open_cluster_dto.pyi delete mode 100644 python/apollo_openapi/model/open_cluster_namespace_role_user_dto.py delete mode 100644 python/apollo_openapi/model/open_cluster_namespace_role_user_dto.pyi delete mode 100644 python/apollo_openapi/model/open_create_app_dto.py delete mode 100644 python/apollo_openapi/model/open_create_app_dto.pyi delete mode 100644 python/apollo_openapi/model/open_create_namespace_dto.py delete mode 100644 python/apollo_openapi/model/open_create_namespace_dto.pyi delete mode 100644 python/apollo_openapi/model/open_env_cluster_dto.py delete mode 100644 python/apollo_openapi/model/open_env_cluster_dto.pyi delete mode 100644 python/apollo_openapi/model/open_env_cluster_info.py delete mode 100644 python/apollo_openapi/model/open_env_cluster_info.pyi delete mode 100644 python/apollo_openapi/model/open_env_namespace_role_user_dto.py delete mode 100644 python/apollo_openapi/model/open_env_namespace_role_user_dto.pyi delete mode 100644 python/apollo_openapi/model/open_gray_release_rule_dto.py delete mode 100644 python/apollo_openapi/model/open_gray_release_rule_dto.pyi delete mode 100644 python/apollo_openapi/model/open_gray_release_rule_item_dto.py delete mode 100644 python/apollo_openapi/model/open_gray_release_rule_item_dto.pyi delete mode 100644 python/apollo_openapi/model/open_instance_config_dto.py delete mode 100644 python/apollo_openapi/model/open_instance_config_dto.pyi delete mode 100644 python/apollo_openapi/model/open_instance_dto.py delete mode 100644 python/apollo_openapi/model/open_instance_dto.pyi delete mode 100644 python/apollo_openapi/model/open_instance_page_dto.py delete mode 100644 python/apollo_openapi/model/open_instance_page_dto.pyi delete mode 100644 python/apollo_openapi/model/open_item_diff_dto.py delete mode 100644 python/apollo_openapi/model/open_item_diff_dto.pyi delete mode 100644 python/apollo_openapi/model/open_item_dto.py delete mode 100644 python/apollo_openapi/model/open_item_dto.pyi delete mode 100644 python/apollo_openapi/model/open_item_extend_dto.py delete mode 100644 python/apollo_openapi/model/open_item_extend_dto.pyi delete mode 100644 python/apollo_openapi/model/open_item_page_dto.py delete mode 100644 python/apollo_openapi/model/open_item_page_dto.pyi delete mode 100644 python/apollo_openapi/model/open_miss_env_dto.py delete mode 100644 python/apollo_openapi/model/open_miss_env_dto.pyi delete mode 100644 python/apollo_openapi/model/open_namespace_dto.py delete mode 100644 python/apollo_openapi/model/open_namespace_dto.pyi delete mode 100644 python/apollo_openapi/model/open_namespace_extend_dto.py delete mode 100644 python/apollo_openapi/model/open_namespace_extend_dto.pyi delete mode 100644 python/apollo_openapi/model/open_namespace_identifier.py delete mode 100644 python/apollo_openapi/model/open_namespace_identifier.pyi delete mode 100644 python/apollo_openapi/model/open_namespace_lock_dto.py delete mode 100644 python/apollo_openapi/model/open_namespace_lock_dto.pyi delete mode 100644 python/apollo_openapi/model/open_namespace_role_user_dto.py delete mode 100644 python/apollo_openapi/model/open_namespace_role_user_dto.pyi delete mode 100644 python/apollo_openapi/model/open_namespace_sync_dto.py delete mode 100644 python/apollo_openapi/model/open_namespace_sync_dto.pyi delete mode 100644 python/apollo_openapi/model/open_namespace_text_model.py delete mode 100644 python/apollo_openapi/model/open_namespace_text_model.pyi delete mode 100644 python/apollo_openapi/model/open_namespace_usage_dto.py delete mode 100644 python/apollo_openapi/model/open_namespace_usage_dto.pyi delete mode 100644 python/apollo_openapi/model/open_organization_dto.py delete mode 100644 python/apollo_openapi/model/open_organization_dto.pyi delete mode 100644 python/apollo_openapi/model/open_permission_condition_dto.py delete mode 100644 python/apollo_openapi/model/open_permission_condition_dto.pyi delete mode 100644 python/apollo_openapi/model/open_release_change_dto.py delete mode 100644 python/apollo_openapi/model/open_release_change_dto.pyi delete mode 100644 python/apollo_openapi/model/open_release_diff_dto.py delete mode 100644 python/apollo_openapi/model/open_release_diff_dto.pyi delete mode 100644 python/apollo_openapi/model/open_release_dto.py delete mode 100644 python/apollo_openapi/model/open_release_dto.pyi delete mode 100644 python/apollo_openapi/model/open_user_dto.py delete mode 100644 python/apollo_openapi/model/open_user_dto.pyi delete mode 100644 python/apollo_openapi/model/open_user_info_dto.py delete mode 100644 python/apollo_openapi/model/open_user_info_dto.pyi delete mode 100644 python/apollo_openapi/model/string_to_string_bool_map.py delete mode 100644 python/apollo_openapi/model/string_to_string_bool_map.pyi delete mode 100644 python/apollo_openapi/models/__init__.py delete mode 100644 python/apollo_openapi/paths/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apollo_audit_logs/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apollo_audit_logs/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apollo_audit_logs/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_by_name_or_type_or_operator/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_by_name_or_type_or_operator/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_by_name_or_type_or_operator/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_data_influences_field/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_data_influences_field/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_data_influences_field/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_op_name/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_op_name/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_op_name/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apollo_audit_properties/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apollo_audit_properties/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apollo_audit_properties/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apollo_audit_trace/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apollo_audit_trace/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apollo_audit_trace/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_appnamespaces/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_appnamespaces/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_appnamespaces/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id/delete.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id/delete.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id/put.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id/put.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/delete.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/delete.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_env_cluster_info/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_env_cluster_info/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_env_cluster_info/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id/delete.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id/delete.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation/put.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation/put.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation/put.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation/put.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/head.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/head.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/delete.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/delete.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/delete.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/delete.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/delete.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/delete.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permission_init/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permission_init/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permission_init/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_role_users/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_role_users/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_role_users/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/delete.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/delete.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_releases_status/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_releases_status/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_releases_status/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_permissions_permission_type/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_permissions_permission_type/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_permissions_permission_type/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_role_users/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_role_users/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_role_users/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_master/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_master/delete.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_master/delete.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_master/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_master/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_role_type/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_role_type/delete.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_role_type/delete.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_role_type/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_role_type/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_authorized/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_authorized/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_authorized/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_by_self/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_by_self/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_by_self/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_envs_env/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_envs_env/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_envs_env/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_search_by_appid_or_name/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_search_by_appid_or_name/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_apps_search_by_appid_or_name/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_configs_export/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_configs_export/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_configs_export/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_configs_import/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_configs_import/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_configs_import/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_consumer_tokens_by_app_id/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_consumer_tokens_by_app_id/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_consumer_tokens_by_app_id/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_consumers/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_consumers/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_consumers/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_consumers/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_consumers/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_consumers_by_app_id/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_consumers_by_app_id/delete.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_consumers_by_app_id/delete.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_consumers_token_assign_role/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_consumers_token_assign_role/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_consumers_token_assign_role/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/delete.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/delete.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/post.pyi delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/delete.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/delete.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/put.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/put.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/put.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/put.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/delete.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/delete.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/put.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/put.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_releases_comparison/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_releases_comparison/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_releases_comparison/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/put.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/put.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_favorites/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_favorites/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_favorites/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_favorites/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_favorites/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_favorites_favorite_id/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_favorites_favorite_id/delete.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_favorites_favorite_id/delete.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_favorites_favorite_id/put.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_favorites_favorite_id/put.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_global_search_item_info_by_key_or_value/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_global_search_item_info_by_key_or_value/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_global_search_item_info_by_key_or_value/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_import/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_import/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_import/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_namespaces/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_namespaces/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_namespaces/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_organizations/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_organizations/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_organizations/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_page_settings/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_page_settings/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_page_settings/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_permissions_root/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_permissions_root/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_permissions_root/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config/delete.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config/delete.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config_find_all_config/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config_find_all_config/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config_find_all_config/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_server_portal_db_config/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_server_portal_db_config/delete.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_server_portal_db_config/delete.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_server_portal_db_config/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_server_portal_db_config/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_server_portal_db_config_find_all_config/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_server_portal_db_config_find_all_config/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_server_portal_db_config_find_all_config/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_system_info/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_system_info/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_system_info/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_system_info_health/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_system_info_health/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_system_info_health/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_system_role_manage_app_master/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_system_role_manage_app_master/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_system_role_manage_app_master/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_system_roles_create_application/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_system_roles_create_application/delete.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_system_roles_create_application/delete.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_system_roles_create_application/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_system_roles_create_application/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_system_roles_create_application/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_system_roles_create_application/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_system_roles_create_application_role_users/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_system_roles_create_application_role_users/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_system_roles_create_application_role_users/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_user/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_user/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_user/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_users/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_users/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_users/get.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_users/post.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_users/post.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_users_enabled/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_users_enabled/put.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_users_enabled/put.pyi delete mode 100644 python/apollo_openapi/paths/openapi_v1_users_user_id/__init__.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_users_user_id/get.py delete mode 100644 python/apollo_openapi/paths/openapi_v1_users_user_id/get.pyi delete mode 100644 python/apollo_openapi/rest.py delete mode 100644 python/apollo_openapi/schemas.py delete mode 100644 python/docs/apis/tags/AccessKeyManagementApi.md delete mode 100644 python/docs/apis/tags/AppManagementApi.md delete mode 100644 python/docs/apis/tags/AppNamespaceManagementApi.md delete mode 100644 python/docs/apis/tags/ClusterManagementApi.md delete mode 100644 python/docs/apis/tags/EnvironmentManagementApi.md delete mode 100644 python/docs/apis/tags/InstanceManagementApi.md delete mode 100644 python/docs/apis/tags/ItemManagementApi.md delete mode 100644 python/docs/apis/tags/NamespaceBranchManagementApi.md delete mode 100644 python/docs/apis/tags/NamespaceLockManagementApi.md delete mode 100644 python/docs/apis/tags/NamespaceManagementApi.md delete mode 100644 python/docs/apis/tags/OrganizationManagementApi.md delete mode 100644 python/docs/apis/tags/PermissionManagementApi.md delete mode 100644 python/docs/apis/tags/PortalManagementApi.md delete mode 100644 python/docs/apis/tags/ReleaseManagementApi.md delete mode 100644 python/docs/apis/tags/UserManagementApi.md delete mode 100644 python/docs/models/ExceptionResponse.md delete mode 100644 python/docs/models/MapString.md delete mode 100644 python/docs/models/NamespaceGrayDelReleaseDTO.md delete mode 100644 python/docs/models/NamespaceReleaseDTO.md delete mode 100644 python/docs/models/OpenAccessKeyDTO.md delete mode 100644 python/docs/models/OpenAppDTO.md delete mode 100644 python/docs/models/OpenAppNamespaceDTO.md delete mode 100644 python/docs/models/OpenAppRoleUserDTO.md delete mode 100644 python/docs/models/OpenClusterDTO.md delete mode 100644 python/docs/models/OpenClusterNamespaceRoleUserDTO.md delete mode 100644 python/docs/models/OpenCreateAppDTO.md delete mode 100644 python/docs/models/OpenCreateNamespaceDTO.md delete mode 100644 python/docs/models/OpenEnvClusterDTO.md delete mode 100644 python/docs/models/OpenEnvClusterInfo.md delete mode 100644 python/docs/models/OpenEnvNamespaceRoleUserDTO.md delete mode 100644 python/docs/models/OpenGrayReleaseRuleDTO.md delete mode 100644 python/docs/models/OpenGrayReleaseRuleItemDTO.md delete mode 100644 python/docs/models/OpenInstanceConfigDTO.md delete mode 100644 python/docs/models/OpenInstanceDTO.md delete mode 100644 python/docs/models/OpenInstancePageDTO.md delete mode 100644 python/docs/models/OpenItemDTO.md delete mode 100644 python/docs/models/OpenItemDiffDTO.md delete mode 100644 python/docs/models/OpenItemExtendDTO.md delete mode 100644 python/docs/models/OpenItemPageDTO.md delete mode 100644 python/docs/models/OpenMissEnvDTO.md delete mode 100644 python/docs/models/OpenNamespaceDTO.md delete mode 100644 python/docs/models/OpenNamespaceExtendDTO.md delete mode 100644 python/docs/models/OpenNamespaceIdentifier.md delete mode 100644 python/docs/models/OpenNamespaceLockDTO.md delete mode 100644 python/docs/models/OpenNamespaceRoleUserDTO.md delete mode 100644 python/docs/models/OpenNamespaceSyncDTO.md delete mode 100644 python/docs/models/OpenNamespaceTextModel.md delete mode 100644 python/docs/models/OpenNamespaceUsageDTO.md delete mode 100644 python/docs/models/OpenOrganizationDto.md delete mode 100644 python/docs/models/OpenPermissionConditionDTO.md delete mode 100644 python/docs/models/OpenReleaseChangeDTO.md delete mode 100644 python/docs/models/OpenReleaseDTO.md delete mode 100644 python/docs/models/OpenReleaseDiffDTO.md delete mode 100644 python/docs/models/OpenUserDTO.md delete mode 100644 python/docs/models/OpenUserInfoDTO.md delete mode 100644 python/docs/models/StringToStringBoolMap.md delete mode 100644 python/git_push.sh delete mode 100644 python/requirements.txt delete mode 100644 python/setup.cfg delete mode 100644 python/setup.py delete mode 100644 python/test-requirements.txt delete mode 100644 python/test/__init__.py delete mode 100644 python/test/test_models/__init__.py delete mode 100644 python/test/test_models/test_exception_response.py delete mode 100644 python/test/test_models/test_map_string.py delete mode 100644 python/test/test_models/test_namespace_gray_del_release_dto.py delete mode 100644 python/test/test_models/test_namespace_release_dto.py delete mode 100644 python/test/test_models/test_open_access_key_dto.py delete mode 100644 python/test/test_models/test_open_app_dto.py delete mode 100644 python/test/test_models/test_open_app_namespace_dto.py delete mode 100644 python/test/test_models/test_open_app_role_user_dto.py delete mode 100644 python/test/test_models/test_open_cluster_dto.py delete mode 100644 python/test/test_models/test_open_cluster_namespace_role_user_dto.py delete mode 100644 python/test/test_models/test_open_create_app_dto.py delete mode 100644 python/test/test_models/test_open_create_namespace_dto.py delete mode 100644 python/test/test_models/test_open_env_cluster_dto.py delete mode 100644 python/test/test_models/test_open_env_cluster_info.py delete mode 100644 python/test/test_models/test_open_env_namespace_role_user_dto.py delete mode 100644 python/test/test_models/test_open_gray_release_rule_dto.py delete mode 100644 python/test/test_models/test_open_gray_release_rule_item_dto.py delete mode 100644 python/test/test_models/test_open_instance_config_dto.py delete mode 100644 python/test/test_models/test_open_instance_dto.py delete mode 100644 python/test/test_models/test_open_instance_page_dto.py delete mode 100644 python/test/test_models/test_open_item_diff_dto.py delete mode 100644 python/test/test_models/test_open_item_dto.py delete mode 100644 python/test/test_models/test_open_item_extend_dto.py delete mode 100644 python/test/test_models/test_open_item_page_dto.py delete mode 100644 python/test/test_models/test_open_miss_env_dto.py delete mode 100644 python/test/test_models/test_open_namespace_dto.py delete mode 100644 python/test/test_models/test_open_namespace_extend_dto.py delete mode 100644 python/test/test_models/test_open_namespace_identifier.py delete mode 100644 python/test/test_models/test_open_namespace_lock_dto.py delete mode 100644 python/test/test_models/test_open_namespace_role_user_dto.py delete mode 100644 python/test/test_models/test_open_namespace_sync_dto.py delete mode 100644 python/test/test_models/test_open_namespace_text_model.py delete mode 100644 python/test/test_models/test_open_namespace_usage_dto.py delete mode 100644 python/test/test_models/test_open_organization_dto.py delete mode 100644 python/test/test_models/test_open_permission_condition_dto.py delete mode 100644 python/test/test_models/test_open_release_change_dto.py delete mode 100644 python/test/test_models/test_open_release_diff_dto.py delete mode 100644 python/test/test_models/test_open_release_dto.py delete mode 100644 python/test/test_models/test_open_user_dto.py delete mode 100644 python/test/test_models/test_open_user_info_dto.py delete mode 100644 python/test/test_models/test_string_to_string_bool_map.py delete mode 100644 python/test/test_paths/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apollo_audit_logs/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apollo_audit_logs/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apollo_audit_logs_by_name_or_type_or_operator/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apollo_audit_logs_by_name_or_type_or_operator/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apollo_audit_logs_data_influences_field/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apollo_audit_logs_data_influences_field/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apollo_audit_logs_op_name/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apollo_audit_logs_op_name/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apollo_audit_properties/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apollo_audit_properties/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apollo_audit_trace/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apollo_audit_trace/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_appnamespaces/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_appnamespaces/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id/test_delete.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id/test_put.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/test_delete.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_env_cluster_info/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_env_cluster_info/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envclusters/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envclusters/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id/test_delete.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation/test_put.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation/test_put.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/test_head.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/test_delete.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/test_delete.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/test_delete.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_miss_envs/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_miss_envs/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_permission_init/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_permission_init/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_role_users/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_role_users/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/test_delete.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_releases_status/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_releases_status/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_permissions_permission_type/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_permissions_permission_type/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_role_users/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_role_users/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_roles_master/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_roles_master/test_delete.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_roles_master/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_roles_role_type/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_roles_role_type/test_delete.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_app_id_roles_role_type/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_authorized/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_authorized/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_by_self/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_by_self/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_envs_env/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_envs_env/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_search_by_appid_or_name/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_apps_search_by_appid_or_name/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_configs_export/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_configs_export/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_configs_import/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_configs_import/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_consumer_tokens_by_app_id/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_consumer_tokens_by_app_id/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_consumers/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_consumers/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_consumers/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_consumers_by_app_id/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_consumers_by_app_id/test_delete.py delete mode 100644 python/test/test_paths/test_openapi_v1_consumers_token_assign_role/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_consumers_token_assign_role/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name/test_delete.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/test_post.py delete 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 delete 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 delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_post.py delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete 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 delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/test_put.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/__init__.py delete 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 delete 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 delete 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 delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/__init__.py delete 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 delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/__init__.py delete 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 delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_instances_by_release/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_instances_by_release/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_releases_comparison/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_releases_comparison/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_releases_release_id/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_releases_release_id/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_rollback/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_rollback/test_put.py delete mode 100644 python/test/test_paths/test_openapi_v1_favorites/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_favorites/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_favorites/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_favorites_favorite_id/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_favorites_favorite_id/test_delete.py delete mode 100644 python/test/test_paths/test_openapi_v1_favorites_favorite_id/test_put.py delete mode 100644 python/test/test_paths/test_openapi_v1_global_search_item_info_by_key_or_value/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_global_search_item_info_by_key_or_value/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_import/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_import/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_namespaces/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_namespaces/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_organizations/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_organizations/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_page_settings/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_page_settings/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_permissions_root/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_permissions_root/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_server_envs_env_config_db_config/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_server_envs_env_config_db_config/test_delete.py delete mode 100644 python/test/test_paths/test_openapi_v1_server_envs_env_config_db_config/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_server_envs_env_config_db_config_find_all_config/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_server_envs_env_config_db_config_find_all_config/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_server_portal_db_config/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_server_portal_db_config/test_delete.py delete mode 100644 python/test/test_paths/test_openapi_v1_server_portal_db_config/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_server_portal_db_config_find_all_config/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_server_portal_db_config_find_all_config/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_system_info/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_system_info/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_system_info_health/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_system_info_health/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_system_role_manage_app_master/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_system_role_manage_app_master/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_system_roles_create_application/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_system_roles_create_application/test_delete.py delete mode 100644 python/test/test_paths/test_openapi_v1_system_roles_create_application/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_system_roles_create_application/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_system_roles_create_application_role_users/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_system_roles_create_application_role_users/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_user/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_user/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_users/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_users/test_get.py delete mode 100644 python/test/test_paths/test_openapi_v1_users/test_post.py delete mode 100644 python/test/test_paths/test_openapi_v1_users_enabled/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_users_enabled/test_put.py delete mode 100644 python/test/test_paths/test_openapi_v1_users_user_id/__init__.py delete mode 100644 python/test/test_paths/test_openapi_v1_users_user_id/test_get.py delete mode 100644 python/tox.ini delete mode 100644 rust/.gitignore delete mode 100644 rust/.openapi-generator-ignore delete mode 100644 rust/.openapi-generator/FILES delete mode 100644 rust/.openapi-generator/VERSION delete mode 100644 rust/.travis.yml delete mode 100644 rust/Cargo.toml delete mode 100644 rust/README.md delete mode 100644 rust/docs/ExceptionResponse.md delete mode 100644 rust/docs/NamespaceGrayDelReleaseDto.md delete mode 100644 rust/docs/NamespaceReleaseDto.md delete mode 100644 rust/docs/OpenAccessKeyDto.md delete mode 100644 rust/docs/OpenAppDto.md delete mode 100644 rust/docs/OpenAppNamespaceDto.md delete mode 100644 rust/docs/OpenAppRoleUserDto.md delete mode 100644 rust/docs/OpenClusterDto.md delete mode 100644 rust/docs/OpenClusterNamespaceRoleUserDto.md delete mode 100644 rust/docs/OpenCreateAppDto.md delete mode 100644 rust/docs/OpenCreateNamespaceDto.md delete mode 100644 rust/docs/OpenEnvClusterDto.md delete mode 100644 rust/docs/OpenEnvClusterInfo.md delete mode 100644 rust/docs/OpenEnvNamespaceRoleUserDto.md delete mode 100644 rust/docs/OpenGrayReleaseRuleDto.md delete mode 100644 rust/docs/OpenGrayReleaseRuleItemDto.md delete mode 100644 rust/docs/OpenInstanceConfigDto.md delete mode 100644 rust/docs/OpenInstanceDto.md delete mode 100644 rust/docs/OpenInstancePageDto.md delete mode 100644 rust/docs/OpenItemDiffDto.md delete mode 100644 rust/docs/OpenItemDto.md delete mode 100644 rust/docs/OpenItemExtendDto.md delete mode 100644 rust/docs/OpenItemPageDto.md delete mode 100644 rust/docs/OpenMissEnvDto.md delete mode 100644 rust/docs/OpenNamespaceDto.md delete mode 100644 rust/docs/OpenNamespaceExtendDto.md delete mode 100644 rust/docs/OpenNamespaceIdentifier.md delete mode 100644 rust/docs/OpenNamespaceLockDto.md delete mode 100644 rust/docs/OpenNamespaceRoleUserDto.md delete mode 100644 rust/docs/OpenNamespaceSyncDto.md delete mode 100644 rust/docs/OpenNamespaceTextModel.md delete mode 100644 rust/docs/OpenNamespaceUsageDto.md delete mode 100644 rust/docs/OpenOrganizationDto.md delete mode 100644 rust/docs/OpenPermissionConditionDto.md delete mode 100644 rust/docs/OpenReleaseChangeDto.md delete mode 100644 rust/docs/OpenReleaseDiffDto.md delete mode 100644 rust/docs/OpenReleaseDto.md delete mode 100644 rust/docs/OpenUserDto.md delete mode 100644 rust/docs/OpenUserInfoDto.md delete mode 100644 rust/git_push.sh delete mode 100644 rust/src/apis/configuration.rs delete mode 100644 rust/src/apis/mod.rs delete mode 100644 rust/src/lib.rs delete mode 100644 rust/src/models/exception_response.rs delete mode 100644 rust/src/models/mod.rs delete mode 100644 rust/src/models/namespace_gray_del_release_dto.rs delete mode 100644 rust/src/models/namespace_release_dto.rs delete mode 100644 rust/src/models/open_access_key_dto.rs delete mode 100644 rust/src/models/open_app_dto.rs delete mode 100644 rust/src/models/open_app_namespace_dto.rs delete mode 100644 rust/src/models/open_app_role_user_dto.rs delete mode 100644 rust/src/models/open_cluster_dto.rs delete mode 100644 rust/src/models/open_cluster_namespace_role_user_dto.rs delete mode 100644 rust/src/models/open_create_app_dto.rs delete mode 100644 rust/src/models/open_create_namespace_dto.rs delete mode 100644 rust/src/models/open_env_cluster_dto.rs delete mode 100644 rust/src/models/open_env_cluster_info.rs delete mode 100644 rust/src/models/open_env_namespace_role_user_dto.rs delete mode 100644 rust/src/models/open_gray_release_rule_dto.rs delete mode 100644 rust/src/models/open_gray_release_rule_item_dto.rs delete mode 100644 rust/src/models/open_instance_config_dto.rs delete mode 100644 rust/src/models/open_instance_dto.rs delete mode 100644 rust/src/models/open_instance_page_dto.rs delete mode 100644 rust/src/models/open_item_diff_dto.rs delete mode 100644 rust/src/models/open_item_dto.rs delete mode 100644 rust/src/models/open_item_extend_dto.rs delete mode 100644 rust/src/models/open_item_page_dto.rs delete mode 100644 rust/src/models/open_miss_env_dto.rs delete mode 100644 rust/src/models/open_namespace_dto.rs delete mode 100644 rust/src/models/open_namespace_extend_dto.rs delete mode 100644 rust/src/models/open_namespace_identifier.rs delete mode 100644 rust/src/models/open_namespace_lock_dto.rs delete mode 100644 rust/src/models/open_namespace_role_user_dto.rs delete mode 100644 rust/src/models/open_namespace_sync_dto.rs delete mode 100644 rust/src/models/open_namespace_text_model.rs delete mode 100644 rust/src/models/open_namespace_usage_dto.rs delete mode 100644 rust/src/models/open_organization_dto.rs delete mode 100644 rust/src/models/open_permission_condition_dto.rs delete mode 100644 rust/src/models/open_release_change_dto.rs delete mode 100644 rust/src/models/open_release_diff_dto.rs delete mode 100644 rust/src/models/open_release_dto.rs delete mode 100644 rust/src/models/open_user_dto.rs delete mode 100644 rust/src/models/open_user_info_dto.rs delete mode 100644 spring-boot2/.mvn/wrapper/MavenWrapperDownloader.java delete mode 100644 spring-boot2/.mvn/wrapper/maven-wrapper.jar delete mode 100644 spring-boot2/.mvn/wrapper/maven-wrapper.properties delete mode 100644 spring-boot2/.openapi-generator-ignore delete mode 100644 spring-boot2/.openapi-generator/FILES delete mode 100644 spring-boot2/.openapi-generator/VERSION delete mode 100644 spring-boot2/README.md delete mode 100755 spring-boot2/mvnw delete mode 100644 spring-boot2/mvnw.cmd delete mode 100644 spring-boot2/pom.xml delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/OpenApiGeneratorApplication.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/RFC3339DateFormat.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/AccessKeyManagementApi.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/AccessKeyManagementApiController.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/AccessKeyManagementApiDelegate.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/ApiUtil.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApi.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiController.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiDelegate.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApi.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApiController.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApiDelegate.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApi.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiController.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiDelegate.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/EnvironmentManagementApi.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/EnvironmentManagementApiController.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/EnvironmentManagementApiDelegate.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApi.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiController.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiDelegate.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApi.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiController.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiDelegate.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApi.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiController.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiDelegate.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApi.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApiController.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApiDelegate.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApi.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiController.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiDelegate.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApi.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiController.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiDelegate.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/PermissionManagementApi.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/PermissionManagementApiController.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/PermissionManagementApiDelegate.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApi.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApiController.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApiDelegate.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApi.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiController.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiDelegate.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/UserManagementApi.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/UserManagementApiController.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/api/UserManagementApiDelegate.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/config/HomeController.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/config/SpringDocConfiguration.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/ExceptionResponse.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceGrayDelReleaseDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceReleaseDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAccessKeyDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppNamespaceDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppRoleUserDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenClusterDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenClusterNamespaceRoleUserDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateAppDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateNamespaceDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterInfo.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvNamespaceRoleUserDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleItemDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceConfigDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstancePageDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDiffDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemExtendDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemPageDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenMissEnvDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceExtendDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceIdentifier.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceLockDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceRoleUserDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceTextModel.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceUsageDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPermissionConditionDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseChangeDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseDiffDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenUserDTO.java delete mode 100644 spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenUserInfoDTO.java delete mode 100644 spring-boot2/src/main/resources/application.properties delete mode 100644 spring-boot2/src/main/resources/openapi.yaml delete mode 100644 spring-boot2/src/test/java/com/apollo/openapi/server/OpenApiGeneratorApplicationTests.java delete mode 100644 templates/python/api_client.handlebars create mode 100644 tests/test_generation_workflow.py delete mode 100644 typescript/.gitignore delete mode 100644 typescript/.npmignore delete mode 100644 typescript/.openapi-generator-ignore delete mode 100644 typescript/.openapi-generator/FILES delete mode 100644 typescript/.openapi-generator/VERSION delete mode 100644 typescript/README.md delete mode 100644 typescript/package.json delete mode 100644 typescript/src/apis/AccessKeyManagementApi.ts delete mode 100644 typescript/src/apis/AppManagementApi.ts delete mode 100644 typescript/src/apis/AppNamespaceManagementApi.ts delete mode 100644 typescript/src/apis/ClusterManagementApi.ts delete mode 100644 typescript/src/apis/EnvironmentManagementApi.ts delete mode 100644 typescript/src/apis/InstanceManagementApi.ts delete mode 100644 typescript/src/apis/ItemManagementApi.ts delete mode 100644 typescript/src/apis/NamespaceBranchManagementApi.ts delete mode 100644 typescript/src/apis/NamespaceLockManagementApi.ts delete mode 100644 typescript/src/apis/NamespaceManagementApi.ts delete mode 100644 typescript/src/apis/OrganizationManagementApi.ts delete mode 100644 typescript/src/apis/PermissionManagementApi.ts delete mode 100644 typescript/src/apis/PortalManagementApi.ts delete mode 100644 typescript/src/apis/ReleaseManagementApi.ts delete mode 100644 typescript/src/apis/UserManagementApi.ts delete mode 100644 typescript/src/apis/index.ts delete mode 100644 typescript/src/index.ts delete mode 100644 typescript/src/models/ExceptionResponse.ts delete mode 100644 typescript/src/models/NamespaceGrayDelReleaseDTO.ts delete mode 100644 typescript/src/models/NamespaceReleaseDTO.ts delete mode 100644 typescript/src/models/OpenAccessKeyDTO.ts delete mode 100644 typescript/src/models/OpenAppDTO.ts delete mode 100644 typescript/src/models/OpenAppNamespaceDTO.ts delete mode 100644 typescript/src/models/OpenAppRoleUserDTO.ts delete mode 100644 typescript/src/models/OpenClusterDTO.ts delete mode 100644 typescript/src/models/OpenClusterNamespaceRoleUserDTO.ts delete mode 100644 typescript/src/models/OpenCreateAppDTO.ts delete mode 100644 typescript/src/models/OpenCreateNamespaceDTO.ts delete mode 100644 typescript/src/models/OpenEnvClusterDTO.ts delete mode 100644 typescript/src/models/OpenEnvClusterInfo.ts delete mode 100644 typescript/src/models/OpenEnvNamespaceRoleUserDTO.ts delete mode 100644 typescript/src/models/OpenGrayReleaseRuleDTO.ts delete mode 100644 typescript/src/models/OpenGrayReleaseRuleItemDTO.ts delete mode 100644 typescript/src/models/OpenInstanceConfigDTO.ts delete mode 100644 typescript/src/models/OpenInstanceDTO.ts delete mode 100644 typescript/src/models/OpenInstancePageDTO.ts delete mode 100644 typescript/src/models/OpenItemDTO.ts delete mode 100644 typescript/src/models/OpenItemDiffDTO.ts delete mode 100644 typescript/src/models/OpenItemExtendDTO.ts delete mode 100644 typescript/src/models/OpenItemPageDTO.ts delete mode 100644 typescript/src/models/OpenMissEnvDTO.ts delete mode 100644 typescript/src/models/OpenNamespaceDTO.ts delete mode 100644 typescript/src/models/OpenNamespaceExtendDTO.ts delete mode 100644 typescript/src/models/OpenNamespaceIdentifier.ts delete mode 100644 typescript/src/models/OpenNamespaceLockDTO.ts delete mode 100644 typescript/src/models/OpenNamespaceRoleUserDTO.ts delete mode 100644 typescript/src/models/OpenNamespaceSyncDTO.ts delete mode 100644 typescript/src/models/OpenNamespaceTextModel.ts delete mode 100644 typescript/src/models/OpenNamespaceUsageDTO.ts delete mode 100644 typescript/src/models/OpenOrganizationDto.ts delete mode 100644 typescript/src/models/OpenPermissionConditionDTO.ts delete mode 100644 typescript/src/models/OpenReleaseChangeDTO.ts delete mode 100644 typescript/src/models/OpenReleaseDTO.ts delete mode 100644 typescript/src/models/OpenReleaseDiffDTO.ts delete mode 100644 typescript/src/models/OpenUserDTO.ts delete mode 100644 typescript/src/models/OpenUserInfoDTO.ts delete mode 100644 typescript/src/models/index.ts delete mode 100644 typescript/src/runtime.ts delete mode 100644 typescript/tsconfig.json diff --git a/.github/workflows/ci_general.yml b/.github/workflows/ci_general.yml index 9c550263..c71c255b 100644 --- a/.github/workflows/ci_general.yml +++ b/.github/workflows/ci_general.yml @@ -38,5 +38,13 @@ jobs: - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 with: python-version: "3.x" + - uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: "17" + - uses: actions/setup-node@v4 + with: + node-version: "20" - run: python -m pip install pyyaml - run: python -m unittest discover tests + - run: ./generate.sh --verify diff --git a/.gitignore b/.gitignore index c1654186..7146375e 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,6 @@ .vscode/** !.vscode/extensions.json **.iml + +# Temporary OpenAPI Generator output +build/generated/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 18836452..ddfebcca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Rename Portal user management contracts from `Portal User Management` to `User Management`. +- Refocus the repository on the OpenAPI spec contract and stop tracking generated Java, Python, TypeScript, Rust, and Spring Boot source trees. +- Change `generate.sh` to produce temporary Apollo Portal Spring interface smoke output under `build/generated/portal` for local and CI verification. ### Fixed @@ -18,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Add Consumer Token support notes to user management contracts, including `ManageUsers`-guarded user lookup and mutation operations. +- Add a generation workflow test to ensure generated source trees remain untracked. ## [0.3.5] - 2026-05-31 diff --git a/README.md b/README.md index 783754f9..1c6ffed2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,20 @@ # apollo-openapi ![OpenAPI](https://img.shields.io/badge/spec-OpenAPI%203.0.1-blue) -[![npm](https://img.shields.io/npm/v/apollo-openapi?label=npm&color=cb3837&logo=npm)](https://www.npmjs.com/package/apollo-openapi) -[![PyPI version](https://img.shields.io/pypi/v/apollo-openapi.svg)](https://pypi.org/project/apollo-openapi) -[![Rust version](https://img.shields.io/crates/v/apollo-openapi.svg)](https://crates.io/crates/apollo-openapi) + +This repository maintains the Apollo OpenAPI contract. The source of truth is +[`apollo-openapi.yaml`](apollo-openapi.yaml). + +Generated code is treated as a temporary verification artifact, not as +maintained source code or an official Apollo SDK. Apollo Portal pins a released +`apollo-openapi.yaml` tag and generates its Spring OpenAPI interfaces during +the Portal build. + +To verify the spec can still generate the Portal OpenAPI surface: + +```bash +./generate.sh --verify +``` + +The generated files are written under `build/generated/` and are intentionally +ignored by git. diff --git a/clean.sh b/clean.sh index 0fb5548e..e81df868 100755 --- a/clean.sh +++ b/clean.sh @@ -1,13 +1,5 @@ #!/bin/bash -set -e +set -euo pipefail -JAVA_DIR="java" -PYTHON_DIR="python" -RUST_DIR="rust" -TS_DIR="typescript" - -echo "🧹 Cleaning old generated SDKs..." -rm -rf "$JAVA_DIR" -rm -rf "$PYTHON_DIR" -rm -rf "$RUST_DIR" -rm -rf "$TS_DIR" +echo "Cleaning temporary generated artifacts..." +rm -rf build/generated/ diff --git a/generate.sh b/generate.sh index 9af55170..3fa8ca8e 100755 --- a/generate.sh +++ b/generate.sh @@ -1,247 +1,87 @@ #!/bin/bash -set -e - -SPEC_FILE="apollo-openapi.yaml" -JAVA_CLIENT_DIR="java-client" -SPRING_BOOT2_DIR="spring-boot2" -PYTHON_DIR="python" -RUST_DIR="rust" -TS_DIR="typescript" -PYTHON_TEMPLATE_DIR="templates/python" -OPENAPI_GENERATOR_VERSION="6.6.0" - -if command -v openapi-generator >/dev/null 2>&1; then - OPENAPI_GENERATOR=(openapi-generator) +set -euo pipefail + +SPEC_FILE="${SPEC_FILE:-apollo-openapi.yaml}" +GENERATED_ROOT="build/generated" +PORTAL_OUTPUT_DIR="$GENERATED_ROOT/portal" +OPENAPI_GENERATOR_VERSION="7.20.0" + +usage() { + cat <<'EOF' +Usage: ./generate.sh [--verify] + +Generates the Apollo Portal OpenAPI Spring interface smoke output under +build/generated/portal. Generated code is a temporary verification artifact and +is not tracked by this repository. + +Options: + --verify Generate and assert the expected Portal compatibility surface. + --help Show this help. +EOF +} + +VERIFY=false +for arg in "$@"; do + case "$arg" in + --verify) + VERIFY=true + ;; + --help|-h) + usage + exit 0 + ;; + *) + echo "Unknown argument: $arg" >&2 + usage >&2 + exit 2 + ;; + esac +done + +if command -v npx >/dev/null 2>&1; then + OPENAPI_GENERATOR=(npx --yes @openapitools/openapi-generator-cli) elif command -v openapi-generator-cli >/dev/null 2>&1; then OPENAPI_GENERATOR=(openapi-generator-cli) -elif command -v npx >/dev/null 2>&1; then - OPENAPI_GENERATOR=(npx @openapitools/openapi-generator-cli) +elif command -v openapi-generator >/dev/null 2>&1; then + OPENAPI_GENERATOR=(openapi-generator) else - echo "openapi-generator is required. Install openapi-generator or make npx available." + echo "openapi-generator, openapi-generator-cli, or npx is required." >&2 exit 127 fi export OPENAPI_GENERATOR_VERSION -JAVA_VERSION_LINE="$(java -version 2>&1 | head -n 1)" +JAVA_VERSION_LINE="$(java -version 2>&1 | head -n 1 || true)" if [[ "$JAVA_VERSION_LINE" =~ \"([0-9]+) ]] && [ "${BASH_REMATCH[1]}" -ge 9 ]; then export JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS:+$JAVA_TOOL_OPTIONS }--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED" fi -echo "🧹 Cleaning old generated SDKs..." -rm -rf "$JAVA_CLIENT_DIR" -rm -rf "$SPRING_BOOT2_DIR" -rm -rf "$PYTHON_DIR" -rm -rf "$RUST_DIR" -rm -rf "$TS_DIR" - -echo "🚀 Generating Python SDK..." -"${OPENAPI_GENERATOR[@]}" generate \ - -i "$SPEC_FILE" \ - -g python \ - -o "$PYTHON_DIR" \ - -t "$PYTHON_TEMPLATE_DIR" \ - --package-name apollo_openapi \ - --additional-properties=projectName=apollo-openapi,packageVersion=0.3.8 - -echo "🚀 Generating TypeScript SDK..." -"${OPENAPI_GENERATOR[@]}" generate \ - -i "$SPEC_FILE" \ - -g typescript-fetch \ - -o "$TS_DIR" \ - --additional-properties=npmName=apollo-openapi,npmVersion=0.3.8,typescriptThreePlus=true - -echo "🚀 Generating Java Client SDK..." -"${OPENAPI_GENERATOR[@]}" generate \ - -i "$SPEC_FILE" \ - -g java \ - -o "$JAVA_CLIENT_DIR" \ - --additional-properties hideGenerationTimestamp=true \ - --additional-properties=groupId=com.apollo,artifactId=apollo-openapi-client,artifactVersion=0.3.8,packageName=com.apollo.openapi.client - -echo "🔧 Preserving Java client operator overloads..." -python3 - <<'PY' -from pathlib import Path - -api_file = Path("java-client/src/main/java/org/openapitools/client/api/UserManagementApi.java") -content = api_file.read_text(encoding="utf-8") - - -def add_overload_before(marker, overload): - global content - if overload in content: - return - if marker not in content: - raise SystemExit(f"Could not find Java client overload marker:\n{marker}") - content = content.replace(marker, overload + marker, 1) - - -def add_overload_after(marker, overload): - global content - if overload in content: - return - if marker not in content: - raise SystemExit(f"Could not find Java client overload marker:\n{marker}") - content = content.replace(marker, marker + overload, 1) - +echo "Cleaning generated Portal smoke output..." +rm -rf "$PORTAL_OUTPUT_DIR" -add_overload_before( - """ @SuppressWarnings("rawtypes") - private okhttp3.Call changeUserEnabledValidateBeforeCall""", - """ /** - * Build call for changeUserEnabled. - * This overload preserves the Java client API for callers that do not need the optional operator query parameter. - */ - public okhttp3.Call changeUserEnabledCall(OpenUserDTO openUserDTO, final ApiCallback _callback) throws ApiException { - return changeUserEnabledCall(openUserDTO, null, _callback); - } - -""", -) -add_overload_after( - """ public void changeUserEnabled(OpenUserDTO openUserDTO, String operator) throws ApiException { - changeUserEnabledWithHttpInfo(openUserDTO, operator); - } - -""", - """ /** - * 修改用户启用状态(new added) - * This overload preserves the Java client API for callers that do not need the optional operator query parameter. - */ - public void changeUserEnabled(OpenUserDTO openUserDTO) throws ApiException { - changeUserEnabled(openUserDTO, null); - } - -""", -) -add_overload_before( - """ /** - * 修改用户启用状态(new added) (asynchronously) - * PUT /openapi/v1/users/enabled""", - """ /** - * 修改用户启用状态(new added) - * This overload preserves the Java client API for callers that do not need the optional operator query parameter. - */ - public ApiResponse changeUserEnabledWithHttpInfo(OpenUserDTO openUserDTO) throws ApiException { - return changeUserEnabledWithHttpInfo(openUserDTO, null); - } - -""", -) -add_overload_before( - """ /** - * Build call for createOrUpdateUser - * @param openUserDTO""", - """ - /** - * 修改用户启用状态(new added) (asynchronously) - * This overload preserves the Java client API for callers that do not need the optional operator query parameter. - */ - public okhttp3.Call changeUserEnabledAsync(OpenUserDTO openUserDTO, final ApiCallback _callback) throws ApiException { - return changeUserEnabledAsync(openUserDTO, null, _callback); - } - -""", -) -add_overload_before( - """ @SuppressWarnings("rawtypes") - private okhttp3.Call createOrUpdateUserValidateBeforeCall""", - """ /** - * Build call for createOrUpdateUser. - * This overload preserves the Java client API for callers that do not need the optional operator query parameter. - */ - public okhttp3.Call createOrUpdateUserCall(OpenUserDTO openUserDTO, Boolean isCreate, final ApiCallback _callback) throws ApiException { - return createOrUpdateUserCall(openUserDTO, isCreate, null, _callback); - } - -""", -) -add_overload_after( - """ public void createOrUpdateUser(OpenUserDTO openUserDTO, Boolean isCreate, String operator) throws ApiException { - createOrUpdateUserWithHttpInfo(openUserDTO, isCreate, operator); - } - -""", - """ /** - * 创建或更新用户(new added) - * This overload preserves the Java client API for callers that do not need the optional operator query parameter. - */ - public void createOrUpdateUser(OpenUserDTO openUserDTO, Boolean isCreate) throws ApiException { - createOrUpdateUser(openUserDTO, isCreate, null); - } - -""", -) -add_overload_before( - """ /** - * 创建或更新用户(new added) (asynchronously) - * POST /openapi/v1/users""", - """ /** - * 创建或更新用户(new added) - * This overload preserves the Java client API for callers that do not need the optional operator query parameter. - */ - public ApiResponse createOrUpdateUserWithHttpInfo(OpenUserDTO openUserDTO, Boolean isCreate) throws ApiException { - return createOrUpdateUserWithHttpInfo(openUserDTO, isCreate, null); - } - -""", -) -add_overload_before( - """ /** - * Build call for getCurrentUser - * @param _callback""", - """ - /** - * 创建或更新用户(new added) (asynchronously) - * This overload preserves the Java client API for callers that do not need the optional operator query parameter. - */ - public okhttp3.Call createOrUpdateUserAsync(OpenUserDTO openUserDTO, Boolean isCreate, final ApiCallback _callback) throws ApiException { - return createOrUpdateUserAsync(openUserDTO, isCreate, null, _callback); - } -""", -) - -api_file.write_text(content, encoding="utf-8") -PY - -echo "🚀 Generating Spring Boot 2 Server..." +echo "Generating Apollo Portal Spring OpenAPI interfaces..." "${OPENAPI_GENERATOR[@]}" generate \ -i "$SPEC_FILE" \ -g spring \ - -o "$SPRING_BOOT2_DIR" \ - --additional-properties hideGenerationTimestamp=true \ - --additional-properties=groupId=com.apollo,artifactId=apollo-openapi-server,artifactVersion=0.3.8,packageName=com.apollo.openapi.server,basePackage=com.apollo.openapi.server,configPackage=com.apollo.openapi.server.config,modelPackage=com.apollo.openapi.server.model,apiPackage=com.apollo.openapi.server.api,library=spring-boot,java8=true,interfaceOnly=false,delegatePattern=true,useTags=true - -echo "📦 Adding Maven Wrapper to Spring Boot 2 project..." -cd "$SPRING_BOOT2_DIR" -mvn -N io.takari:maven:wrapper -Dmaven=3.8.6 - -cd .. - -echo "💡 Spring Boot 2 project ready! To start the server, run:" -echo " cd $SPRING_BOOT2_DIR && ./mvnw spring-boot:run" - -if [ "$1" = "--start-spring-boot" ]; then - echo "🚀 Starting Spring Boot server..." - cd "$SPRING_BOOT2_DIR" - ./mvnw spring-boot:run & - echo "✅ Spring Boot server started in background. Access it at http://localhost:8080" - cd .. + -o "$PORTAL_OUTPUT_DIR" \ + --additional-properties=apiPackage=com.ctrip.framework.apollo.openapi.api,modelPackage=com.ctrip.framework.apollo.openapi.model,invokerPackage=com.ctrip.framework.apollo.openapi.invoker,interfaceOnly=true,useTags=true,dateLibrary=java8,useSpringBoot4=true \ + --skip-validate-spec + +if [ "$VERIFY" = true ]; then + API_DIR="$PORTAL_OUTPUT_DIR/src/main/java/com/ctrip/framework/apollo/openapi/api" + MODEL_DIR="$PORTAL_OUTPUT_DIR/src/main/java/com/ctrip/framework/apollo/openapi/model" + + test -f "$API_DIR/UserManagementApi.java" + test ! -f "$API_DIR/PortalUserManagementApi.java" + + for model_name in \ + OpenConsumerCreateRequestDTO \ + OpenConsumerInfoDTO \ + OpenConsumerSummaryDTO \ + OpenConsumerTokenDTO + do + test ! -f "$MODEL_DIR/$model_name.java" + done + + echo "Portal generation verification passed." fi - -echo "🚀 Generating Rust SDK..." -"${OPENAPI_GENERATOR[@]}" generate \ - -i "$SPEC_FILE" \ - -g rust \ - -o "$RUST_DIR" \ - --global-property models,supportingFiles \ - --additional-properties=packageName=apollo-openapi,packageVersion=0.3.8 - -echo "✅ SDK generation complete." - -# this is for normalizing generated files and reducing version-only churn. -echo "Cleaning files (trailing spaces, CRLF, EOF newlines, generated version comments)..." -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/^[ \t]*\* The version of the OpenAPI document: [^\r\n]*\R//mg; s/^[ \t]*The version of the OpenAPI document: [^\r\n]*\R//mg; s/^body \| Unset \| body was not defined \|$/body | Unset | body was not defined | N\/A/mg; s/\s*\z/\n/s' -echo "Cleaning files (trailing spaces, CRLF, EOF newlines, generated version comments)... Done!" diff --git a/java-client/.github/workflows/maven.yml b/java-client/.github/workflows/maven.yml deleted file mode 100644 index 7f4a68d6..00000000 --- a/java-client/.github/workflows/maven.yml +++ /dev/null @@ -1,30 +0,0 @@ -# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven -# -# This file is auto-generated by OpenAPI Generator (https://openapi-generator.tech) - -name: Java CI with Maven - -on: - push: - branches: [ main, master ] - pull_request: - branches: [ main, master ] - -jobs: - build: - name: Build Apollo OpenAPI - runs-on: ubuntu-latest - strategy: - matrix: - java: [ '8' ] - steps: - - uses: actions/checkout@v2 - - name: Set up JDK - uses: actions/setup-java@v2 - with: - java-version: ${{ matrix.java }} - distribution: 'temurin' - cache: maven - - name: Build with Maven - run: mvn -B package --no-transfer-progress --file pom.xml diff --git a/java-client/.gitignore b/java-client/.gitignore deleted file mode 100644 index a530464a..00000000 --- a/java-client/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -*.class - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.jar -*.war -*.ear - -# exclude jar for gradle wrapper -!gradle/wrapper/*.jar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - -# build files -**/target -target -.gradle -build diff --git a/java-client/.openapi-generator-ignore b/java-client/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/java-client/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/java-client/.openapi-generator/FILES b/java-client/.openapi-generator/FILES deleted file mode 100644 index 30a5901d..00000000 --- a/java-client/.openapi-generator/FILES +++ /dev/null @@ -1,197 +0,0 @@ -.github/workflows/maven.yml -.gitignore -.openapi-generator-ignore -.travis.yml -README.md -api/openapi.yaml -build.gradle -build.sbt -docs/AccessKeyManagementApi.md -docs/AppManagementApi.md -docs/AppNamespaceManagementApi.md -docs/ClusterManagementApi.md -docs/EnvironmentManagementApi.md -docs/ExceptionResponse.md -docs/InstanceManagementApi.md -docs/ItemManagementApi.md -docs/NamespaceBranchManagementApi.md -docs/NamespaceGrayDelReleaseDTO.md -docs/NamespaceLockManagementApi.md -docs/NamespaceManagementApi.md -docs/NamespaceReleaseDTO.md -docs/OpenAccessKeyDTO.md -docs/OpenAppDTO.md -docs/OpenAppNamespaceDTO.md -docs/OpenAppRoleUserDTO.md -docs/OpenClusterDTO.md -docs/OpenClusterNamespaceRoleUserDTO.md -docs/OpenCreateAppDTO.md -docs/OpenCreateNamespaceDTO.md -docs/OpenEnvClusterDTO.md -docs/OpenEnvClusterInfo.md -docs/OpenEnvNamespaceRoleUserDTO.md -docs/OpenGrayReleaseRuleDTO.md -docs/OpenGrayReleaseRuleItemDTO.md -docs/OpenInstanceConfigDTO.md -docs/OpenInstanceDTO.md -docs/OpenInstancePageDTO.md -docs/OpenItemDTO.md -docs/OpenItemDiffDTO.md -docs/OpenItemExtendDTO.md -docs/OpenItemPageDTO.md -docs/OpenMissEnvDTO.md -docs/OpenNamespaceDTO.md -docs/OpenNamespaceExtendDTO.md -docs/OpenNamespaceIdentifier.md -docs/OpenNamespaceLockDTO.md -docs/OpenNamespaceRoleUserDTO.md -docs/OpenNamespaceSyncDTO.md -docs/OpenNamespaceTextModel.md -docs/OpenNamespaceUsageDTO.md -docs/OpenOrganizationDto.md -docs/OpenPermissionConditionDTO.md -docs/OpenReleaseChangeDTO.md -docs/OpenReleaseDTO.md -docs/OpenReleaseDiffDTO.md -docs/OpenUserDTO.md -docs/OpenUserInfoDTO.md -docs/OrganizationManagementApi.md -docs/PermissionManagementApi.md -docs/PortalManagementApi.md -docs/ReleaseManagementApi.md -docs/UserManagementApi.md -git_push.sh -gradle.properties -gradle/wrapper/gradle-wrapper.jar -gradle/wrapper/gradle-wrapper.properties -gradlew -gradlew.bat -pom.xml -settings.gradle -src/main/AndroidManifest.xml -src/main/java/org/openapitools/client/ApiCallback.java -src/main/java/org/openapitools/client/ApiClient.java -src/main/java/org/openapitools/client/ApiException.java -src/main/java/org/openapitools/client/ApiResponse.java -src/main/java/org/openapitools/client/Configuration.java -src/main/java/org/openapitools/client/GzipRequestInterceptor.java -src/main/java/org/openapitools/client/JSON.java -src/main/java/org/openapitools/client/Pair.java -src/main/java/org/openapitools/client/ProgressRequestBody.java -src/main/java/org/openapitools/client/ProgressResponseBody.java -src/main/java/org/openapitools/client/ServerConfiguration.java -src/main/java/org/openapitools/client/ServerVariable.java -src/main/java/org/openapitools/client/StringUtil.java -src/main/java/org/openapitools/client/api/AccessKeyManagementApi.java -src/main/java/org/openapitools/client/api/AppManagementApi.java -src/main/java/org/openapitools/client/api/AppNamespaceManagementApi.java -src/main/java/org/openapitools/client/api/ClusterManagementApi.java -src/main/java/org/openapitools/client/api/EnvironmentManagementApi.java -src/main/java/org/openapitools/client/api/InstanceManagementApi.java -src/main/java/org/openapitools/client/api/ItemManagementApi.java -src/main/java/org/openapitools/client/api/NamespaceBranchManagementApi.java -src/main/java/org/openapitools/client/api/NamespaceLockManagementApi.java -src/main/java/org/openapitools/client/api/NamespaceManagementApi.java -src/main/java/org/openapitools/client/api/OrganizationManagementApi.java -src/main/java/org/openapitools/client/api/PermissionManagementApi.java -src/main/java/org/openapitools/client/api/PortalManagementApi.java -src/main/java/org/openapitools/client/api/ReleaseManagementApi.java -src/main/java/org/openapitools/client/api/UserManagementApi.java -src/main/java/org/openapitools/client/auth/ApiKeyAuth.java -src/main/java/org/openapitools/client/auth/Authentication.java -src/main/java/org/openapitools/client/auth/HttpBasicAuth.java -src/main/java/org/openapitools/client/auth/HttpBearerAuth.java -src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java -src/main/java/org/openapitools/client/model/ExceptionResponse.java -src/main/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTO.java -src/main/java/org/openapitools/client/model/NamespaceReleaseDTO.java -src/main/java/org/openapitools/client/model/OpenAccessKeyDTO.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/OpenAppRoleUserDTO.java -src/main/java/org/openapitools/client/model/OpenClusterDTO.java -src/main/java/org/openapitools/client/model/OpenClusterNamespaceRoleUserDTO.java -src/main/java/org/openapitools/client/model/OpenCreateAppDTO.java -src/main/java/org/openapitools/client/model/OpenCreateNamespaceDTO.java -src/main/java/org/openapitools/client/model/OpenEnvClusterDTO.java -src/main/java/org/openapitools/client/model/OpenEnvClusterInfo.java -src/main/java/org/openapitools/client/model/OpenEnvNamespaceRoleUserDTO.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/OpenInstancePageDTO.java -src/main/java/org/openapitools/client/model/OpenItemDTO.java -src/main/java/org/openapitools/client/model/OpenItemDiffDTO.java -src/main/java/org/openapitools/client/model/OpenItemExtendDTO.java -src/main/java/org/openapitools/client/model/OpenItemPageDTO.java -src/main/java/org/openapitools/client/model/OpenMissEnvDTO.java -src/main/java/org/openapitools/client/model/OpenNamespaceDTO.java -src/main/java/org/openapitools/client/model/OpenNamespaceExtendDTO.java -src/main/java/org/openapitools/client/model/OpenNamespaceIdentifier.java -src/main/java/org/openapitools/client/model/OpenNamespaceLockDTO.java -src/main/java/org/openapitools/client/model/OpenNamespaceRoleUserDTO.java -src/main/java/org/openapitools/client/model/OpenNamespaceSyncDTO.java -src/main/java/org/openapitools/client/model/OpenNamespaceTextModel.java -src/main/java/org/openapitools/client/model/OpenNamespaceUsageDTO.java -src/main/java/org/openapitools/client/model/OpenOrganizationDto.java -src/main/java/org/openapitools/client/model/OpenPermissionConditionDTO.java -src/main/java/org/openapitools/client/model/OpenReleaseChangeDTO.java -src/main/java/org/openapitools/client/model/OpenReleaseDTO.java -src/main/java/org/openapitools/client/model/OpenReleaseDiffDTO.java -src/main/java/org/openapitools/client/model/OpenUserDTO.java -src/main/java/org/openapitools/client/model/OpenUserInfoDTO.java -src/test/java/org/openapitools/client/api/AccessKeyManagementApiTest.java -src/test/java/org/openapitools/client/api/AppManagementApiTest.java -src/test/java/org/openapitools/client/api/AppNamespaceManagementApiTest.java -src/test/java/org/openapitools/client/api/ClusterManagementApiTest.java -src/test/java/org/openapitools/client/api/EnvironmentManagementApiTest.java -src/test/java/org/openapitools/client/api/InstanceManagementApiTest.java -src/test/java/org/openapitools/client/api/ItemManagementApiTest.java -src/test/java/org/openapitools/client/api/NamespaceBranchManagementApiTest.java -src/test/java/org/openapitools/client/api/NamespaceLockManagementApiTest.java -src/test/java/org/openapitools/client/api/NamespaceManagementApiTest.java -src/test/java/org/openapitools/client/api/OrganizationManagementApiTest.java -src/test/java/org/openapitools/client/api/PermissionManagementApiTest.java -src/test/java/org/openapitools/client/api/PortalManagementApiTest.java -src/test/java/org/openapitools/client/api/ReleaseManagementApiTest.java -src/test/java/org/openapitools/client/api/UserManagementApiTest.java -src/test/java/org/openapitools/client/model/ExceptionResponseTest.java -src/test/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTOTest.java -src/test/java/org/openapitools/client/model/NamespaceReleaseDTOTest.java -src/test/java/org/openapitools/client/model/OpenAccessKeyDTOTest.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/OpenAppRoleUserDTOTest.java -src/test/java/org/openapitools/client/model/OpenClusterDTOTest.java -src/test/java/org/openapitools/client/model/OpenClusterNamespaceRoleUserDTOTest.java -src/test/java/org/openapitools/client/model/OpenCreateAppDTOTest.java -src/test/java/org/openapitools/client/model/OpenCreateNamespaceDTOTest.java -src/test/java/org/openapitools/client/model/OpenEnvClusterDTOTest.java -src/test/java/org/openapitools/client/model/OpenEnvClusterInfoTest.java -src/test/java/org/openapitools/client/model/OpenEnvNamespaceRoleUserDTOTest.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/OpenInstancePageDTOTest.java -src/test/java/org/openapitools/client/model/OpenItemDTOTest.java -src/test/java/org/openapitools/client/model/OpenItemDiffDTOTest.java -src/test/java/org/openapitools/client/model/OpenItemExtendDTOTest.java -src/test/java/org/openapitools/client/model/OpenItemPageDTOTest.java -src/test/java/org/openapitools/client/model/OpenMissEnvDTOTest.java -src/test/java/org/openapitools/client/model/OpenNamespaceDTOTest.java -src/test/java/org/openapitools/client/model/OpenNamespaceExtendDTOTest.java -src/test/java/org/openapitools/client/model/OpenNamespaceIdentifierTest.java -src/test/java/org/openapitools/client/model/OpenNamespaceLockDTOTest.java -src/test/java/org/openapitools/client/model/OpenNamespaceRoleUserDTOTest.java -src/test/java/org/openapitools/client/model/OpenNamespaceSyncDTOTest.java -src/test/java/org/openapitools/client/model/OpenNamespaceTextModelTest.java -src/test/java/org/openapitools/client/model/OpenNamespaceUsageDTOTest.java -src/test/java/org/openapitools/client/model/OpenOrganizationDtoTest.java -src/test/java/org/openapitools/client/model/OpenPermissionConditionDTOTest.java -src/test/java/org/openapitools/client/model/OpenReleaseChangeDTOTest.java -src/test/java/org/openapitools/client/model/OpenReleaseDTOTest.java -src/test/java/org/openapitools/client/model/OpenReleaseDiffDTOTest.java -src/test/java/org/openapitools/client/model/OpenUserDTOTest.java -src/test/java/org/openapitools/client/model/OpenUserInfoDTOTest.java diff --git a/java-client/.openapi-generator/VERSION b/java-client/.openapi-generator/VERSION deleted file mode 100644 index 826f5ce0..00000000 --- a/java-client/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 diff --git a/java-client/.travis.yml b/java-client/.travis.yml deleted file mode 100644 index 1b6741c0..00000000 --- a/java-client/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ -# -# Generated by OpenAPI Generator: https://openapi-generator.tech -# -# Ref: https://docs.travis-ci.com/user/languages/java/ -# -language: java -jdk: - - openjdk12 - - openjdk11 - - openjdk10 - - openjdk9 - - openjdk8 -before_install: - # ensure gradlew has proper permission - - chmod a+x ./gradlew -script: - # test using maven - #- mvn test - # test using gradle - - gradle test - # test using sbt - # - sbt test diff --git a/java-client/README.md b/java-client/README.md deleted file mode 100644 index b761a887..00000000 --- a/java-client/README.md +++ /dev/null @@ -1,340 +0,0 @@ -# apollo-openapi-client - -Apollo OpenAPI -- API version: 0.3.8 - -

Apollo配置中心OpenAPI接口文档

- -

认证方式

-

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

- -

获取 Token 的方式:

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

使用示例

-
curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\
--H \"Authorization: your_token_here\"
- - - -*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)* - - -## Requirements - -Building the API client library requires: -1. Java 1.8+ -2. Maven (3.8.3+)/Gradle (7.2+) - -## Installation - -To install the API client library to your local Maven repository, simply execute: - -```shell -mvn clean install -``` - -To deploy it to a remote Maven repository instead, configure the settings of the repository and execute: - -```shell -mvn clean deploy -``` - -Refer to the [OSSRH Guide](http://central.sonatype.org/pages/ossrh-guide.html) for more information. - -### Maven users - -Add this dependency to your project's POM: - -```xml - - com.apollo - apollo-openapi-client - 0.3.8 - compile - -``` - -### Gradle users - -Add this dependency to your project's build file: - -```groovy - repositories { - mavenCentral() // Needed if the 'apollo-openapi-client' jar has been published to maven central. - mavenLocal() // Needed if the 'apollo-openapi-client' jar has been published to the local maven repo. - } - - dependencies { - implementation "com.apollo:apollo-openapi-client:0.3.8" - } -``` - -### Others - -At first generate the JAR by executing: - -```shell -mvn clean package -``` - -Then manually install the following JARs: - -* `target/apollo-openapi-client-0.3.8.jar` -* `target/lib/*.jar` - -## Getting Started - -Please follow the [installation](#installation) instruction and execute the following Java code: - -```java - -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AccessKeyManagementApi; - -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"); - - AccessKeyManagementApi apiInstance = new AccessKeyManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String operator = "operator_example"; // String | 操作人用户名 - try { - OpenAccessKeyDTO result = apiInstance.createAccessKey(appId, env, operator); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AccessKeyManagementApi#createAccessKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} - -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AccessKeyManagementApi* | [**createAccessKey**](docs/AccessKeyManagementApi.md#createAccessKey) | **POST** /openapi/v1/apps/{appId}/envs/{env}/accesskeys | 创建AccessKey -*AccessKeyManagementApi* | [**deleteAccessKey**](docs/AccessKeyManagementApi.md#deleteAccessKey) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId} | 删除AccessKey -*AccessKeyManagementApi* | [**disableAccessKey**](docs/AccessKeyManagementApi.md#disableAccessKey) | **PUT** /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/deactivation | 禁用AccessKey -*AccessKeyManagementApi* | [**enableAccessKey**](docs/AccessKeyManagementApi.md#enableAccessKey) | **PUT** /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/activation | 启用AccessKey -*AccessKeyManagementApi* | [**findAccessKeys**](docs/AccessKeyManagementApi.md#findAccessKeys) | **GET** /openapi/v1/apps/{appId}/envs/{env}/accesskeys | 查找AccessKey -*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* | [**getAppsBySelf**](docs/AppManagementApi.md#getAppsBySelf) | **GET** /openapi/v1/apps/by-self | 获取当前Consumer/User的应用列表(分页)(new added) -*AppManagementApi* | [**getEnvClusterInfo**](docs/AppManagementApi.md#getEnvClusterInfo) | **GET** /openapi/v1/apps/{appId}/env-cluster-info | 获取应用环境集群详情(new added) -*AppManagementApi* | [**getEnvClusters**](docs/AppManagementApi.md#getEnvClusters) | **GET** /openapi/v1/apps/{appId}/envclusters | 获取应用的环境集群信息 (original openapi) -*AppManagementApi* | [**updateApp**](docs/AppManagementApi.md#updateApp) | **PUT** /openapi/v1/apps/{appId} | 更新应用(new added) -*AppNamespaceManagementApi* | [**createAppNamespace**](docs/AppNamespaceManagementApi.md#createAppNamespace) | **POST** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace (original openapi) -*AppNamespaceManagementApi* | [**deleteAppNamespace**](docs/AppNamespaceManagementApi.md#deleteAppNamespace) | **DELETE** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace (new added) -*AppNamespaceManagementApi* | [**findAppNamespace**](docs/AppNamespaceManagementApi.md#findAppNamespace) | **GET** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace (new added) -*AppNamespaceManagementApi* | [**findAppNamespaceUsage**](docs/AppNamespaceManagementApi.md#findAppNamespaceUsage) | **GET** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage | 查询appnamespace使用情况(new added) -*AppNamespaceManagementApi* | [**getAppNamespaces**](docs/AppNamespaceManagementApi.md#getAppNamespaces) | **GET** /openapi/v1/appnamespaces | 获取所有公共AppNamespace (new added) -*AppNamespaceManagementApi* | [**getAppNamespacesByAppId**](docs/AppNamespaceManagementApi.md#getAppNamespacesByAppId) | **GET** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace (new added) -*AppNamespaceManagementApi* | [**getPublicAppNamespaceInstances**](docs/AppNamespaceManagementApi.md#getPublicAppNamespaceInstances) | **GET** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 (new added) -*ClusterManagementApi* | [**createCluster**](docs/ClusterManagementApi.md#createCluster) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters | 创建集群 (original openapi) -*ClusterManagementApi* | [**deleteCluster**](docs/ClusterManagementApi.md#deleteCluster) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 删除集群 (new added) -*ClusterManagementApi* | [**getCluster**](docs/ClusterManagementApi.md#getCluster) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 获取指定集群信息 (original openapi) -*EnvironmentManagementApi* | [**getEnvs**](docs/EnvironmentManagementApi.md#getEnvs) | **GET** /openapi/v1/envs | 获取所有环境 -*InstanceManagementApi* | [**getByNamespace**](docs/InstanceManagementApi.md#getByNamespace) | **GET** /openapi/v1/envs/{env}/instances/by-namespace | 根据namespaceName查询实例(new added) -*InstanceManagementApi* | [**getByRelease**](docs/InstanceManagementApi.md#getByRelease) | **GET** /openapi/v1/envs/{env}/instances/by-release | 根据发布版本查询实例(支持分页) (new added) -*InstanceManagementApi* | [**getByReleasesAndNamespaceNotIn**](docs/InstanceManagementApi.md#getByReleasesAndNamespaceNotIn) | **GET** /openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in | 查询不在指定发布版本中的实例 (new added) -*InstanceManagementApi* | [**getInstanceCountByNamespace**](docs/InstanceManagementApi.md#getInstanceCountByNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 (original openapi) -*ItemManagementApi* | [**batchUpdateItemsByText**](docs/ItemManagementApi.md#batchUpdateItemsByText) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 通过文本批量修改配置项 (new added) -*ItemManagementApi* | [**compareItems**](docs/ItemManagementApi.md#compareItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff | 对比命名空间配置差异 (new added) -*ItemManagementApi* | [**createItem**](docs/ItemManagementApi.md#createItem) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 (original openapi) -*ItemManagementApi* | [**deleteItem**](docs/ItemManagementApi.md#deleteItem) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置项 (original openapi) -*ItemManagementApi* | [**deleteItemByEncodedKey**](docs/ItemManagementApi.md#deleteItemByEncodedKey) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key删除配置项 (original openapi) -*ItemManagementApi* | [**findBranchItems**](docs/ItemManagementApi.md#findBranchItems) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 (new added) -*ItemManagementApi* | [**findItemsByNamespace**](docs/ItemManagementApi.md#findItemsByNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 获取命名空间下的配置项列表 (original openapi) -*ItemManagementApi* | [**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/revocation | 撤销配置项更改 (new added) -*ItemManagementApi* | [**syncItems**](docs/ItemManagementApi.md#syncItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize | 同步配置项到多个命名空间 (new added) -*ItemManagementApi* | [**syntaxCheck**](docs/ItemManagementApi.md#syntaxCheck) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation | 验证配置文本语法 (new added) -*ItemManagementApi* | [**updateItem**](docs/ItemManagementApi.md#updateItem) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 更新配置项 (original openapi) -*ItemManagementApi* | [**updateItemByEncodedKey**](docs/ItemManagementApi.md#updateItemByEncodedKey) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key更新配置项 (original openapi) -*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* | [**merge**](docs/NamespaceBranchManagementApi.md#merge) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 (original openapi) -*NamespaceBranchManagementApi* | [**mergeBranch**](docs/NamespaceBranchManagementApi.md#mergeBranch) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 (new added) -*NamespaceBranchManagementApi* | [**updateBranchRules**](docs/NamespaceBranchManagementApi.md#updateBranchRules) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules | 更新分支灰度发布规则 (original openapi) -*NamespaceLockManagementApi* | [**getNamespaceLock**](docs/NamespaceLockManagementApi.md#getNamespaceLock) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 (original openapi) -*NamespaceManagementApi* | [**createMissingNamespaces**](docs/NamespaceManagementApi.md#createMissingNamespaces) | **POST** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces | 创建缺失的Namespace (new added) -*NamespaceManagementApi* | [**createNamespaces**](docs/NamespaceManagementApi.md#createNamespaces) | **POST** /openapi/v1/namespaces | 创建Namespace (new added) -*NamespaceManagementApi* | [**deleteNamespace**](docs/NamespaceManagementApi.md#deleteNamespace) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} | 删除指定的Namespace (new added) -*NamespaceManagementApi* | [**findMissingNamespaces**](docs/NamespaceManagementApi.md#findMissingNamespaces) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces | 查找缺失的Namespace (new added) -*NamespaceManagementApi* | [**findNamespace**](docs/NamespaceManagementApi.md#findNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace (original openapi) -*NamespaceManagementApi* | [**findNamespaceUsage**](docs/NamespaceManagementApi.md#findNamespaceUsage) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage | 查询namespace使用情况(new added) -*NamespaceManagementApi* | [**findNamespaces**](docs/NamespaceManagementApi.md#findNamespaces) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取指定集群下的所有Namespace (original openapi) -*NamespaceManagementApi* | [**findPublicNamespaceForAssociatedNamespace**](docs/NamespaceManagementApi.md#findPublicNamespaceForAssociatedNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace | 查询关联Namespace对应的公共Namespace详情 (new added) -*NamespaceManagementApi* | [**getNamespacesReleaseStatus**](docs/NamespaceManagementApi.md#getNamespacesReleaseStatus) | **GET** /openapi/v1/apps/{appId}/namespaces/releases/status | 获取应用下所有Namespace的发布状态 (new added) -*OrganizationManagementApi* | [**getOrganization**](docs/OrganizationManagementApi.md#getOrganization) | **GET** /openapi/v1/organizations | 获取所有组织信息 (original openapi) -*PermissionManagementApi* | [**addCreateApplicationRoleToUsers**](docs/PermissionManagementApi.md#addCreateApplicationRoleToUsers) | **POST** /openapi/v1/system/roles/create-application | 分配建应用角色 (new added) -*PermissionManagementApi* | [**addManageAppMasterRoleToUser**](docs/PermissionManagementApi.md#addManageAppMasterRoleToUser) | **POST** /openapi/v1/apps/{appId}/roles/master | 分配AppMaster (new added) -*PermissionManagementApi* | [**assignAppRoleToUser**](docs/PermissionManagementApi.md#assignAppRoleToUser) | **POST** /openapi/v1/apps/{appId}/roles/{roleType} | 分配应用角色 (new added) -*PermissionManagementApi* | [**assignClusterNamespaceRoleToUser**](docs/PermissionManagementApi.md#assignClusterNamespaceRoleToUser) | **POST** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/roles/{roleType} | 分配集群Namespace角色 (new added) -*PermissionManagementApi* | [**assignNamespaceEnvRoleToUser**](docs/PermissionManagementApi.md#assignNamespaceEnvRoleToUser) | **POST** /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType} | 分配环境Namespace角色 (new added) -*PermissionManagementApi* | [**assignNamespaceRoleToUser**](docs/PermissionManagementApi.md#assignNamespaceRoleToUser) | **POST** /openapi/v1/apps/{appId}/namespaces/{namespaceName}/roles/{roleType} | 分配Namespace角色 (new added) -*PermissionManagementApi* | [**deleteCreateApplicationRoleFromUser**](docs/PermissionManagementApi.md#deleteCreateApplicationRoleFromUser) | **DELETE** /openapi/v1/system/roles/create-application | 移除建应用角色 (new added) -*PermissionManagementApi* | [**getAppRoles**](docs/PermissionManagementApi.md#getAppRoles) | **GET** /openapi/v1/apps/{appId}/role-users | 获取应用角色用户 (new added) -*PermissionManagementApi* | [**getClusterNamespaceRoles**](docs/PermissionManagementApi.md#getClusterNamespaceRoles) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/role-users | 获取集群Namespace用户 (new added) -*PermissionManagementApi* | [**getCreateApplicationRoleUsers**](docs/PermissionManagementApi.md#getCreateApplicationRoleUsers) | **GET** /openapi/v1/system/roles/create-application/role-users | 获取建应用用户 (new added) -*PermissionManagementApi* | [**getNamespaceEnvRoleUsers**](docs/PermissionManagementApi.md#getNamespaceEnvRoleUsers) | **GET** /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/role-users | 获取环境Namespace用户 (new added) -*PermissionManagementApi* | [**getNamespaceRoles**](docs/PermissionManagementApi.md#getNamespaceRoles) | **GET** /openapi/v1/apps/{appId}/namespaces/{namespaceName}/role-users | 获取Namespace用户 (new added) -*PermissionManagementApi* | [**hasAppPermission**](docs/PermissionManagementApi.md#hasAppPermission) | **GET** /openapi/v1/apps/{appId}/permissions/{permissionType} | 校验应用权限 (new added) -*PermissionManagementApi* | [**hasClusterNamespacePermission**](docs/PermissionManagementApi.md#hasClusterNamespacePermission) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permissions/{permissionType} | 校验集群Namespace权限 (new added) -*PermissionManagementApi* | [**hasCreateApplicationPermission**](docs/PermissionManagementApi.md#hasCreateApplicationPermission) | **GET** /openapi/v1/system/roles/create-application | 校验建应用权限 (new added) -*PermissionManagementApi* | [**hasEnvNamespacePermission**](docs/PermissionManagementApi.md#hasEnvNamespacePermission) | **GET** /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/permissions/{permissionType} | 校验环境Namespace权限 (new added) -*PermissionManagementApi* | [**hasNamespacePermission**](docs/PermissionManagementApi.md#hasNamespacePermission) | **GET** /openapi/v1/apps/{appId}/namespaces/{namespaceName}/permissions/{permissionType} | 校验Namespace权限 (new added) -*PermissionManagementApi* | [**hasRootPermission**](docs/PermissionManagementApi.md#hasRootPermission) | **GET** /openapi/v1/permissions/root | 校验Root权限 (new added) -*PermissionManagementApi* | [**initAppPermission**](docs/PermissionManagementApi.md#initAppPermission) | **POST** /openapi/v1/apps/{appId}/namespaces/{namespaceName}/permission-init | 初始化应用权限 (new added) -*PermissionManagementApi* | [**initClusterNamespacePermission**](docs/PermissionManagementApi.md#initClusterNamespacePermission) | **POST** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permission-init | 初始化集群Namespace权限 (new added) -*PermissionManagementApi* | [**isManageAppMasterPermissionEnabled**](docs/PermissionManagementApi.md#isManageAppMasterPermissionEnabled) | **GET** /openapi/v1/system/role/manage-app-master | 校验AppMaster开关 (new added) -*PermissionManagementApi* | [**removeAppRoleFromUser**](docs/PermissionManagementApi.md#removeAppRoleFromUser) | **DELETE** /openapi/v1/apps/{appId}/roles/{roleType} | 移除应用角色 (new added) -*PermissionManagementApi* | [**removeClusterNamespaceRoleFromUser**](docs/PermissionManagementApi.md#removeClusterNamespaceRoleFromUser) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/roles/{roleType} | 移除集群Namespace角色 (new added) -*PermissionManagementApi* | [**removeManageAppMasterRoleFromUser**](docs/PermissionManagementApi.md#removeManageAppMasterRoleFromUser) | **DELETE** /openapi/v1/apps/{appId}/roles/master | 移除AppMaster (new added) -*PermissionManagementApi* | [**removeNamespaceEnvRoleFromUser**](docs/PermissionManagementApi.md#removeNamespaceEnvRoleFromUser) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType} | 移除环境Namespace角色 (new added) -*PermissionManagementApi* | [**removeNamespaceRoleFromUser**](docs/PermissionManagementApi.md#removeNamespaceRoleFromUser) | **DELETE** /openapi/v1/apps/{appId}/namespaces/{namespaceName}/roles/{roleType} | 移除Namespace角色 (new added) -*PortalManagementApi* | [**addFavorite**](docs/PortalManagementApi.md#addFavorite) | **POST** /openapi/v1/favorites | 添加收藏(new added) -*PortalManagementApi* | [**assignRoleToConsumer**](docs/PortalManagementApi.md#assignRoleToConsumer) | **POST** /openapi/v1/consumers/{token}/assign-role | 给消费者授权(new added) -*PortalManagementApi* | [**checkExportAppConfig**](docs/PortalManagementApi.md#checkExportAppConfig) | **HEAD** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export | 检查应用配置导出权限(new added) -*PortalManagementApi* | [**checkSystemHealth**](docs/PortalManagementApi.md#checkSystemHealth) | **GET** /openapi/v1/system-info/health | 检查系统实例健康状态(new added) -*PortalManagementApi* | [**createConsumer**](docs/PortalManagementApi.md#createConsumer) | **POST** /openapi/v1/consumers | 创建开放平台消费者(new added) -*PortalManagementApi* | [**createOrUpdateConfigDBConfig**](docs/PortalManagementApi.md#createOrUpdateConfigDBConfig) | **POST** /openapi/v1/server/envs/{env}/config-db/config | 创建或更新Config DB配置(new added) -*PortalManagementApi* | [**createOrUpdatePortalDBConfig**](docs/PortalManagementApi.md#createOrUpdatePortalDBConfig) | **POST** /openapi/v1/server/portal-db/config | 创建或更新Portal DB配置(new added) -*PortalManagementApi* | [**deleteConfigDBConfig**](docs/PortalManagementApi.md#deleteConfigDBConfig) | **DELETE** /openapi/v1/server/envs/{env}/config-db/config | 删除Config DB配置(new added) -*PortalManagementApi* | [**deleteConsumer**](docs/PortalManagementApi.md#deleteConsumer) | **DELETE** /openapi/v1/consumers/by-appId | 按应用ID删除消费者(new added) -*PortalManagementApi* | [**deleteFavorite**](docs/PortalManagementApi.md#deleteFavorite) | **DELETE** /openapi/v1/favorites/{favoriteId} | 删除收藏(new added) -*PortalManagementApi* | [**deletePortalDBConfig**](docs/PortalManagementApi.md#deletePortalDBConfig) | **DELETE** /openapi/v1/server/portal-db/config | 删除Portal DB配置(new added) -*PortalManagementApi* | [**exportAllConfigs**](docs/PortalManagementApi.md#exportAllConfigs) | **GET** /openapi/v1/configs/export | 导出所有配置(new added) -*PortalManagementApi* | [**exportAppConfig**](docs/PortalManagementApi.md#exportAppConfig) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export | 导出应用配置(new added) -*PortalManagementApi* | [**exportNamespaceItems**](docs/PortalManagementApi.md#exportNamespaceItems) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export | 导出命名空间配置项(new added) -*PortalManagementApi* | [**findAllConfigDBConfig**](docs/PortalManagementApi.md#findAllConfigDBConfig) | **GET** /openapi/v1/server/envs/{env}/config-db/config/find-all-config | 查询指定环境全部Config DB配置(new added) -*PortalManagementApi* | [**findAllPortalDBConfig**](docs/PortalManagementApi.md#findAllPortalDBConfig) | **GET** /openapi/v1/server/portal-db/config/find-all-config | 查询全部Portal DB配置(new added) -*PortalManagementApi* | [**findAuditDataInfluencesByField**](docs/PortalManagementApi.md#findAuditDataInfluencesByField) | **GET** /openapi/v1/apollo/audit/logs/dataInfluences/field | 查询审计数据影响(new added) -*PortalManagementApi* | [**findAuditLogs**](docs/PortalManagementApi.md#findAuditLogs) | **GET** /openapi/v1/apollo/audit/logs | 查询审计日志(new added) -*PortalManagementApi* | [**findAuditLogsByOpName**](docs/PortalManagementApi.md#findAuditLogsByOpName) | **GET** /openapi/v1/apollo/audit/logs/opName | 按操作名查询审计日志(new added) -*PortalManagementApi* | [**findAuditTraceDetails**](docs/PortalManagementApi.md#findAuditTraceDetails) | **GET** /openapi/v1/apollo/audit/trace | 查询审计链路详情(new added) -*PortalManagementApi* | [**findCommits**](docs/PortalManagementApi.md#findCommits) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits | 查询命名空间提交记录(new added) -*PortalManagementApi* | [**findFavorites**](docs/PortalManagementApi.md#findFavorites) | **GET** /openapi/v1/favorites | 查询收藏(new added) -*PortalManagementApi* | [**findReleaseHistoriesByNamespace**](docs/PortalManagementApi.md#findReleaseHistoriesByNamespace) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories | 查询命名空间发布历史(new added) -*PortalManagementApi* | [**getAuditProperties**](docs/PortalManagementApi.md#getAuditProperties) | **GET** /openapi/v1/apollo/audit/properties | 获取审计配置(new added) -*PortalManagementApi* | [**getConsumerList**](docs/PortalManagementApi.md#getConsumerList) | **GET** /openapi/v1/consumers | 查询开放平台消费者列表(new added) -*PortalManagementApi* | [**getConsumerTokenByAppId**](docs/PortalManagementApi.md#getConsumerTokenByAppId) | **GET** /openapi/v1/consumer-tokens/by-appId | 按应用ID查询消费者Token(new added) -*PortalManagementApi* | [**getPageSettings**](docs/PortalManagementApi.md#getPageSettings) | **GET** /openapi/v1/page-settings | 获取Portal页面配置(new added) -*PortalManagementApi* | [**getSystemInfo**](docs/PortalManagementApi.md#getSystemInfo) | **GET** /openapi/v1/system-info | 获取系统信息(new added) -*PortalManagementApi* | [**importAllConfigs**](docs/PortalManagementApi.md#importAllConfigs) | **POST** /openapi/v1/configs/import | 导入所有配置(new added) -*PortalManagementApi* | [**importAppConfig**](docs/PortalManagementApi.md#importAppConfig) | **POST** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import | 导入应用配置(new added) -*PortalManagementApi* | [**importConfig**](docs/PortalManagementApi.md#importConfig) | **POST** /openapi/v1/import | 导入配置兼容入口(new added) -*PortalManagementApi* | [**importNamespaceItems**](docs/PortalManagementApi.md#importNamespaceItems) | **POST** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import | 导入命名空间配置项(new added) -*PortalManagementApi* | [**searchAppsByAppIdOrName**](docs/PortalManagementApi.md#searchAppsByAppIdOrName) | **GET** /openapi/v1/apps/search/by-appid-or-name | 按应用ID或名称搜索应用(new added) -*PortalManagementApi* | [**searchAuditLogs**](docs/PortalManagementApi.md#searchAuditLogs) | **GET** /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator | 搜索审计日志(new added) -*PortalManagementApi* | [**searchItemInfoByKeyOrValue**](docs/PortalManagementApi.md#searchItemInfoByKeyOrValue) | **GET** /openapi/v1/global-search/item-info/by-key-or-value | 按Key或Value全局搜索配置(new added) -*PortalManagementApi* | [**topFavorite**](docs/PortalManagementApi.md#topFavorite) | **PUT** /openapi/v1/favorites/{favoriteId} | 收藏置顶(new added) -*ReleaseManagementApi* | [**compareRelease**](docs/ReleaseManagementApi.md#compareRelease) | **GET** /openapi/v1/envs/{env}/releases/comparison | Compare two releases -*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* | [**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* | [**rollback**](docs/ReleaseManagementApi.md#rollback) | **PUT** /openapi/v1/envs/{env}/releases/{releaseId}/rollback | 回滚发布 (original openapi) -*UserManagementApi* | [**changeUserEnabled**](docs/UserManagementApi.md#changeUserEnabled) | **PUT** /openapi/v1/users/enabled | 修改用户启用状态(new added) -*UserManagementApi* | [**createOrUpdateUser**](docs/UserManagementApi.md#createOrUpdateUser) | **POST** /openapi/v1/users | 创建或更新用户(new added) -*UserManagementApi* | [**getCurrentUser**](docs/UserManagementApi.md#getCurrentUser) | **GET** /openapi/v1/user | 获取当前Portal用户(new added) -*UserManagementApi* | [**getUserByUserId**](docs/UserManagementApi.md#getUserByUserId) | **GET** /openapi/v1/users/{userId} | 获取指定用户(new added) -*UserManagementApi* | [**searchUsers**](docs/UserManagementApi.md#searchUsers) | **GET** /openapi/v1/users | 搜索用户(new added) - - -## Documentation for Models - - - [ExceptionResponse](docs/ExceptionResponse.md) - - [NamespaceGrayDelReleaseDTO](docs/NamespaceGrayDelReleaseDTO.md) - - [NamespaceReleaseDTO](docs/NamespaceReleaseDTO.md) - - [OpenAccessKeyDTO](docs/OpenAccessKeyDTO.md) - - [OpenAppDTO](docs/OpenAppDTO.md) - - [OpenAppNamespaceDTO](docs/OpenAppNamespaceDTO.md) - - [OpenAppRoleUserDTO](docs/OpenAppRoleUserDTO.md) - - [OpenClusterDTO](docs/OpenClusterDTO.md) - - [OpenClusterNamespaceRoleUserDTO](docs/OpenClusterNamespaceRoleUserDTO.md) - - [OpenCreateAppDTO](docs/OpenCreateAppDTO.md) - - [OpenCreateNamespaceDTO](docs/OpenCreateNamespaceDTO.md) - - [OpenEnvClusterDTO](docs/OpenEnvClusterDTO.md) - - [OpenEnvClusterInfo](docs/OpenEnvClusterInfo.md) - - [OpenEnvNamespaceRoleUserDTO](docs/OpenEnvNamespaceRoleUserDTO.md) - - [OpenGrayReleaseRuleDTO](docs/OpenGrayReleaseRuleDTO.md) - - [OpenGrayReleaseRuleItemDTO](docs/OpenGrayReleaseRuleItemDTO.md) - - [OpenInstanceConfigDTO](docs/OpenInstanceConfigDTO.md) - - [OpenInstanceDTO](docs/OpenInstanceDTO.md) - - [OpenInstancePageDTO](docs/OpenInstancePageDTO.md) - - [OpenItemDTO](docs/OpenItemDTO.md) - - [OpenItemDiffDTO](docs/OpenItemDiffDTO.md) - - [OpenItemExtendDTO](docs/OpenItemExtendDTO.md) - - [OpenItemPageDTO](docs/OpenItemPageDTO.md) - - [OpenMissEnvDTO](docs/OpenMissEnvDTO.md) - - [OpenNamespaceDTO](docs/OpenNamespaceDTO.md) - - [OpenNamespaceExtendDTO](docs/OpenNamespaceExtendDTO.md) - - [OpenNamespaceIdentifier](docs/OpenNamespaceIdentifier.md) - - [OpenNamespaceLockDTO](docs/OpenNamespaceLockDTO.md) - - [OpenNamespaceRoleUserDTO](docs/OpenNamespaceRoleUserDTO.md) - - [OpenNamespaceSyncDTO](docs/OpenNamespaceSyncDTO.md) - - [OpenNamespaceTextModel](docs/OpenNamespaceTextModel.md) - - [OpenNamespaceUsageDTO](docs/OpenNamespaceUsageDTO.md) - - [OpenOrganizationDto](docs/OpenOrganizationDto.md) - - [OpenPermissionConditionDTO](docs/OpenPermissionConditionDTO.md) - - [OpenReleaseChangeDTO](docs/OpenReleaseChangeDTO.md) - - [OpenReleaseDTO](docs/OpenReleaseDTO.md) - - [OpenReleaseDiffDTO](docs/OpenReleaseDiffDTO.md) - - [OpenUserDTO](docs/OpenUserDTO.md) - - [OpenUserInfoDTO](docs/OpenUserInfoDTO.md) - - - -## Documentation for Authorization - - -Authentication schemes defined for the API: - -### ApiKeyAuth - -- **Type**: API key -- **API key parameter name**: Authorization -- **Location**: HTTP header - - -## Recommendation - -It's recommended to create an instance of `ApiClient` per thread in a multithreaded environment to avoid any potential issues. - -## Author diff --git a/java-client/api/openapi.yaml b/java-client/api/openapi.yaml deleted file mode 100644 index f05be1eb..00000000 --- a/java-client/api/openapi.yaml +++ /dev/null @@ -1,8711 +0,0 @@ -openapi: 3.0.1 -info: - description: | -

Apollo配置中心OpenAPI接口文档

- -

认证方式

-

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

- -

获取 Token 的方式:

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

使用示例

-
curl -X GET "http://localhost:8070/openapi/v1/apps" \
-    -H "Authorization: your_token_here"
- title: Apollo OpenAPI - version: 0.3.8 -servers: -- url: / -security: -- ApiKeyAuth: [] -tags: -- description: 应用管理相关接口,包括应用的创建、查询、更新、删除等操作 - name: App Management -- description: 配置项管理相关接口,包括配置的增删改查、批量操作、同步等功能 - name: Item Management -- description: 发布管理相关接口,包括配置发布、发布历史、灰度发布等功能 - name: Release Management -- description: 集群管理相关接口,包括集群的创建、查询、删除等操作 - name: Cluster Management -- description: 命名空间管理相关接口,包括命名空间的创建、查询、配置等操作 - name: Namespace Management -- description: AppNamespace管理相关接口,包括创建、查询、删除等操作 - name: AppNamespace Management -- description: 命名空间锁管理相关接口 - name: Namespace Lock Management -- description: 命名空间分支管理相关接口,包括分支创建、合并、灰度发布等功能 - name: Namespace Branch Management -- description: 实例管理相关接口,包括实例查询、配置生效状态等功能 - name: Instance Management -- description: 组织管理相关接口,包括组织信息查询等功能 - name: Organization Management -- description: 环境管理相关接口,包括环境查询等功能 - name: Environment Management -- description: AccessKey管理相关接口,包括AccessKey的创建、查询、删除、启用、禁用等操作 - name: AccessKey Management -- description: 权限管理相关接口,包括权限查询等功能 - name: Permission Management -- description: 用户管理相关接口,支持Portal用户登录态和具备用户管理权限的Consumer Token调用 - name: User Management -- description: Portal UI 登录态管理接口,主要供当前版本 Portal 前端调用 - name: Portal Management -paths: - /openapi/v1/apps: - get: - deprecated: false - description: POST /openapi/v1/apps - operationId: findApps - parameters: - - description: 查找应用 - example: "123" - explode: true - in: query - name: appIds - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedByDisplayName: Apollo Admin - dataChangeLastModifiedByDisplayName: Apollo Admin - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - name: Sample Application - appId: sample-app - orgId: default - orgName: Default Organization - ownerName: Apollo Admin - ownerEmail: admin@apollo.com - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedByDisplayName: Apollo Admin - dataChangeLastModifiedByDisplayName: Apollo Admin - dataChangeCreatedTime: 2024-01-10T14:20:00.000Z - dataChangeLastModifiedTime: 2024-01-12T16:45:00.000Z - name: User Service - appId: user-service - orgId: microservices - orgName: Microservices Team - ownerName: Dev Team - ownerEmail: dev@company.com - schema: - items: - $ref: '#/components/schemas/OpenAppDTO' - type: array - description: 成功获取应用列表 - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 未授权访问 - summary: 查找应用 (original openapi) - tags: - - App Management - x-accepts: application/json - post: - deprecated: false - description: POST /openapi/v1/apps - operationId: createApp - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenCreateAppDTO' - required: true - responses: - "200": - description: 应用创建成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - 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 - dataChangeLastModifiedBy: apollo - dataChangeCreatedByDisplayName: Apollo Admin - dataChangeLastModifiedByDisplayName: Apollo Admin - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - name: Sample Application - appId: sample-app - orgId: default - orgName: Default Organization - ownerName: Apollo Admin - ownerEmail: admin@apollo.com - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedByDisplayName: Apollo Admin - dataChangeLastModifiedByDisplayName: Apollo Admin - dataChangeCreatedTime: 2024-01-10T14:20:00.000Z - dataChangeLastModifiedTime: 2024-01-12T16:45:00.000Z - name: User Service - appId: user-service - orgId: microservices - orgName: Microservices Team - ownerName: Dev Team - ownerEmail: dev@company.com - schema: - items: - $ref: '#/components/schemas/OpenAppDTO' - type: array - description: 成功获取授权应用列表 - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 未授权访问 - summary: 获取当前Consumer授权的应用列表 (original openapi) - tags: - - App Management - x-accepts: application/json - /openapi/v1/apps/{appId}/envclusters: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/envclusters" - operationId: getEnvClusters - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - - env: DEV - clusters: - - default - - test-cluster - - env: UAT - clusters: - - default - - env: PRO - clusters: - - default - - backup - schema: - items: - $ref: '#/components/schemas/OpenEnvClusterDTO' - type: array - description: 成功获取应用环境集群信息 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 应用不存在 - summary: 获取应用的环境集群信息 (original openapi) - tags: - - App Management - x-accepts: application/json - /openapi/v1/apps/{appId}: - delete: - deprecated: false - description: "DELETE /openapi/v1/apps/{appId}" - operationId: deleteApp - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: 应用删除成功 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足,需要超级管理员权限 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 应用不存在 - summary: 删除应用(new added) - tags: - - App Management - x-accepts: application/json - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}" - operationId: getApp - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedByDisplayName: Apollo Admin - dataChangeLastModifiedByDisplayName: Dev User - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T15:45:00.000Z - name: Sample Application - appId: sample-app - orgId: default - orgName: Default Organization - ownerName: Apollo Admin - ownerEmail: admin@apollo.com - schema: - $ref: '#/components/schemas/OpenAppDTO' - description: 成功获取应用信息 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 应用不存在 - summary: 获取单个应用信息(new added) - tags: - - App Management - x-accepts: application/json - put: - deprecated: false - description: "PUT /openapi/v1/apps/{appId}" - operationId: updateApp - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAppDTO' - required: true - responses: - "200": - description: 应用更新成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 更新应用(new added) - tags: - - App Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/apps/by-self: - get: - deprecated: false - description: GET /openapi/v1/apps/by-self - 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: - application/json: - example: - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedByDisplayName: Apollo Admin - dataChangeLastModifiedByDisplayName: Dev User - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T16:45:00.000Z - name: User Service - appId: user-service - orgId: microservices - orgName: Microservices Team - ownerName: Dev Team - ownerEmail: dev@company.com - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: ops-user - dataChangeCreatedByDisplayName: Apollo Admin - dataChangeLastModifiedByDisplayName: Ops User - dataChangeCreatedTime: 2024-01-10T09:15:00.000Z - dataChangeLastModifiedTime: 2024-01-18T14:30:00.000Z - name: Order Service - appId: order-service - orgId: business - orgName: Business Team - ownerName: Business Team - ownerEmail: business@company.com - schema: - items: - $ref: '#/components/schemas/OpenAppDTO' - type: array - description: 成功获取Consumer的应用列表 - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 未授权访问 - summary: 获取当前Consumer/User的应用列表(分页)(new added) - tags: - - App Management - x-accepts: application/json - /openapi/v1/apps/{appId}/env-cluster-info: - get: - deprecated: false - description: "/openapi/v1/apps/{appId}/env-cluster-info" - operationId: getEnvClusterInfo - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - - env: DEV - code: "200" - clusters: - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedByDisplayName: apollo - dataChangeLastModifiedByDisplayName: apollo - dataChangeCreatedTime: 2023-01-01T00:00:00.000Z - dataChangeLastModifiedTime: 2023-01-01T00:00:00.000Z - id: 1 - name: default - appId: sample-app - parentClusterId: 0 - comment: Default cluster - message: "load env: DEV cluster error" - schema: - items: - $ref: '#/components/schemas/OpenEnvClusterInfo' - type: array - description: 成功获取应用环境集群详情 - summary: 获取应用环境集群详情(new added) - tags: - - App Management - x-accepts: application/json - /openapi/v1/apps/envs/{env}: - post: - deprecated: false - description: "POST /openapi/v1/apps/envs/{env}" - operationId: createAppInEnv - parameters: - - description: 环境标识,例如 DEV、FAT、UAT、PROD - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAppDTO' - required: true - responses: - "200": - description: 应用在指定环境创建成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 在指定环境创建应用(new added) - tags: - - App Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/apps/{appId}/miss-envs: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/miss-envs" - operationId: findMissEnvs - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - - code: "200" - message: test_NOT_FOUND - - code: "500" - message: load appId:xx from env test_INTERNAL_ERROR error. test ERROR - MESSAGE - schema: - items: - $ref: '#/components/schemas/OpenMissEnvDTO' - type: array - description: 成功获取应用缺失的环境列表 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 应用不存在 - summary: 查找缺失的环境(new added) - tags: - - App Management - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}: - delete: - deprecated: false - description: "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" - operationId: deleteItem - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 配置项键名 - explode: false - in: path - name: key - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: 配置项删除成功 - summary: 删除配置项 (original openapi) - tags: - - Item Management - x-accepts: application/json - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" - operationId: getItem - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 配置项键名 - explode: false - in: path - name: key - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: server.port - type: 0 - value: "8080" - comment: 服务器端口配置 - schema: - $ref: '#/components/schemas/OpenItemDTO' - description: 成功获取配置项 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 配置项不存在 - summary: 获取单个配置项 (original openapi) - tags: - - Item Management - x-accepts: application/json - put: - deprecated: false - description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" - operationId: updateItem - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: key - required: true - schema: - type: string - style: simple - - description: "" - example: "false" - explode: true - in: query - name: createIfNotExists - required: true - schema: - default: false - type: boolean - style: form - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenItemDTO' - required: true - responses: - "200": - description: 配置项更新成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 配置项不存在 - summary: 更新配置项 (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: - get: - deprecated: false - description: 获取指定命名空间的配置项列表,支持分页 - operationId: findItemsByNamespace - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 页码,从0开始 - example: 0 - explode: true - in: query - name: page - required: true - schema: - minimum: 0 - type: integer - style: form - - description: 每页数量 - example: 50 - explode: true - in: query - name: size - required: true - schema: - minimum: 0 - type: integer - style: form - responses: - "200": - content: - application/json: - example: - page: 0 - size: 50 - total: 3 - content: - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: server.port - type: 0 - value: "8080" - comment: 服务器端口配置 - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - key: spring.datasource.url - type: 0 - value: jdbc:mysql://localhost:3306/apollo - comment: 数据库连接地址 - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: ops-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-18T09:15:00.000Z - key: logging.level.root - type: 0 - value: INFO - comment: 日志级别配置 - schema: - $ref: '#/components/schemas/OpenItemPageDTO' - description: 成功获取配置项列表 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 命名空间不存在 - summary: 获取命名空间下的配置项列表 (original openapi) - tags: - - Item Management - x-accepts: application/json - post: - deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items" - operationId: createItem - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenItemDTO' - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - key: server.port - type: 0 - value: "8080" - comment: 服务器端口配置 - schema: - $ref: '#/components/schemas/OpenItemDTO' - description: 配置项创建成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 创建新的配置项 (original openapi) - tags: - - Item Management - x-content-type: application/json - x-accepts: application/json - put: - deprecated: false - description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:" - operationId: batchUpdateItemsByText - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenNamespaceTextModel' - required: true - responses: - "200": - description: 批量更新配置项成功 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 通过文本批量修改配置项 (new added) - tags: - - Item Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}: - delete: - deprecated: false - description: "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" - operationId: deleteItemByEncodedKey - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: key - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: operator - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 通过编码的key删除配置项 (original openapi) - tags: - - Item Management - x-accepts: application/json - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" - operationId: getItemByEncodedKey - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 配置项键名(需要URL编码) - explode: false - in: path - name: key - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: spring.datasource.url - type: 0 - value: jdbc:mysql://localhost:3306/apollo?useUnicode=true&characterEncoding=utf8 - comment: 数据库连接地址,包含特殊字符 - schema: - $ref: '#/components/schemas/OpenItemDTO' - description: 成功获取配置项(支持编码key) - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 配置项不存在 - summary: 通过查询参数获取配置项(支持编码的key) (original openapi) - tags: - - Item Management - x-accepts: application/json - put: - deprecated: false - description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" - operationId: updateItemByEncodedKey - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 配置项键名(需要URL编码) - explode: false - in: path - name: key - required: true - schema: - type: string - style: simple - - description: 若不存在则创建(true/false) - example: "false" - explode: true - in: query - name: createIfNotExists - required: true - schema: - default: false - type: boolean - style: form - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenItemDTO' - required: true - responses: - "200": - description: 配置项更新成功(编码key) - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 配置项不存在 - 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}/branches/{branchName}/items: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items:" - operationId: findBranchItems - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 分支名称 - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: feature.new-feature - type: 0 - value: enabled - comment: 新功能开关,分支测试中 - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: test.debug.level - type: 0 - value: verbose - comment: 测试调试级别 - schema: - items: - $ref: '#/components/schemas/OpenItemDTO' - type: array - description: 成功获取分支下的配置项列表 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 分支不存在 - summary: 获取分支下的配置项 (new added) - tags: - - Item Management - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff: - post: - deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff" - operationId: compareItems - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenNamespaceSyncDTO' - required: true - responses: - "200": - content: - application/json: - example: - - namespace: - appId: "" - env: "" - clusterName: "" - namespaceName: "" - diffs: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedByDisplayName: "" - dataChangeLastModifiedByDisplayName: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - createItems: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedByDisplayName: "" - dataChangeLastModifiedByDisplayName: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - namespaceId: 0 - key: "" - type: 0 - value: "" - comment: "" - lineNum: 0 - updateItems: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedByDisplayName: "" - dataChangeLastModifiedByDisplayName: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - namespaceId: 0 - key: "" - type: 0 - value: "" - comment: "" - lineNum: 0 - deleteItems: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedByDisplayName: "" - dataChangeLastModifiedByDisplayName: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - namespaceId: 0 - key: "" - type: 0 - value: "" - comment: "" - lineNum: 0 - extInfo: "" - schema: - items: - $ref: '#/components/schemas/OpenItemDiffDTO' - type: array - description: 成功对比命名空间配置差异 - summary: 对比命名空间配置差异 (new added) - tags: - - Item Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: - post: - deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize:" - operationId: syncItems - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenNamespaceSyncDTO' - required: true - responses: - "200": - description: 配置项同步成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 同步配置项到多个命名空间 (new added) - tags: - - Item Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation: - post: - deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation" - operationId: syntaxCheck - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenNamespaceTextModel' - required: true - responses: - "200": - description: 配置文本语法验证通过 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 配置文本语法错误 - summary: 验证配置文本语法 (new added) - tags: - - Item Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation: - post: - deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation" - operationId: revertItems - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: 配置项更改撤销成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 撤销配置项更改 (new added) - tags: - - Item Management - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}: - delete: - deprecated: false - description: "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}" - operationId: deleteCluster - parameters: - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 操作人用户名,openapi外部调用时需传入 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: 集群删除成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 删除失败,集群可能包含配置 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 集群不存在 - summary: 删除集群 (new added) - tags: - - Cluster Management - x-accepts: application/json - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}" - operationId: getCluster - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: ops-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-18T09:15:00.000Z - name: production - appId: sample-app - schema: - $ref: '#/components/schemas/OpenClusterDTO' - description: 成功获取集群信息 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 集群不存在 - summary: 获取指定集群信息 (original openapi) - tags: - - Cluster Management - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters: - post: - deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters" - operationId: createCluster - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - explode: false - in: path - 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: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - name: test-cluster - appId: sample-app - schema: - $ref: '#/components/schemas/OpenClusterDTO' - description: 集群创建成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 创建集群 (original openapi) - tags: - - Cluster Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases: - post: - deprecated: false - description: 创建发布 - operationId: createRelease - parameters: - - description: app标识 - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NamespaceReleaseDTO' - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - id: 12345 - appId: sample-app - clusterName: default - namespaceName: application - name: Release v1.0.0 - configurations: - server.port: "8080" - spring.datasource.url: jdbc:mysql://localhost:3306/apollo - logging.level.root: INFO - comment: 首次发布,包含基础配置 - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: 发布创建成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 发布参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 创建发布 (original openapi) - tags: - - Release Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest: - get: - deprecated: false - description: 查询命名空间最新活跃发布 - operationId: loadLatestActiveRelease - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - id: 12345 - appId: sample-app - clusterName: default - namespaceName: application - name: Release v1.2.0 - configurations: - server.port: "8080" - spring.datasource.url: jdbc:mysql://localhost:3306/apollo - logging.level.root: INFO - app.version: 1.2.0 - comment: 最新生产发布版本,包含性能优化 - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: 成功获取最新活跃发布 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 未找到活跃发布 - summary: 获取最新活跃发布 (original openapi) - tags: - - Release Management - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge: - post: - deprecated: false - description: 合并灰度分支并可选择删除分支 - operationId: merge - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 分支名称 - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - - description: 合并后是否删除分支(true/false) - example: "true" - explode: true - in: query - name: deleteBranch - required: true - schema: - type: boolean - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NamespaceReleaseDTO' - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - id: 12346 - appId: sample-app - clusterName: default - namespaceName: application - name: Merge from branch feature-123 - configurations: - server.port: "8080" - spring.datasource.url: jdbc:mysql://localhost:3306/apollo - logging.level.root: INFO - feature.new-feature: enabled - comment: 合并功能分支到主分支,包含新功能配置 - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: 分支合并成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 合并参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 合并分支 (original openapi) - tags: - - Namespace Branch Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases: - post: - deprecated: false - description: 创建灰度发布 - operationId: createGrayRelease - parameters: - - description: app标识 - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 分支名称 - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NamespaceReleaseDTO' - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: 灰度发布创建成功 - summary: 创建灰度发布 (original openapi) - tags: - - Release Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases: - post: - deprecated: false - description: "" - operationId: createGrayDelRelease - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NamespaceGrayDelReleaseDTO' - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: "" - summary: 创建灰度删除发布 (original openapi) - tags: - - Release Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/envs/{env}/releases/{releaseId}/rollback: - put: - deprecated: false - description: 回滚到指定的发布版本 - operationId: rollback - parameters: - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 发布ID - explode: false - in: path - name: releaseId - required: true - schema: - format: int64 - type: integer - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: 要回滚到的目标发布ID;不传时回滚到上一版本 - explode: true - in: query - name: toReleaseId - required: false - schema: - format: int64 - type: integer - style: form - responses: - "200": - description: 发布回滚成功 - summary: 回滚发布 (original openapi) - tags: - - Release Management - 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: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 发布ID - explode: false - in: path - name: releaseId - required: true - schema: - format: int64 - type: integer - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: 成功获取发布详情 - summary: 获取发布详情 (new added) - tags: - - Release Management - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active" - operationId: findActiveReleases - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 页码,从0开始 - example: 0 - explode: true - in: query - name: page - required: true - schema: - type: integer - style: form - - description: 每页数量 - example: 5 - explode: true - in: query - name: size - required: true - schema: - type: integer - style: form - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - schema: - items: - $ref: '#/components/schemas/OpenReleaseDTO' - type: array - description: 成功获取活跃发布列表 - summary: 获取活跃发布(分页) (new added) - tags: - - Release Management - x-accepts: application/json - /openapi/v1/envs/{env}/releases/comparison: - get: - description: Get the configuration differences between two releases. - operationId: compareRelease - parameters: - - description: Environment - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: The base release ID - explode: true - in: query - name: baseReleaseId - required: true - schema: - format: int64 - type: integer - style: form - - description: The release ID to compare against - explode: true - in: query - name: toCompareReleaseId - required: true - schema: - format: int64 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/OpenReleaseDiffDTO' - description: Successful comparison - summary: Compare two releases - tags: - - Release Management - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances" - operationId: getInstanceCountByNamespace - parameters: - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - type: integer - description: 成功返回实例数量 - summary: 获取命名空间下的实例数量 (original openapi) - tags: - - Instance Management - x-accepts: application/json - /openapi/v1/envs/{env}/instances/by-release: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/instances/by-release" - operationId: getByRelease - parameters: - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: releaseId - required: true - schema: - format: int64 - type: integer - style: form - - description: "" - example: 0 - explode: true - in: query - name: page - required: true - schema: - type: integer - style: form - - description: "" - example: 20 - explode: true - in: query - name: size - required: true - schema: - type: integer - style: form - responses: - "200": - content: - application/json: - example: - page: 0 - size: 0 - total: 0 - instances: - - id: 0 - appId: "" - clusterName: "" - dataCenter: "" - ip: "" - configs: - - release: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - releaseDeliveryTime: "" - dataChangeLastModifiedTime: "" - dataChangeCreatedTime: "" - schema: - $ref: '#/components/schemas/OpenInstancePageDTO' - description: "" - summary: 根据发布版本查询实例(支持分页) (new added) - tags: - - Instance Management - x-accepts: application/json - /openapi/v1/envs/{env}/instances/by-namespace: - get: - deprecated: false - operationId: getByNamespace - parameters: - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 应用ID - explode: true - in: query - name: appId - required: true - schema: - type: string - style: form - - description: 集群名称 - explode: true - in: query - name: clusterName - required: true - schema: - type: string - style: form - - description: 命名空间名称 - explode: true - in: query - name: namespaceName - required: true - schema: - type: string - style: form - - description: Instance表中的AppID - explode: true - in: query - name: instanceAppId - required: false - schema: - type: string - style: form - - description: 页数 - explode: true - in: query - name: page - required: true - schema: - default: 0 - minimum: 0 - type: integer - style: form - - description: 页大小 - explode: true - in: query - name: size - required: true - schema: - default: 0 - minimum: 0 - type: integer - style: form - responses: - "200": - content: - application/json: - example: - page: 0 - size: 0 - total: 0 - instances: - - id: 0 - appId: "" - clusterName: "" - dataCenter: "" - ip: "" - configs: - - release: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - releaseDeliveryTime: "" - dataChangeLastModifiedTime: "" - dataChangeCreatedTime: "" - schema: - $ref: '#/components/schemas/OpenInstancePageDTO' - description: "" - summary: 根据namespaceName查询实例(new added) - tags: - - Instance Management - x-accepts: application/json - /openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in: - get: - deprecated: false - operationId: getByReleasesAndNamespaceNotIn - parameters: - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 应用ID - explode: true - in: query - name: appId - required: true - schema: - type: string - style: form - - description: 集群名称 - explode: true - in: query - name: clusterName - required: true - schema: - type: string - style: form - - description: 命名空间名称 - explode: true - in: query - name: namespaceName - required: true - schema: - type: string - style: form - - description: 排除的发布ID列表,用逗号分隔 - explode: true - in: query - name: releaseIds - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - - id: 0 - appId: "" - clusterName: "" - dataCenter: "" - ip: "" - configs: - - release: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - releaseDeliveryTime: "" - dataChangeLastModifiedTime: "" - dataChangeCreatedTime: "" - schema: - items: - $ref: '#/components/schemas/OpenInstanceDTO' - type: array - description: "" - summary: 查询不在指定发布版本中的实例 (new added) - tags: - - Instance Management - x-accepts: application/json - /openapi/v1/namespaces: - post: - deprecated: false - description: "POST /openapi/v1/apps/{appId}/namespaces" - operationId: createNamespaces - parameters: - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - items: - $ref: '#/components/schemas/OpenCreateNamespaceDTO' - type: array - required: true - responses: - "200": - description: Namespace创建成功 - summary: 创建Namespace (new added) - tags: - - Namespace Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage" - operationId: findAppNamespaceUsage - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/OpenNamespaceUsageDTO' - type: array - description: AppNamespaceUsage查询成功 - summary: 查询appnamespace使用情况(new added) - tags: - - AppNamespace Management - x-accepts: application/json - /openapi/v1/apps/{appId}/appnamespaces: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/appnamespaces" - operationId: getAppNamespacesByAppId - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - name: "" - appId: "" - format: "" - isPublic: false - appendNamespacePrefix: false - comment: "" - schema: - items: - $ref: '#/components/schemas/OpenAppNamespaceDTO' - type: array - description: "" - summary: 获取指定应用的AppNamespace (new added) - tags: - - AppNamespace Management - x-accepts: application/json - post: - deprecated: false - description: "POST /openapi/v1/apps/{appId}/appnamespaces" - operationId: createAppNamespace - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAppNamespaceDTO' - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - name: database - appId: sample-app - format: properties - isPublic: false - appendNamespacePrefix: true - comment: 数据库相关配置命名空间 - schema: - $ref: '#/components/schemas/OpenAppNamespaceDTO' - description: AppNamespace创建成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 创建AppNamespace (original openapi) - tags: - - AppNamespace Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces" - operationId: findNamespaces - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - example: "true" - explode: true - in: query - name: fillItemDetail - required: true - schema: - default: true - type: boolean - style: form - - description: "" - explode: true - in: query - name: extendInfo - required: false - schema: - default: false - type: boolean - style: form - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - appId: "" - clusterName: "" - namespaceName: "" - comment: "" - format: "" - isPublic: false - items: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - key: "" - type: 0 - value: "" - comment: "" - schema: - items: - $ref: '#/components/schemas/OpenNamespaceDTO' - type: array - description: "" - summary: 获取指定集群下的所有Namespace (original openapi) - tags: - - Namespace Management - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}" - operationId: findNamespace - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - example: "true" - explode: true - in: query - name: fillItemDetail - required: true - schema: - default: true - type: boolean - style: form - - description: "" - explode: true - in: query - name: extendInfo - required: false - schema: - default: false - type: boolean - style: form - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - appId: "" - clusterName: "" - namespaceName: "" - comment: "" - format: "" - isPublic: false - items: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - key: "" - type: 0 - value: "" - comment: "" - schema: - $ref: '#/components/schemas/OpenNamespaceDTO' - description: "" - summary: 获取指定的Namespace (original openapi) - tags: - - Namespace Management - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace" - operationId: findPublicNamespaceForAssociatedNamespace - parameters: - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 关联Namespace名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: extendInfo - required: false - schema: - default: false - type: boolean - style: form - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T11:00:00.000Z - appId: public-owner-app - clusterName: default - namespaceName: public.namespace - comment: 公共 namespace 示例 - format: properties - isPublic: true - parentAppId: public-owner-app - isConfigHidden: false - itemModifiedCnt: 0 - items: - - key: k1 - value: v1 - - key: k2 - value: v2 - schema: - $ref: '#/components/schemas/OpenNamespaceDTO' - description: 成功获取关联的公共Namespace详情 - summary: 查询关联Namespace对应的公共Namespace详情 (new added) - tags: - - Namespace Management - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock" - operationId: getNamespaceLock - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - namespaceName: "" - isLocked: false - lockedBy: "" - schema: - $ref: '#/components/schemas/OpenNamespaceLockDTO' - description: "" - summary: 获取Namespace的锁状态 (original openapi) - tags: - - Namespace Lock Management - x-accepts: application/json - /openapi/v1/appnamespaces: - get: - deprecated: false - description: GET /openapi/v1/appnamespaces/public - operationId: getAppNamespaces - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - name: "" - appId: "" - format: "" - isPublic: false - appendNamespacePrefix: false - comment: "" - schema: - items: - $ref: '#/components/schemas/OpenAppNamespaceDTO' - type: array - description: "" - summary: 获取所有公共AppNamespace (new added) - tags: - - AppNamespace Management - 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: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: AppNamespace删除成功 - summary: 删除AppNamespace (new added) - tags: - - AppNamespace Management - x-accepts: application/json - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" - operationId: findAppNamespace - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: extendInfo - required: false - schema: - default: false - type: boolean - style: form - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - name: "" - appId: "" - format: "" - isPublic: false - appendNamespacePrefix: false - comment: "" - schema: - $ref: '#/components/schemas/OpenAppNamespaceDTO' - description: 成功获取AppNamespace - summary: 获取指定的AppNamespace (new added) - tags: - - AppNamespace Management - 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: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/StringToStringBoolMap' - description: 成功获取发布状态映射 - summary: 获取应用下所有Namespace的发布状态 (new added) - tags: - - 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: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 公共命名空间名称 - explode: false - in: path - name: publicNamespaceName - required: true - schema: - type: string - style: simple - - description: 页码,从0开始 - example: 0 - explode: true - in: query - name: page - required: true - schema: - type: integer - style: form - - description: 每页数量 - example: 10 - explode: true - in: query - name: size - required: true - schema: - type: integer - style: form - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - appId: "" - clusterName: "" - namespaceName: "" - comment: "" - format: "" - isPublic: false - items: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - key: "" - type: 0 - value: "" - comment: "" - schema: - items: - $ref: '#/components/schemas/OpenNamespaceDTO' - type: array - description: 成功获取实例列表 - summary: 获取公共AppNamespace的所有实例 (new added) - tags: - - AppNamespace Management - x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage" - operationId: findNamespaceUsage - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/OpenNamespaceUsageDTO' - type: array - description: NamespaceUsage查询成功 - summary: 查询namespace使用情况(new added) - tags: - - Namespace Management - x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces" - operationId: findMissingNamespaces - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - - "" - schema: - items: - type: string - type: array - description: 缺失的命名空间名称列表 - summary: 查找缺失的Namespace (new added) - tags: - - Namespace Management - x-accepts: application/json - post: - deprecated: false - description: "POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces" - operationId: createMissingNamespaces - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: 缺失的命名空间创建成功 - summary: 创建缺失的Namespace (new added) - tags: - - Namespace Management - x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}: - delete: - deprecated: false - description: "DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}" - operationId: deleteNamespace - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: 解除关联成功 - summary: 删除指定的Namespace (new added) - tags: - - Namespace Management - x-accepts: application/json - /openapi/v1/organizations: - get: - deprecated: false - description: GET /openapi/v1/organizations - operationId: getOrganization - responses: - "200": - content: - application/json: - example: - - orgId: default - orgName: Default Organization - - orgId: microservices - orgName: Microservices Team - - orgId: infrastructure - orgName: Infrastructure Team - schema: - description: 组织列表 - items: - $ref: '#/components/schemas/OpenOrganizationDto' - type: array - description: 成功获取组织列表 - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 未授权访问 - summary: 获取所有组织信息 (original openapi) - tags: - - Organization Management - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches" - operationId: findBranch - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: extendInfo - required: false - schema: - default: false - type: boolean - style: form - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - appId: sample-app - clusterName: default - namespaceName: application - comment: 功能分支,用于测试新特性 - format: properties - isPublic: false - items: - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: feature.new-feature - type: 0 - value: enabled - comment: 新功能开关 - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: test.mode - type: 0 - value: debug - comment: 测试模式配置 - schema: - $ref: '#/components/schemas/OpenNamespaceDTO' - description: 成功获取分支信息 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 分支不存在 - summary: 获取命名空间分支信息 (original openapi) - tags: - - Namespace Branch Management - x-accepts: application/json - post: - deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches" - operationId: createBranch - parameters: - - description: app标识 - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - appId: "" - clusterName: "" - namespaceName: "" - comment: "" - format: "" - isPublic: false - items: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - key: "" - type: 0 - value: "" - comment: "" - schema: - $ref: '#/components/schemas/OpenNamespaceDTO' - description: 命名空间分支创建成功 - summary: 创建命名空间分支 (original openapi) - tags: - - Namespace Branch Management - x-accepts: application/json - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}: - delete: - deprecated: false - description: "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}" - operationId: deleteBranch - parameters: - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 分支名称 - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: 分支删除成功 - summary: 删除命名空间分支 (original openapi) - tags: - - Namespace Branch Management - x-accepts: application/json - post: - deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}" - operationId: mergeBranch - parameters: - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 分支名称 - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - - description: 合并后是否删除分支(true/false) - example: "true" - explode: true - in: query - name: deleteBranch - required: true - schema: - type: boolean - style: form - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NamespaceReleaseDTO' - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: 分支合并成功 - summary: 合并分支到主分支 (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}/rules: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules" - operationId: getBranchGrayRules - parameters: - - description: app标识 - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 分支名称 - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - appId: "" - clusterName: "" - namespaceName: "" - branchName: "" - ruleItems: - - clientAppId: "" - clientIpList: - - "" - clientLabelList: - - "" - schema: - $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' - description: 成功获取灰度发布规则 - summary: 获取分支灰度发布规则 (original openapi) - tags: - - Namespace Branch Management - x-accepts: application/json - put: - deprecated: false - description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules" - operationId: updateBranchRules - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 分支名称 - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' - required: true - responses: - "200": - description: 灰度规则更新成功 - summary: 更新分支灰度发布规则 (original openapi) - tags: - - Namespace Branch Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/envs: - get: - deprecated: false - description: GET /openapi/v1/envs - operationId: getEnvs - responses: - "200": - content: - application/json: - example: - - DEV - - FAT - - UAT - - PRO - schema: - items: - type: string - type: array - description: 成功获取环境列表 - summary: 获取所有环境 - tags: - - Environment Management - x-accepts: application/json - /openapi/v1/apps/{appId}/namespaces/{namespaceName}/permission-init: - post: - deprecated: false - description: "" - operationId: initAppPermission - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: 初始化成功 - summary: 初始化应用权限 (new added) - tags: - - Permission Management - x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permission-init: - post: - deprecated: false - description: "" - operationId: initClusterNamespacePermission - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 初始化集群Namespace权限 (new added) - tags: - - Permission Management - x-accepts: application/json - /openapi/v1/apps/{appId}/permissions/{permissionType}: - get: - deprecated: false - description: "" - operationId: hasAppPermission - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: permissionType - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - hasPermission: false - schema: - $ref: '#/components/schemas/OpenPermissionConditionDTO' - description: "" - summary: 校验应用权限 (new added) - tags: - - Permission Management - x-accepts: application/json - /openapi/v1/apps/{appId}/namespaces/{namespaceName}/permissions/{permissionType}: - get: - deprecated: false - description: "" - operationId: hasNamespacePermission - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: permissionType - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - hasPermission: false - schema: - $ref: '#/components/schemas/OpenPermissionConditionDTO' - description: "" - summary: 校验Namespace权限 (new added) - tags: - - Permission Management - x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/permissions/{permissionType}: - get: - deprecated: false - description: "" - operationId: hasEnvNamespacePermission - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: permissionType - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - hasPermission: false - schema: - $ref: '#/components/schemas/OpenPermissionConditionDTO' - description: "" - summary: 校验环境Namespace权限 (new added) - tags: - - Permission Management - x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permissions/{permissionType}: - get: - deprecated: false - description: "" - operationId: hasClusterNamespacePermission - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: permissionType - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - hasPermission: false - schema: - $ref: '#/components/schemas/OpenPermissionConditionDTO' - description: "" - summary: 校验集群Namespace权限 (new added) - tags: - - Permission Management - x-accepts: application/json - /openapi/v1/permissions/root: - get: - deprecated: false - description: "" - operationId: hasRootPermission - parameters: - - description: "" - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - hasPermission: false - schema: - $ref: '#/components/schemas/OpenPermissionConditionDTO' - description: "" - summary: 校验Root权限 (new added) - tags: - - Permission Management - x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/role-users: - get: - deprecated: false - description: "" - operationId: getNamespaceEnvRoleUsers - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - appId: "" - namespaceName: "" - modifyRoleUsers: - - userId: "" - name: "" - email: "" - enabled: 0 - releaseRoleUsers: - - userId: "" - name: "" - email: "" - enabled: 0 - env: "" - schema: - $ref: '#/components/schemas/OpenEnvNamespaceRoleUserDTO' - description: "" - summary: 获取环境Namespace用户 (new added) - tags: - - Permission Management - x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType}: - delete: - deprecated: false - description: "" - operationId: removeNamespaceEnvRoleFromUser - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: roleType - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: the user which role removed from - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 移除环境Namespace角色 (new added) - tags: - - Permission Management - x-accepts: application/json - post: - deprecated: false - description: "" - operationId: assignNamespaceEnvRoleToUser - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: roleType - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: the user which role assigned to - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 分配环境Namespace角色 (new added) - tags: - - Permission Management - x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/role-users: - get: - deprecated: false - description: "" - operationId: getClusterNamespaceRoles - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - appId: "" - env: "" - cluster: "" - modifyRoleUsers: - - userId: "" - name: "" - email: "" - enabled: 0 - releaseRoleUsers: - - userId: "" - name: "" - email: "" - enabled: 0 - schema: - $ref: '#/components/schemas/OpenClusterNamespaceRoleUserDTO' - description: "" - summary: 获取集群Namespace用户 (new added) - tags: - - Permission Management - x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/roles/{roleType}: - delete: - deprecated: false - description: "" - operationId: removeClusterNamespaceRoleFromUser - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: roleType - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: the user which role removed from - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 移除集群Namespace角色 (new added) - tags: - - Permission Management - x-accepts: application/json - post: - deprecated: false - description: "" - operationId: assignClusterNamespaceRoleToUser - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: roleType - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: the user which role assigned to - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 分配集群Namespace角色 (new added) - tags: - - Permission Management - x-accepts: application/json - /openapi/v1/apps/{appId}/namespaces/{namespaceName}/role-users: - get: - deprecated: false - description: "" - operationId: getNamespaceRoles - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - appId: "" - namespaceName: "" - modifyRoleUsers: - - userId: "" - name: "" - email: "" - enabled: 0 - releaseRoleUsers: - - userId: "" - name: "" - email: "" - enabled: 0 - schema: - $ref: '#/components/schemas/OpenNamespaceRoleUserDTO' - description: "" - summary: 获取Namespace用户 (new added) - tags: - - Permission Management - x-accepts: application/json - /openapi/v1/apps/{appId}/namespaces/{namespaceName}/roles/{roleType}: - delete: - deprecated: false - description: "" - operationId: removeNamespaceRoleFromUser - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: roleType - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: the user which role removed from - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 移除Namespace角色 (new added) - tags: - - Permission Management - x-accepts: application/json - post: - deprecated: false - description: "" - operationId: assignNamespaceRoleToUser - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: roleType - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: the user which role assigned to - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 分配Namespace角色 (new added) - tags: - - Permission Management - x-accepts: application/json - /openapi/v1/apps/{appId}/role-users: - get: - deprecated: false - description: "" - operationId: getAppRoles - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - appId: "" - masterUsers: - - userId: "" - name: "" - email: "" - enabled: 0 - schema: - $ref: '#/components/schemas/OpenAppRoleUserDTO' - description: "" - summary: 获取应用角色用户 (new added) - tags: - - Permission Management - x-accepts: application/json - /openapi/v1/apps/{appId}/roles/{roleType}: - delete: - deprecated: false - description: "" - operationId: removeAppRoleFromUser - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: roleType - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: the user which role removed from - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 移除应用角色 (new added) - tags: - - Permission Management - x-accepts: application/json - post: - deprecated: false - description: "" - operationId: assignAppRoleToUser - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: roleType - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: the user which role removed from - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - description: "" - type: string - responses: - "200": - description: "" - summary: 分配应用角色 (new added) - tags: - - Permission Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/system/roles/create-application: - delete: - deprecated: false - description: "" - operationId: deleteCreateApplicationRoleFromUser - parameters: - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: "" - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 移除建应用角色 (new added) - tags: - - Permission Management - x-accepts: application/json - get: - deprecated: false - description: "" - operationId: hasCreateApplicationPermission - parameters: - - description: "" - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - members: - ? "" - : {} - schema: - additionalProperties: - type: boolean - type: object - description: "" - summary: 校验建应用权限 (new added) - tags: - - Permission Management - x-accepts: application/json - post: - deprecated: false - description: "" - operationId: addCreateApplicationRoleToUsers - parameters: - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - description: "" - items: - type: string - title: userIds - type: array - responses: - "200": - description: "" - summary: 分配建应用角色 (new added) - tags: - - Permission Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/system/roles/create-application/role-users: - get: - deprecated: false - description: "" - operationId: getCreateApplicationRoleUsers - parameters: [] - responses: - "200": - content: - application/json: - example: - - "" - schema: - items: - type: string - type: array - description: "" - summary: 获取建应用用户 (new added) - tags: - - Permission Management - x-accepts: application/json - /openapi/v1/apps/{appId}/roles/master: - delete: - deprecated: false - description: "" - operationId: removeManageAppMasterRoleFromUser - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: the user which role removed from - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 移除AppMaster (new added) - tags: - - Permission Management - x-accepts: application/json - post: - deprecated: false - description: "" - operationId: addManageAppMasterRoleToUser - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: the user which role assign to - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 分配AppMaster (new added) - tags: - - Permission Management - x-accepts: application/json - /openapi/v1/system/role/manage-app-master: - get: - deprecated: false - description: "" - operationId: isManageAppMasterPermissionEnabled - parameters: [] - responses: - "200": - content: - application/json: - example: - members: - ? "" - : {} - schema: - additionalProperties: - type: boolean - type: object - description: "" - summary: 校验AppMaster开关 (new added) - tags: - - Permission Management - x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/accesskeys: - get: - deprecated: false - description: "" - operationId: findAccessKeys - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedByDisplayName: "" - dataChangeLastModifiedByDisplayName: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - secret: "" - appId: "" - mode: 0 - enabled: false - schema: - items: - $ref: '#/components/schemas/OpenAccessKeyDTO' - type: array - description: "" - summary: 查找AccessKey - tags: - - AccessKey Management - x-accepts: application/json - post: - deprecated: false - description: "" - operationId: createAccessKey - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedByDisplayName: "" - dataChangeLastModifiedByDisplayName: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - secret: "" - appId: "" - mode: 0 - enabled: false - schema: - $ref: '#/components/schemas/OpenAccessKeyDTO' - description: "" - summary: 创建AccessKey - tags: - - AccessKey Management - x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}: - delete: - deprecated: false - description: "" - operationId: deleteAccessKey - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: accessKeyId - required: true - schema: - format: int64 - type: integer - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 删除AccessKey - tags: - - AccessKey Management - x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/activation: - put: - deprecated: false - description: "" - operationId: enableAccessKey - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: accessKeyId - required: true - schema: - format: int64 - type: integer - style: simple - - description: "" - example: 0 - explode: true - in: query - name: mode - required: false - schema: - default: 0 - type: integer - style: form - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 启用AccessKey - tags: - - AccessKey Management - x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/deactivation: - put: - deprecated: false - description: "" - operationId: disableAccessKey - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: accessKeyId - required: true - schema: - format: int64 - type: integer - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 禁用AccessKey - tags: - - AccessKey Management - x-accepts: application/json - /openapi/v1/user: - get: - deprecated: false - description: GET /openapi/v1/user - operationId: getCurrentUser - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/OpenUserInfoDTO' - description: 成功获取当前用户 - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 未登录或未授权访问 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 仅支持Portal用户登录态访问 - summary: 获取当前Portal用户(new added) - tags: - - User Management - x-accepts: application/json - /openapi/v1/users: - get: - deprecated: false - description: GET /openapi/v1/users,支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - operationId: searchUsers - parameters: - - description: 用户名、显示名或邮箱关键字 - explode: true - in: query - name: keyword - required: true - schema: - type: string - style: form - - description: 是否包含禁用用户 - explode: true - in: query - name: includeInactiveUsers - required: false - schema: - default: false - type: boolean - style: form - - description: 偏移量 - explode: true - in: query - name: offset - required: false - schema: - default: 0 - minimum: 0 - type: integer - style: form - - description: 返回数量 - explode: true - in: query - name: limit - required: false - schema: - default: 10 - minimum: 1 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/OpenUserInfoDTO' - type: array - description: 成功获取用户列表 - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 未登录或未授权访问 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 搜索用户(new added) - tags: - - User Management - x-accepts: application/json - post: - deprecated: false - description: POST /openapi/v1/users,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - operationId: createOrUpdateUser - parameters: - - description: true 表示创建用户,false 表示更新用户 - explode: true - in: query - name: isCreate - required: false - schema: - default: false - type: boolean - style: form - - description: 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenUserDTO' - required: true - responses: - "200": - description: 用户创建或更新成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 创建或更新用户(new added) - tags: - - User Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/users/{userId}: - get: - deprecated: false - description: "GET /openapi/v1/users/{userId},支持Portal用户登录态或具备ManageUsers权限的\ - Consumer Token访问" - operationId: getUserByUserId - parameters: - - description: 用户ID - explode: false - in: path - name: userId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/OpenUserInfoDTO' - description: 成功获取用户 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误或用户不存在 - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 未登录或未认证 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 获取指定用户(new added) - tags: - - User Management - x-accepts: application/json - /openapi/v1/users/enabled: - put: - deprecated: false - description: PUT /openapi/v1/users/enabled,Portal用户登录态使用当前登录用户作为operator;Consumer - Token访问时需要具备ManageUsers权限并传入有效operator - operationId: changeUserEnabled - parameters: - - description: 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenUserDTO' - required: true - responses: - "200": - description: 用户状态修改成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 修改用户启用状态(new added) - tags: - - User Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/apollo/audit/properties: - get: - deprecated: false - description: GET /openapi/v1/apollo/audit/properties - operationId: getAuditProperties - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功获取审计配置 - summary: 获取审计配置(new added) - tags: - - Portal Management - x-accepts: application/json - /openapi/v1/apollo/audit/logs: - get: - deprecated: false - description: GET /openapi/v1/apollo/audit/logs - operationId: findAuditLogs - parameters: - - explode: true - in: query - name: page - required: false - schema: - default: 0 - type: integer - style: form - - explode: true - in: query - name: size - required: false - schema: - default: 10 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功获取审计日志 - summary: 查询审计日志(new added) - tags: - - Portal Management - x-accepts: application/json - /openapi/v1/apollo/audit/logs/opName: - get: - deprecated: false - description: GET /openapi/v1/apollo/audit/logs/opName - operationId: findAuditLogsByOpName - parameters: - - explode: true - in: query - name: opName - required: true - schema: - type: string - style: form - - explode: true - in: query - name: page - required: false - schema: - default: 0 - type: integer - style: form - - explode: true - in: query - name: size - required: false - schema: - default: 10 - type: integer - style: form - - explode: true - in: query - name: startDate - required: false - schema: - type: string - style: form - - explode: true - in: query - name: endDate - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功获取审计日志 - summary: 按操作名查询审计日志(new added) - tags: - - Portal Management - x-accepts: application/json - /openapi/v1/apollo/audit/trace: - get: - deprecated: false - description: GET /openapi/v1/apollo/audit/trace - operationId: findAuditTraceDetails - parameters: - - explode: true - in: query - name: traceId - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功获取审计链路详情 - summary: 查询审计链路详情(new added) - tags: - - Portal Management - x-accepts: application/json - /openapi/v1/apollo/audit/logs/dataInfluences/field: - get: - deprecated: false - description: GET /openapi/v1/apollo/audit/logs/dataInfluences/field - operationId: findAuditDataInfluencesByField - parameters: - - explode: true - in: query - name: entityName - required: true - schema: - type: string - style: form - - explode: true - in: query - name: entityId - required: true - schema: - type: string - style: form - - explode: true - in: query - name: fieldName - required: true - schema: - type: string - style: form - - explode: true - in: query - name: page - required: false - schema: - default: 0 - type: integer - style: form - - explode: true - in: query - name: size - required: false - schema: - default: 10 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功获取审计数据影响 - summary: 查询审计数据影响(new added) - tags: - - Portal Management - x-accepts: application/json - /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator: - get: - deprecated: false - description: GET /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator - operationId: searchAuditLogs - parameters: - - explode: true - in: query - name: query - required: true - schema: - type: string - style: form - - explode: true - in: query - name: page - required: false - schema: - default: 0 - type: integer - style: form - - explode: true - in: query - name: size - required: false - schema: - default: 10 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功搜索审计日志 - summary: 搜索审计日志(new added) - tags: - - Portal Management - x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits" - operationId: findCommits - parameters: - - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - explode: true - in: query - name: key - required: false - schema: - type: string - style: form - - explode: true - in: query - name: page - required: false - schema: - default: 0 - type: integer - style: form - - explode: true - in: query - name: size - required: false - schema: - default: 10 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功获取提交记录 - summary: 查询命名空间提交记录(new added) - tags: - - Portal Management - x-accepts: application/json - /openapi/v1/page-settings: - get: - deprecated: false - description: GET /openapi/v1/page-settings - operationId: getPageSettings - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功获取页面配置 - summary: 获取Portal页面配置(new added) - tags: - - Portal Management - x-accepts: application/json - /openapi/v1/consumers: - get: - deprecated: false - description: GET /openapi/v1/consumers - operationId: getConsumerList - parameters: - - explode: true - in: query - name: page - required: false - schema: - default: 0 - type: integer - style: form - - explode: true - in: query - name: size - required: false - schema: - default: 10 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功获取消费者列表 - summary: 查询开放平台消费者列表(new added) - tags: - - Portal Management - x-accepts: application/json - post: - deprecated: false - description: POST /openapi/v1/consumers - operationId: createConsumer - parameters: - - explode: true - in: query - name: expires - required: false - schema: - description: yyyyMMddHHmmss - type: string - style: form - requestBody: - content: - application/json: - schema: - type: object - required: true - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功创建消费者 - summary: 创建开放平台消费者(new added) - tags: - - Portal Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/consumer-tokens/by-appId: - get: - deprecated: false - description: GET /openapi/v1/consumer-tokens/by-appId - operationId: getConsumerTokenByAppId - parameters: - - explode: true - in: query - name: appId - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功获取消费者Token - summary: 按应用ID查询消费者Token(new added) - tags: - - Portal Management - x-accepts: application/json - /openapi/v1/consumers/{token}/assign-role: - post: - deprecated: false - description: "POST /openapi/v1/consumers/{token}/assign-role" - operationId: assignRoleToConsumer - parameters: - - explode: false - in: path - name: token - required: true - schema: - type: string - style: simple - - explode: true - in: query - name: type - required: true - schema: - type: string - style: form - - explode: true - in: query - name: envs - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - type: object - required: true - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功授权 - summary: 给消费者授权(new added) - tags: - - Portal Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/consumers/by-appId: - delete: - deprecated: false - description: DELETE /openapi/v1/consumers/by-appId - operationId: deleteConsumer - parameters: - - explode: true - in: query - name: appId - required: true - schema: - type: string - style: form - responses: - "200": - description: 成功删除消费者 - summary: 按应用ID删除消费者(new added) - tags: - - Portal Management - x-accepts: application/json - /openapi/v1/import: - post: - deprecated: false - description: POST /openapi/v1/import - operationId: importConfig - parameters: - - explode: true - in: query - name: envs - required: true - schema: - type: string - style: form - - explode: true - in: query - name: conflictAction - required: false - schema: - default: ignore - type: string - style: form - requestBody: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/importConfig_request' - required: true - responses: - "200": - description: 导入成功 - summary: 导入配置兼容入口(new added) - tags: - - Portal Management - x-content-type: multipart/form-data - x-accepts: application/json - /openapi/v1/favorites: - get: - deprecated: false - description: GET /openapi/v1/favorites - operationId: findFavorites - parameters: - - explode: true - in: query - name: userId - required: false - schema: - type: string - style: form - - explode: true - in: query - name: appId - required: false - schema: - type: string - style: form - - explode: true - in: query - name: page - required: false - schema: - default: 0 - type: integer - style: form - - explode: true - in: query - name: size - required: false - schema: - default: 10 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功获取收藏 - summary: 查询收藏(new added) - tags: - - Portal Management - x-accepts: application/json - post: - deprecated: false - description: POST /openapi/v1/favorites - operationId: addFavorite - requestBody: - content: - application/json: - schema: - type: object - required: true - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功添加收藏 - summary: 添加收藏(new added) - tags: - - Portal Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/favorites/{favoriteId}: - delete: - deprecated: false - description: "DELETE /openapi/v1/favorites/{favoriteId}" - operationId: deleteFavorite - parameters: - - explode: false - in: path - name: favoriteId - required: true - schema: - format: int64 - type: integer - style: simple - responses: - "200": - description: 成功删除收藏 - summary: 删除收藏(new added) - tags: - - Portal Management - x-accepts: application/json - put: - deprecated: false - description: "PUT /openapi/v1/favorites/{favoriteId}" - operationId: topFavorite - parameters: - - explode: false - in: path - name: favoriteId - required: true - schema: - format: int64 - type: integer - style: simple - responses: - "200": - description: 成功置顶收藏 - summary: 收藏置顶(new added) - tags: - - Portal Management - x-accepts: application/json - /openapi/v1/global-search/item-info/by-key-or-value: - get: - deprecated: false - description: GET /openapi/v1/global-search/item-info/by-key-or-value - operationId: searchItemInfoByKeyOrValue - parameters: - - explode: true - in: query - name: key - required: false - schema: - default: "" - type: string - style: form - - explode: true - in: query - name: value - required: false - schema: - default: "" - type: string - style: form - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功搜索配置 - summary: 按Key或Value全局搜索配置(new added) - tags: - - Portal Management - x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories" - operationId: findReleaseHistoriesByNamespace - parameters: - - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - explode: true - in: query - name: page - required: false - schema: - default: 0 - type: integer - style: form - - explode: true - in: query - name: size - required: false - schema: - default: 10 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功获取发布历史 - summary: 查询命名空间发布历史(new added) - tags: - - Portal Management - x-accepts: application/json - /openapi/v1/server/portal-db/config: - delete: - deprecated: false - description: DELETE /openapi/v1/server/portal-db/config - operationId: deletePortalDBConfig - parameters: - - explode: true - in: query - name: key - required: true - schema: - type: string - style: form - responses: - "200": - description: 成功删除配置 - summary: 删除Portal DB配置(new added) - tags: - - Portal Management - x-accepts: application/json - post: - deprecated: false - description: POST /openapi/v1/server/portal-db/config - operationId: createOrUpdatePortalDBConfig - requestBody: - content: - application/json: - schema: - type: object - required: true - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功创建或更新配置 - summary: 创建或更新Portal DB配置(new added) - tags: - - Portal Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/server/envs/{env}/config-db/config: - delete: - deprecated: false - description: "DELETE /openapi/v1/server/envs/{env}/config-db/config" - operationId: deleteConfigDBConfig - parameters: - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - explode: true - in: query - name: key - required: true - schema: - type: string - style: form - - explode: true - in: query - name: cluster - required: true - schema: - type: string - style: form - responses: - "200": - description: 成功删除配置 - summary: 删除Config DB配置(new added) - tags: - - Portal Management - x-accepts: application/json - post: - deprecated: false - description: "POST /openapi/v1/server/envs/{env}/config-db/config" - operationId: createOrUpdateConfigDBConfig - parameters: - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - type: object - required: true - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功创建或更新配置 - summary: 创建或更新Config DB配置(new added) - tags: - - Portal Management - x-content-type: application/json - x-accepts: application/json - /openapi/v1/server/portal-db/config/find-all-config: - get: - deprecated: false - description: GET /openapi/v1/server/portal-db/config/find-all-config - operationId: findAllPortalDBConfig - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功获取配置列表 - summary: 查询全部Portal DB配置(new added) - tags: - - Portal Management - x-accepts: application/json - /openapi/v1/server/envs/{env}/config-db/config/find-all-config: - get: - deprecated: false - description: "GET /openapi/v1/server/envs/{env}/config-db/config/find-all-config" - operationId: findAllConfigDBConfig - parameters: - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功获取配置列表 - summary: 查询指定环境全部Config DB配置(new added) - tags: - - Portal Management - x-accepts: application/json - /openapi/v1/system-info: - get: - deprecated: false - description: GET /openapi/v1/system-info - operationId: getSystemInfo - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功获取系统信息 - summary: 获取系统信息(new added) - tags: - - Portal Management - x-accepts: application/json - /openapi/v1/system-info/health: - get: - deprecated: false - description: GET /openapi/v1/system-info/health - operationId: checkSystemHealth - parameters: - - explode: true - in: query - name: instanceId - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功获取健康状态 - summary: 检查系统实例健康状态(new added) - tags: - - Portal Management - x-accepts: application/json - /openapi/v1/configs/export: - get: - deprecated: false - description: GET /openapi/v1/configs/export - operationId: exportAllConfigs - parameters: - - explode: true - in: query - name: envs - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/octet-stream: - schema: - format: binary - type: string - description: 成功导出配置 - summary: 导出所有配置(new added) - tags: - - Portal Management - x-accepts: application/octet-stream - /openapi/v1/configs/import: - post: - deprecated: false - description: POST /openapi/v1/configs/import - operationId: importAllConfigs - parameters: - - explode: true - in: query - name: envs - required: true - schema: - type: string - style: form - - explode: true - in: query - name: conflictAction - required: false - schema: - default: ignore - type: string - style: form - requestBody: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/importConfig_request' - required: true - responses: - "200": - description: 导入成功 - summary: 导入所有配置(new added) - tags: - - Portal Management - x-content-type: multipart/form-data - x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export" - operationId: exportAppConfig - parameters: - - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/octet-stream: - schema: - format: binary - type: string - description: 成功导出应用配置 - summary: 导出应用配置(new added) - tags: - - Portal Management - x-accepts: application/octet-stream - head: - deprecated: false - description: "HEAD /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export" - operationId: checkExportAppConfig - parameters: - - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - responses: - "200": - description: 可导出 - summary: 检查应用配置导出权限(new added) - tags: - - Portal Management - x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import: - post: - deprecated: false - description: "POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import" - operationId: importAppConfig - parameters: - - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - explode: true - in: query - name: conflictAction - required: false - schema: - default: ignore - type: string - style: form - requestBody: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/importConfig_request' - required: true - responses: - "200": - description: 导入成功 - summary: 导入应用配置(new added) - tags: - - Portal Management - x-content-type: multipart/form-data - x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export" - operationId: exportNamespaceItems - parameters: - - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/octet-stream: - schema: - format: binary - type: string - description: 成功导出命名空间配置项 - summary: 导出命名空间配置项(new added) - tags: - - Portal Management - x-accepts: application/octet-stream - /openapi/v1/apps/search/by-appid-or-name: - get: - deprecated: false - description: GET /openapi/v1/apps/search/by-appid-or-name - operationId: searchAppsByAppIdOrName - parameters: - - explode: true - in: query - name: query - required: false - schema: - type: string - style: form - - explode: true - in: query - name: page - required: false - schema: - default: 0 - type: integer - style: form - - explode: true - in: query - name: size - required: false - schema: - default: 20 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功搜索应用 - summary: 按应用ID或名称搜索应用(new added) - tags: - - Portal Management - x-accepts: application/json - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import: - post: - deprecated: false - description: "POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import" - operationId: importNamespaceItems - parameters: - - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - requestBody: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/importConfig_request' - required: true - responses: - "200": - description: 导入成功 - summary: 导入命名空间配置项(new added) - tags: - - Portal Management - x-content-type: multipart/form-data - x-accepts: application/json -components: - schemas: - OpenAppDTO: - description: Apollo应用信息数据传输对象,包含应用的基本信息和元数据 - example: - dataChangeCreatedTime: 2025-09-29T12:34:56Z - orgName: orgName - dataChangeCreatedBy: dataChangeCreatedBy - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - orgId: orgId - ownerEmail: ownerEmail - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - ownerName: ownerName - ownerDisplayName: ownerDisplayName - appId: appId - name: name - properties: - dataChangeCreatedBy: - description: 数据创建者用户名,记录是谁创建了这个应用 - type: string - dataChangeCreatedByDisplayName: - description: 数据创建者显示名称,用于展示创建者的友好名称 - type: string - dataChangeLastModifiedBy: - description: 数据最后修改者用户名,记录最后一次修改应用信息的用户 - type: string - dataChangeLastModifiedByDisplayName: - description: 数据最后修改者显示名称,用于展示最后修改者的友好名称 - type: string - dataChangeCreatedTime: - description: 数据创建时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - dataChangeLastModifiedTime: - description: 数据最后修改时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - name: - description: 应用名称,用于显示的友好名称 - type: string - appId: - description: 应用唯一标识符,全局唯一的应用ID - type: string - orgId: - description: 组织ID,应用所属组织的唯一标识 - type: string - orgName: - description: 组织名称,应用所属组织的显示名称 - type: string - ownerName: - description: 应用负责人姓名,应用的主要负责人 - type: string - ownerEmail: - description: 应用负责人邮箱地址,用于接收应用相关通知 - type: string - ownerDisplayName: - type: string - type: object - OpenCreateAppDTO: - description: 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 - example: - app: - dataChangeCreatedTime: 2025-09-29T12:34:56Z - orgName: orgName - dataChangeCreatedBy: dataChangeCreatedBy - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - orgId: orgId - ownerEmail: ownerEmail - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - ownerName: ownerName - ownerDisplayName: ownerDisplayName - appId: appId - name: name - assignAppRoleToSelf: true - admins: - - admins - - admins - properties: - assignAppRoleToSelf: - description: 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 - type: boolean - admins: - description: 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 - items: - type: string - type: array - uniqueItems: true - app: - $ref: '#/components/schemas/OpenAppDTO' - type: object - OpenItemDTO: - description: Apollo配置项核心数据对象,仅包含键值及基础审计信息 - example: - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - properties: - key: - description: 配置项的键名,在同一命名空间内唯一标识一个配置项 - type: string - value: - description: 配置项的值,可以是字符串、数字、JSON等格式 - type: string - type: - description: 配置项类型 - type: integer - comment: - description: 配置项的注释说明,用于描述配置项的用途和含义 - type: string - lineNum: - description: 配置项在命名空间中的行号,用于保持和旧版 Portal 配置项列表一致的默认展示顺序 - format: int32 - type: integer - extendInfo: - $ref: '#/components/schemas/OpenItemExtendDTO' - dataChangeCreatedBy: - description: 配置项创建者用户名,记录是谁创建了这个配置项 - type: string - dataChangeCreatedByDisplayName: - description: 配置项创建者显示名称,用于展示创建者的友好名称 - type: string - dataChangeLastModifiedBy: - description: 配置项最后修改者用户名,记录最后一次修改配置的用户 - type: string - dataChangeLastModifiedByDisplayName: - description: 配置项最后修改者显示名称,用于展示最后修改者的友好名称 - type: string - dataChangeCreatedTime: - description: 配置项创建时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - dataChangeLastModifiedTime: - description: 配置项最后修改时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - type: object - OpenItemExtendDTO: - description: Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 - example: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - properties: - namespaceId: - description: 所属命名空间的ID - format: int64 - type: integer - isModified: - description: 是否有未发布的修改 - type: boolean - isDeleted: - description: 是否被标记为删除(未发布) - type: boolean - isNewlyAdded: - description: 是否为新添加的配置项(未发布) - type: boolean - newValue: - description: 新的值 - type: string - oldValue: - description: 上一次发布的值,用于对比变更 - type: string - type: object - OpenItemPageDTO: - description: 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 - example: - total: 1 - size: 6 - page: 0 - content: - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - properties: - page: - description: 当前页码,从0开始计数 - type: integer - size: - description: 每页显示的记录数量 - type: integer - total: - description: 总记录数,符合查询条件的配置项总数量 - format: int64 - type: integer - content: - description: 当前页的配置项列表,包含具体的配置项数据 - items: - $ref: '#/components/schemas/OpenItemDTO' - type: array - type: object - OpenClusterDTO: - description: Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 - example: - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - name: name - parentClusterId: 1 - comment: comment - id: 6 - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - properties: - dataChangeCreatedBy: - description: 集群创建者用户名,记录是谁创建了这个集群 - type: string - dataChangeCreatedByDisplayName: - description: 集群创建者显示名称,用于展示创建者的友好名称 - type: string - dataChangeLastModifiedBy: - description: 集群最后修改者用户名,记录最后一次修改集群信息的用户 - type: string - dataChangeLastModifiedByDisplayName: - description: 集群最后修改者显示名称,用于展示最后修改者的友好名称 - type: string - dataChangeCreatedTime: - description: 集群创建时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - dataChangeLastModifiedTime: - description: 集群最后修改时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - name: - description: 集群名称,在同一应用和环境下唯一标识一个集群 - type: string - appId: - description: 所属应用的唯一标识符 - type: string - id: - description: 集群的唯一标识符 - format: int64 - type: integer - parentClusterId: - description: 父集群的ID - format: int64 - type: integer - comment: - description: 集群的备注说明 - type: string - type: object - MapString: - additionalProperties: - type: string - type: object - OpenReleaseDTO: - description: Apollo发布信息数据传输对象,表示一次配置发布的完整信息 - example: - dataChangeCreatedTime: 2025-09-29T12:34:56Z - configurations: - key: configurations - dataChangeCreatedBy: dataChangeCreatedBy - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - namespaceName: namespaceName - properties: - dataChangeCreatedBy: - description: 发布创建者用户名,记录是谁创建了这次发布 - type: string - dataChangeCreatedByDisplayName: - description: 发布创建者显示名称,用于展示创建者的友好名称 - type: string - dataChangeLastModifiedBy: - description: 发布最后修改者用户名,记录最后一次修改发布信息的用户 - type: string - dataChangeLastModifiedByDisplayName: - description: 发布最后修改者显示名称,用于展示最后修改者的友好名称 - type: string - dataChangeCreatedTime: - description: 发布创建时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - dataChangeLastModifiedTime: - description: 发布最后修改时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - id: - description: 发布记录的唯一标识符,系统自动生成 - format: int64 - type: integer - appId: - description: 所属应用的唯一标识符 - type: string - clusterName: - description: 所属集群的名称 - type: string - namespaceName: - description: 所属命名空间的名称 - type: string - name: - description: 发布名称,用于标识这次发布的版本或描述 - type: string - configurations: - additionalProperties: - type: string - type: object - comment: - description: 发布备注,描述本次发布的变更内容和目的 - type: string - type: object - NamespaceReleaseDTO: - description: 命名空间发布请求数据传输对象,用于创建新的配置发布 - example: - releaseComment: releaseComment - releasedBy: releasedBy - releaseTitle: releaseTitle - isEmergencyPublish: true - properties: - releaseTitle: - description: 发布标题,用于标识这次发布的名称或版本号 - type: string - releaseComment: - description: 发布备注,详细描述本次发布的变更内容和目的 - type: string - releasedBy: - description: 发布操作者用户名,记录是谁执行了这次发布操作 - type: string - isEmergencyPublish: - description: 是否为紧急发布,紧急发布可能会跳过某些审核流程 - type: boolean - type: object - NamespaceGrayDelReleaseDTO: - description: 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 - example: - releaseComment: releaseComment - releasedBy: releasedBy - grayDelKeys: - - grayDelKeys - - grayDelKeys - releaseTitle: releaseTitle - isEmergencyPublish: true - properties: - releaseTitle: - description: 发布标题,用于标识这次灰度删除发布的名称或版本号 - type: string - releaseComment: - description: 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 - type: string - releasedBy: - description: 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 - type: string - isEmergencyPublish: - description: 是否为紧急发布,紧急发布可能会跳过某些审核流程 - type: boolean - grayDelKeys: - description: 需要在灰度发布中删除的配置项键名列表 - items: - type: string - type: array - type: object - OpenAppNamespaceDTO: - description: Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 - example: - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - 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 - properties: - dataChangeCreatedBy: - description: 命名空间创建者用户名,记录是谁创建了这个应用命名空间 - type: string - dataChangeCreatedByDisplayName: - description: 命名空间创建者显示名称,用于展示创建者的友好名称 - type: string - dataChangeLastModifiedBy: - description: 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 - type: string - dataChangeLastModifiedByDisplayName: - description: 命名空间最后修改者显示名称,用于展示最后修改者的友好名称 - type: string - dataChangeCreatedTime: - description: 命名空间创建时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - dataChangeLastModifiedTime: - description: 命名空间最后修改时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - name: - description: 命名空间名称,在同一应用内唯一标识一个命名空间 - type: string - appId: - description: 所属应用的唯一标识符 - type: string - format: - description: 命名空间格式类型,如properties、xml、json、yml等 - type: string - isPublic: - description: 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - type: boolean - appendNamespacePrefix: - default: true - description: 对于公共命名空间,是否在命名空间名称前添加前缀 - type: boolean - comment: - description: 命名空间备注说明,描述命名空间的用途和包含的配置类型 - type: string - type: object - OpenNamespaceUsageDTO: - description: 命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 - example: - branchInstanceCount: 6 - envName: envName - instanceCount: 0 - appId: appId - clusterName: clusterName - linkedNamespaceCount: 1 - namespaceName: namespaceName - properties: - namespaceName: - description: 命名空间名称 - type: string - appId: - description: 所属应用的唯一标识符 - type: string - clusterName: - description: 所属集群名称 - type: string - envName: - description: 环境名称 - type: string - instanceCount: - description: 该命名空间关联的实例数量 - type: integer - branchInstanceCount: - description: 分支命名空间关联的实例数量 - type: integer - linkedNamespaceCount: - description: 关联到该公共命名空间的命名空间数量 - type: integer - type: object - OpenGrayReleaseRuleItemDTO: - description: Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 - example: - clientIpList: - - clientIpList - - clientIpList - clientLabelList: - - clientLabelList - - clientLabelList - clientAppId: clientAppId - properties: - clientAppId: - description: 客户端应用ID,指定哪个应用可以获取灰度配置 - type: string - clientIpList: - description: 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 - items: - type: string - type: array - uniqueItems: true - clientLabelList: - description: 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 - items: - type: string - type: array - uniqueItems: true - type: object - OpenGrayReleaseRuleDTO: - description: Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 - example: - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - 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 - properties: - dataChangeCreatedBy: - description: 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 - type: string - dataChangeCreatedByDisplayName: - description: 灰度规则创建者显示名称,用于展示创建者的友好名称 - type: string - dataChangeLastModifiedBy: - description: 灰度规则最后修改者用户名,记录最后一次修改规则的用户 - type: string - dataChangeLastModifiedByDisplayName: - description: 灰度规则最后修改者显示名称,用于展示最后修改者的友好名称 - type: string - dataChangeCreatedTime: - description: 灰度规则创建时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - dataChangeLastModifiedTime: - description: 灰度规则最后修改时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - appId: - description: 所属应用的唯一标识符 - type: string - clusterName: - description: 所属集群的名称 - type: string - namespaceName: - description: 所属命名空间的名称 - type: string - branchName: - description: 灰度分支名称,标识灰度发布的分支 - type: string - ruleItems: - description: 灰度发布规则项列表,包含具体的灰度规则条件 - items: - $ref: '#/components/schemas/OpenGrayReleaseRuleItemDTO' - type: array - uniqueItems: true - type: object - OpenCreateNamespaceDTO: - description: Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - example: - appNamespaceName: appNamespaceName - appId: appId - clusterName: clusterName - env: env - properties: - appId: - description: 所属应用的唯一标识符 - type: string - env: - description: 所在那个环境创建 - type: string - clusterName: - description: 所属集群的名称 - type: string - appNamespaceName: - description: 根据已创建的appnamespace来实例化namespace - type: string - type: object - OpenNamespaceDTO: - description: Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - example: - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeCreatedBy: dataChangeCreatedBy - format: format - extendInfo: - parentAppId: parentAppId - isConfigHidden: true - itemModifiedCnt: 0 - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - isPublic: true - comment: comment - items: - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - namespaceName: namespaceName - properties: - dataChangeCreatedBy: - description: 命名空间创建者用户名,记录是谁创建了这个命名空间 - type: string - dataChangeCreatedByDisplayName: - description: 命名空间创建者显示名称,用于展示创建者的友好名称 - type: string - dataChangeLastModifiedBy: - description: 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 - type: string - dataChangeLastModifiedByDisplayName: - description: 命名空间最后修改者显示名称,用于展示最后修改者的友好名称 - type: string - dataChangeCreatedTime: - description: 命名空间创建时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - dataChangeLastModifiedTime: - description: 命名空间最后修改时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - appId: - description: 所属应用的唯一标识符 - type: string - clusterName: - description: 所属集群的名称 - type: string - namespaceName: - description: 命名空间名称,在同一应用和集群下唯一标识一个命名空间 - type: string - comment: - description: 命名空间备注说明,描述命名空间的用途 - type: string - format: - description: 命名空间格式类型,如properties、xml、json、yml等 - type: string - isPublic: - description: 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - type: boolean - items: - description: 命名空间包含的配置项列表 - items: - $ref: '#/components/schemas/OpenItemDTO' - type: array - extendInfo: - $ref: '#/components/schemas/OpenNamespaceExtendDTO' - type: object - OpenNamespaceExtendDTO: - example: - parentAppId: parentAppId - isConfigHidden: true - itemModifiedCnt: 0 - properties: - isConfigHidden: - description: 当当前用户无权限查看配置时置为 true - type: boolean - parentAppId: - description: 公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转 - type: string - itemModifiedCnt: - description: 未发布变更数 - type: integer - type: object - OpenNamespaceLockDTO: - description: Apollo命名空间锁状态数据传输对象 - example: - lockedBy: lockedBy - isLocked: true - namespaceName: namespaceName - isEmergencyPublishAllowed: true - properties: - namespaceName: - description: 命名空间名称 - type: string - isLocked: - description: 是否被锁定 - type: boolean - lockedBy: - description: 锁定者用户名 - type: string - isEmergencyPublishAllowed: - description: 是否允许紧急发布 - type: boolean - type: object - OpenInstancePageDTO: - description: 分页实例数据传输对象,用于返回分页查询的实例列表结果 - example: - total: 1 - size: 6 - instances: - - configs: - - releaseDeliveryTime: 2025-09-29T12:34:56Z - release: - dataChangeCreatedTime: 2025-09-29T12:34:56Z - configurations: - key: configurations - dataChangeCreatedBy: dataChangeCreatedBy - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - namespaceName: namespaceName - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - - releaseDeliveryTime: 2025-09-29T12:34:56Z - release: - dataChangeCreatedTime: 2025-09-29T12:34:56Z - configurations: - key: configurations - dataChangeCreatedBy: dataChangeCreatedBy - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - 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 - configurations: - key: configurations - dataChangeCreatedBy: dataChangeCreatedBy - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - namespaceName: namespaceName - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - - releaseDeliveryTime: 2025-09-29T12:34:56Z - release: - dataChangeCreatedTime: 2025-09-29T12:34:56Z - configurations: - key: configurations - dataChangeCreatedBy: dataChangeCreatedBy - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - namespaceName: namespaceName - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataCenter: dataCenter - appId: appId - clusterName: clusterName - ip: ip - id: 5 - page: 0 - properties: - page: - description: 当前页码,从0开始计数 - type: integer - size: - description: 每页显示的记录数量 - type: integer - total: - description: 总记录数,符合查询条件的实例总数量 - format: int64 - type: integer - instances: - description: 当前页的实例列表,包含具体的实例数据 - items: - $ref: '#/components/schemas/OpenInstanceDTO' - type: array - type: object - OpenEnvClusterDTO: - example: - env: env - clusters: - - clusters - - clusters - properties: - env: - description: 环境标识,例如 DEV、FAT、UAT、PROD - type: string - clusters: - description: 该环境下的集群名称列表 - items: - type: string - type: array - type: object - OpenEnvClusterInfo: - example: - code: 0 - message: message - env: env - clusters: - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - name: name - parentClusterId: 1 - comment: comment - id: 6 - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - name: name - parentClusterId: 1 - comment: comment - id: 6 - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - properties: - code: - description: 查询状态码 - type: integer - message: - description: 相关信息 - type: string - env: - description: 环境标识 - type: string - clusters: - description: 集群信息列表 - items: - $ref: '#/components/schemas/OpenClusterDTO' - type: array - type: object - OpenMissEnvDTO: - example: - code: 0 - message: message - properties: - code: - description: 查询状态码 - type: integer - message: - type: string - type: object - OpenNamespaceTextModel: - example: - configText: configText - namespaceId: 0 - appId: appId - clusterName: clusterName - format: format - env: env - namespaceName: namespaceName - operator: operator - properties: - appId: - description: 应用唯一标识 - type: string - env: - description: 环境标识 - type: string - clusterName: - description: 集群名称 - type: string - namespaceName: - description: 命名空间名称 - type: string - namespaceId: - description: 命名空间ID - format: int64 - type: integer - format: - description: 命名空间格式类型(properties/xml/json/yml等) - type: string - configText: - description: 配置内容的原始文本 - type: string - operator: - description: 操作者用户名 - type: string - type: object - OpenNamespaceIdentifier: - example: - appId: appId - clusterName: clusterName - env: env - namespaceName: namespaceName - properties: - appId: - description: 应用唯一标识 - type: string - env: - description: 环境标识 - type: string - clusterName: - description: 集群名称 - type: string - namespaceName: - description: 命名空间名称 - type: string - type: object - OpenItemDiffDTO: - example: - code: 0 - namespace: - appId: appId - clusterName: clusterName - env: env - namespaceName: namespaceName - deleteItems: - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - createItems: - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - message: message - updateItems: - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - properties: - code: - description: 查找结果 - type: integer - message: - description: 查找结果信息 - type: string - namespace: - $ref: '#/components/schemas/OpenNamespaceIdentifier' - createItems: - items: - $ref: '#/components/schemas/OpenItemDTO' - type: array - deleteItems: - items: - $ref: '#/components/schemas/OpenItemDTO' - type: array - updateItems: - items: - $ref: '#/components/schemas/OpenItemDTO' - type: array - type: object - OpenNamespaceSyncDTO: - example: - syncItems: - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - syncToNamespaces: - - appId: appId - clusterName: clusterName - env: env - namespaceName: namespaceName - - appId: appId - clusterName: clusterName - env: env - namespaceName: namespaceName - properties: - syncToNamespaces: - description: 目标命名空间标识列表 - items: - $ref: '#/components/schemas/OpenNamespaceIdentifier' - type: array - syncItems: - description: 需要修改的配置项列表 - items: - $ref: '#/components/schemas/OpenItemDTO' - type: array - type: object - OpenInstanceConfigDTO: - example: - releaseDeliveryTime: 2025-09-29T12:34:56Z - release: - dataChangeCreatedTime: 2025-09-29T12:34:56Z - configurations: - key: configurations - dataChangeCreatedBy: dataChangeCreatedBy - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - namespaceName: namespaceName - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - properties: - release: - $ref: '#/components/schemas/OpenReleaseDTO' - releaseDeliveryTime: - description: 配置下发时间(ISO 8601) - example: 2025-09-29T12:34:56Z - type: string - dataChangeLastModifiedTime: - description: 最后修改时间(ISO 8601) - example: 2025-09-29T12:34:56Z - type: string - type: object - OpenInstanceDTO: - example: - configs: - - releaseDeliveryTime: 2025-09-29T12:34:56Z - release: - dataChangeCreatedTime: 2025-09-29T12:34:56Z - configurations: - key: configurations - dataChangeCreatedBy: dataChangeCreatedBy - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - namespaceName: namespaceName - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - - releaseDeliveryTime: 2025-09-29T12:34:56Z - release: - dataChangeCreatedTime: 2025-09-29T12:34:56Z - configurations: - key: configurations - dataChangeCreatedBy: dataChangeCreatedBy - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - namespaceName: namespaceName - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataCenter: dataCenter - appId: appId - clusterName: clusterName - ip: ip - id: 5 - properties: - id: - description: 实例ID - format: int64 - type: integer - appId: - description: 实例所属应用ID - type: string - clusterName: - description: 实例所属集群名称 - type: string - dataCenter: - description: 数据中心/机房标识 - type: string - ip: - description: 实例IP地址 - type: string - configs: - description: 实例当前生效的配置列表 - items: - $ref: '#/components/schemas/OpenInstanceConfigDTO' - type: array - dataChangeCreatedTime: - description: 数据创建时间(ISO 8601) - example: 2025-09-29T12:34:56Z - type: string - type: object - OpenOrganizationDto: - example: - orgName: orgName - orgId: orgId - properties: - orgId: - description: 组织ID - type: string - orgName: - description: 组织名称 - type: string - type: object - ExceptionResponse: - example: - status: 404 - message: Resource not found - timestamp: 2025-09-29T12:34:56Z - exception: NotFoundException - properties: - status: - description: HTTP 状态码 - type: integer - message: - description: 错误信息 - type: string - timestamp: - description: 时间戳 - format: date-time - type: string - exception: - description: 错误类名 - type: string - type: object - OpenPermissionConditionDTO: - example: - hasPermission: true - properties: - hasPermission: - description: "" - type: boolean - type: object - OpenUserInfoDTO: - example: - name: name - userId: userId - email: email - enabled: 0 - properties: - userId: - description: "" - type: string - name: - description: "" - type: string - email: - description: "" - type: string - enabled: - description: "" - type: integer - type: object - OpenUserDTO: - example: - password: password - userDisplayName: userDisplayName - email: email - enabled: 0 - username: username - properties: - username: - description: 用户名 - type: string - userDisplayName: - description: 用户显示名 - type: string - password: - description: 用户密码 - type: string - email: - description: 用户邮箱 - type: string - enabled: - description: 是否启用,1 表示启用,0 表示禁用 - type: integer - type: object - OpenEnvNamespaceRoleUserDTO: - example: - releaseRoleUsers: - - name: name - userId: userId - email: email - enabled: 0 - - name: name - userId: userId - email: email - enabled: 0 - appId: appId - modifyRoleUsers: - - name: name - userId: userId - email: email - enabled: 0 - - name: name - userId: userId - email: email - enabled: 0 - env: env - namespaceName: namespaceName - properties: - appId: - description: "" - type: string - namespaceName: - description: "" - type: string - modifyRoleUsers: - description: "" - items: - $ref: '#/components/schemas/OpenUserInfoDTO' - type: array - releaseRoleUsers: - description: "" - items: - $ref: '#/components/schemas/OpenUserInfoDTO' - type: array - env: - description: "" - type: string - type: object - OpenClusterNamespaceRoleUserDTO: - example: - cluster: cluster - releaseRoleUsers: - - name: name - userId: userId - email: email - enabled: 0 - - name: name - userId: userId - email: email - enabled: 0 - appId: appId - modifyRoleUsers: - - name: name - userId: userId - email: email - enabled: 0 - - name: name - userId: userId - email: email - enabled: 0 - env: env - properties: - appId: - description: "" - type: string - env: - description: "" - type: string - cluster: - description: "" - type: string - modifyRoleUsers: - description: "" - items: - $ref: '#/components/schemas/OpenUserInfoDTO' - type: array - releaseRoleUsers: - description: "" - items: - $ref: '#/components/schemas/OpenUserInfoDTO' - type: array - type: object - OpenNamespaceRoleUserDTO: - example: - releaseRoleUsers: - - name: name - userId: userId - email: email - enabled: 0 - - name: name - userId: userId - email: email - enabled: 0 - appId: appId - modifyRoleUsers: - - name: name - userId: userId - email: email - enabled: 0 - - name: name - userId: userId - email: email - enabled: 0 - namespaceName: namespaceName - properties: - appId: - description: "" - type: string - namespaceName: - description: "" - type: string - modifyRoleUsers: - description: "" - items: - $ref: '#/components/schemas/OpenUserInfoDTO' - type: array - releaseRoleUsers: - description: "" - items: - $ref: '#/components/schemas/OpenUserInfoDTO' - type: array - type: object - OpenAppRoleUserDTO: - example: - appId: appId - masterUsers: - - name: name - userId: userId - email: email - enabled: 0 - - name: name - userId: userId - email: email - enabled: 0 - properties: - appId: - description: "" - type: string - masterUsers: - description: "" - items: - $ref: '#/components/schemas/OpenUserInfoDTO' - type: array - type: object - OpenReleaseDiffDTO: - example: - changes: - - newValue: newValue - changeType: changeType - oldValue: oldValue - key: key - - newValue: newValue - changeType: changeType - oldValue: oldValue - key: key - properties: - changes: - description: "A list of changes, ensuring order if necessary." - items: - $ref: '#/components/schemas/OpenReleaseChangeDTO' - type: array - type: object - OpenReleaseChangeDTO: - example: - newValue: newValue - changeType: changeType - oldValue: oldValue - key: key - properties: - changeType: - description: 修改类型 - type: string - key: - description: key - type: string - newValue: - description: new value - type: string - oldValue: - description: old value - type: string - type: object - OpenAccessKeyDTO: - example: - mode: 6 - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - id: 0 - secret: secret - dataChangeLastModifiedTime: dataChangeLastModifiedTime - enabled: true - 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 - secret: - description: "" - type: string - appId: - description: "" - type: string - mode: - description: "" - type: integer - enabled: - description: "" - type: boolean - type: object - StringToStringBoolMap: - additionalProperties: - additionalProperties: - type: boolean - type: object - example: - projectA: - featureX: true - featureY: false - projectB: - darkMode: true - type: object - importConfig_request: - properties: - file: - format: binary - type: string - type: object - securitySchemes: - ApiKeyAuth: - description: | - Apollo OpenAPI访问令牌 - **获取方式:** - 1. 登录Apollo Portal管理界面 - 2. 进入"管理员工具" -> "开放平台授权管理" - 3. 创建第三方应用,获取Token - **使用格式:** - ``` - Authorization: your_token_here - ``` - **权限说明:** - - Token具有对应应用的读写权限 - - 不同Token可能有不同的环境和命名空间权限 - - 建议为不同用途创建不同的Token - in: header - name: Authorization - type: apiKey diff --git a/java-client/build.gradle b/java-client/build.gradle deleted file mode 100644 index e4d88b01..00000000 --- a/java-client/build.gradle +++ /dev/null @@ -1,168 +0,0 @@ -apply plugin: 'idea' -apply plugin: 'eclipse' -apply plugin: 'java' -apply plugin: 'com.diffplug.spotless' - -group = 'com.apollo' -version = '0.3.8' - -buildscript { - repositories { - mavenCentral() - } - dependencies { - classpath 'com.android.tools.build:gradle:2.3.+' - classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' - classpath 'com.diffplug.spotless:spotless-plugin-gradle:6.11.0' - } -} - -repositories { - mavenCentral() -} -sourceSets { - main.java.srcDirs = ['src/main/java'] -} - -if(hasProperty('target') && target == 'android') { - - apply plugin: 'com.android.library' - apply plugin: 'com.github.dcendents.android-maven' - - android { - compileSdkVersion 25 - buildToolsVersion '25.0.2' - defaultConfig { - minSdkVersion 14 - targetSdkVersion 25 - } - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } - - // Rename the aar correctly - libraryVariants.all { variant -> - variant.outputs.each { output -> - def outputFile = output.outputFile - if (outputFile != null && outputFile.name.endsWith('.aar')) { - def fileName = "${project.name}-${variant.baseName}-${version}.aar" - output.outputFile = new File(outputFile.parent, fileName) - } - } - } - - dependencies { - provided "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - } - } - - afterEvaluate { - android.libraryVariants.all { variant -> - def task = project.tasks.create "jar${variant.name.capitalize()}", Jar - task.description = "Create jar artifact for ${variant.name}" - task.dependsOn variant.javaCompile - task.from variant.javaCompile.destinationDir - task.destinationDir = project.file("${project.buildDir}/outputs/jar") - task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" - artifacts.add('archives', task) - } - } - - task sourcesJar(type: Jar) { - from android.sourceSets.main.java.srcDirs - classifier = 'sources' - } - - artifacts { - archives sourcesJar - } - -} else { - - apply plugin: 'java' - apply plugin: 'maven-publish' - - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - - publishing { - publications { - maven(MavenPublication) { - artifactId = 'apollo-openapi-client' - from components.java - } - } - } - - task execute(type:JavaExec) { - main = System.getProperty('mainClass') - classpath = sourceSets.main.runtimeClasspath - } -} - -ext { - jakarta_annotation_version = "1.3.5" -} - -dependencies { - implementation 'io.swagger:swagger-annotations:1.6.8' - implementation "com.google.code.findbugs:jsr305:3.0.2" - 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.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.12.0' - implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version" - 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.9.1' -} - -javadoc { - options.tags = [ "http.response.details:a:Http Response Details" ] -} - -// Use spotless plugin to automatically format code, remove unused import, etc -// To apply changes directly to the file, run `gradlew spotlessApply` -// Ref: https://github.com/diffplug/spotless/tree/main/plugin-gradle -spotless { - // comment out below to run spotless as part of the `check` task - enforceCheck false - - format 'misc', { - // define the files (e.g. '*.gradle', '*.md') to apply `misc` to - target '.gitignore' - - // define the steps to apply to those files - trimTrailingWhitespace() - indentWithSpaces() // Takes an integer argument if you don't like 4 - endWithNewline() - } - java { - // don't need to set target, it is inferred from java - - // apply a specific flavor of google-java-format - googleJavaFormat('1.8').aosp().reflowLongStrings() - - removeUnusedImports() - importOrder() - } -} - -test { - // Enable JUnit 5 (Gradle 4.6+). - useJUnitPlatform() - - // Always run tests, even when nothing changed. - dependsOn 'cleanTest' - - // Show test results. - testLogging { - events "passed", "skipped", "failed" - } - -} diff --git a/java-client/build.sbt b/java-client/build.sbt deleted file mode 100644 index e2c2060c..00000000 --- a/java-client/build.sbt +++ /dev/null @@ -1,28 +0,0 @@ -lazy val root = (project in file(".")). - settings( - organization := "com.apollo", - name := "apollo-openapi-client", - version := "0.3.8", - scalaVersion := "2.11.4", - scalacOptions ++= Seq("-feature"), - 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.10.0", - "com.squareup.okhttp3" % "logging-interceptor" % "4.10.0", - "com.google.code.gson" % "gson" % "2.9.1", - "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.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.9.1" % "test", - "com.novocode" % "junit-interface" % "0.10" % "test", - "org.mockito" % "mockito-core" % "3.12.4" % "test" - ) - ) diff --git a/java-client/docs/AccessKeyManagementApi.md b/java-client/docs/AccessKeyManagementApi.md deleted file mode 100644 index 2be8c25d..00000000 --- a/java-client/docs/AccessKeyManagementApi.md +++ /dev/null @@ -1,380 +0,0 @@ -# AccessKeyManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createAccessKey**](AccessKeyManagementApi.md#createAccessKey) | **POST** /openapi/v1/apps/{appId}/envs/{env}/accesskeys | 创建AccessKey | -| [**deleteAccessKey**](AccessKeyManagementApi.md#deleteAccessKey) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId} | 删除AccessKey | -| [**disableAccessKey**](AccessKeyManagementApi.md#disableAccessKey) | **PUT** /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/deactivation | 禁用AccessKey | -| [**enableAccessKey**](AccessKeyManagementApi.md#enableAccessKey) | **PUT** /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/activation | 启用AccessKey | -| [**findAccessKeys**](AccessKeyManagementApi.md#findAccessKeys) | **GET** /openapi/v1/apps/{appId}/envs/{env}/accesskeys | 查找AccessKey | - - - -# **createAccessKey** -> OpenAccessKeyDTO createAccessKey(appId, env, operator) - -创建AccessKey - - - -### 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.AccessKeyManagementApi; - -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"); - - AccessKeyManagementApi apiInstance = new AccessKeyManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String operator = "operator_example"; // String | 操作人用户名 - try { - OpenAccessKeyDTO result = apiInstance.createAccessKey(appId, env, operator); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AccessKeyManagementApi#createAccessKey"); - 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**| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -[**OpenAccessKeyDTO**](OpenAccessKeyDTO.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** | | - | - - -# **deleteAccessKey** -> deleteAccessKey(appId, env, accessKeyId, operator) - -删除AccessKey - - - -### 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.AccessKeyManagementApi; - -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"); - - AccessKeyManagementApi apiInstance = new AccessKeyManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - Long accessKeyId = 56L; // Long | - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.deleteAccessKey(appId, env, accessKeyId, operator); - } catch (ApiException e) { - System.err.println("Exception when calling AccessKeyManagementApi#deleteAccessKey"); - 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**| | | -| **accessKeyId** | **Long**| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **disableAccessKey** -> disableAccessKey(appId, env, accessKeyId, operator) - -禁用AccessKey - - - -### 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.AccessKeyManagementApi; - -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"); - - AccessKeyManagementApi apiInstance = new AccessKeyManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - Long accessKeyId = 56L; // Long | - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.disableAccessKey(appId, env, accessKeyId, operator); - } catch (ApiException e) { - System.err.println("Exception when calling AccessKeyManagementApi#disableAccessKey"); - 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**| | | -| **accessKeyId** | **Long**| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **enableAccessKey** -> enableAccessKey(appId, env, accessKeyId, mode, operator) - -启用AccessKey - - - -### 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.AccessKeyManagementApi; - -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"); - - AccessKeyManagementApi apiInstance = new AccessKeyManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - Long accessKeyId = 56L; // Long | - Integer mode = 0; // Integer | - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.enableAccessKey(appId, env, accessKeyId, mode, operator); - } catch (ApiException e) { - System.err.println("Exception when calling AccessKeyManagementApi#enableAccessKey"); - 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**| | | -| **accessKeyId** | **Long**| | | -| **mode** | **Integer**| | [optional] [default to 0] | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **findAccessKeys** -> List<OpenAccessKeyDTO> findAccessKeys(appId, env) - -查找AccessKey - - - -### 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.AccessKeyManagementApi; - -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"); - - AccessKeyManagementApi apiInstance = new AccessKeyManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - try { - List result = apiInstance.findAccessKeys(appId, env); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AccessKeyManagementApi#findAccessKeys"); - 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**| | | - -### Return type - -[**List<OpenAccessKeyDTO>**](OpenAccessKeyDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | diff --git a/java-client/docs/AppManagementApi.md b/java-client/docs/AppManagementApi.md deleted file mode 100644 index b20e8841..00000000 --- a/java-client/docs/AppManagementApi.md +++ /dev/null @@ -1,795 +0,0 @@ -# AppManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**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) | -| [**getAppsBySelf**](AppManagementApi.md#getAppsBySelf) | **GET** /openapi/v1/apps/by-self | 获取当前Consumer/User的应用列表(分页)(new added) | -| [**getEnvClusterInfo**](AppManagementApi.md#getEnvClusterInfo) | **GET** /openapi/v1/apps/{appId}/env-cluster-info | 获取应用环境集群详情(new added) | -| [**getEnvClusters**](AppManagementApi.md#getEnvClusters) | **GET** /openapi/v1/apps/{appId}/envclusters | 获取应用的环境集群信息 (original openapi) | -| [**updateApp**](AppManagementApi.md#updateApp) | **PUT** /openapi/v1/apps/{appId} | 更新应用(new added) | - - - -# **createApp** -> createApp(openCreateAppDTO) - -创建应用 (original openapi) - -POST /openapi/v1/apps - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - OpenCreateAppDTO openCreateAppDTO = new OpenCreateAppDTO(); // OpenCreateAppDTO | - try { - apiInstance.createApp(openCreateAppDTO); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **openCreateAppDTO** | [**OpenCreateAppDTO**](OpenCreateAppDTO.md)| | | - -### Return type - -null (empty response body) - -### 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** | 权限不足 | - | - - -# **createAppInEnv** -> createAppInEnv(env, openAppDTO, operator) - -在指定环境创建应用(new added) - -POST /openapi/v1/apps/envs/{env} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String env = "env_example"; // String | 环境标识,例如 DEV、FAT、UAT、PROD - OpenAppDTO openAppDTO = new OpenAppDTO(); // OpenAppDTO | - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.createAppInEnv(env, openAppDTO, operator); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| 环境标识,例如 DEV、FAT、UAT、PROD | | -| **openAppDTO** | [**OpenAppDTO**](OpenAppDTO.md)| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### 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** | 权限不足 | - | - - -# **deleteApp** -> deleteApp(appId, operator) - -删除应用(new added) - -DELETE /openapi/v1/apps/{appId} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | 应用ID - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.deleteApp(appId, operator); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### 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** | 应用不存在 | - | - - -# **findApps** -> List<OpenAppDTO> findApps(appIds) - -查找应用 (original openapi) - -POST /openapi/v1/apps - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appIds = "123"; // String | 查找应用 - try { - List result = apiInstance.findApps(appIds); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appIds** | **String**| 查找应用 | [optional] | - -### Return type - -[**List<OpenAppDTO>**](OpenAppDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取应用列表 | - | -| **401** | 未授权访问 | - | - - -# **findAppsAuthorized** -> List<OpenAppDTO> findAppsAuthorized() - -获取当前Consumer授权的应用列表 (original openapi) - -GET /openapi/v1/apps/authorized - -### 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.findAppsAuthorized(); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**List<OpenAppDTO>**](OpenAppDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取授权应用列表 | - | -| **401** | 未授权访问 | - | - - -# **findMissEnvs** -> List<OpenMissEnvDTO> findMissEnvs(appId) - -查找缺失的环境(new added) - -GET /openapi/v1/apps/{appId}/miss-envs - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | 应用ID - try { - List result = apiInstance.findMissEnvs(appId); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | - -### Return type - -[**List<OpenMissEnvDTO>**](OpenMissEnvDTO.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** | 应用不存在 | - | - - -# **getApp** -> OpenAppDTO getApp(appId) - -获取单个应用信息(new added) - -GET /openapi/v1/apps/{appId} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | - try { - OpenAppDTO result = apiInstance.getApp(appId); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | - -### Return type - -[**OpenAppDTO**](OpenAppDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取应用信息 | - | -| **404** | 应用不存在 | - | - - -# **getAppsBySelf** -> List<OpenAppDTO> getAppsBySelf(page, size) - -获取当前Consumer/User的应用列表(分页)(new added) - -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); - Integer page = 56; // Integer | 页数 - Integer size = 56; // Integer | 页大小 - try { - List result = apiInstance.getAppsBySelf(page, size); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **page** | **Integer**| 页数 | | -| **size** | **Integer**| 页大小 | | - -### 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** | 未授权访问 | - | - - -# **getEnvClusterInfo** -> List<OpenEnvClusterInfo> getEnvClusterInfo(appId) - -获取应用环境集群详情(new added) - -/openapi/v1/apps/{appId}/env-cluster-info - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | 应用ID - try { - List result = apiInstance.getEnvClusterInfo(appId); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | - -### Return type - -[**List<OpenEnvClusterInfo>**](OpenEnvClusterInfo.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** | 成功获取应用环境集群详情 | - | - - -# **getEnvClusters** -> List<OpenEnvClusterDTO> getEnvClusters(appId) - -获取应用的环境集群信息 (original openapi) - -GET /openapi/v1/apps/{appId}/envclusters - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | 应用ID - try { - List result = apiInstance.getEnvClusters(appId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppManagementApi#getEnvClusters"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | - -### 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** | 应用不存在 | - | - - -# **updateApp** -> updateApp(appId, openAppDTO, operator) - -更新应用(new added) - -PUT /openapi/v1/apps/{appId} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppManagementApi apiInstance = new AppManagementApi(defaultClient); - String appId = "appId_example"; // String | 应用ID - OpenAppDTO openAppDTO = new OpenAppDTO(); // OpenAppDTO | - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.updateApp(appId, openAppDTO, operator); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | -| **openAppDTO** | [**OpenAppDTO**](OpenAppDTO.md)| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 应用更新成功 | - | -| **400** | 请求参数错误 | - | -| **403** | 权限不足 | - | diff --git a/java-client/docs/AppNamespaceManagementApi.md b/java-client/docs/AppNamespaceManagementApi.md deleted file mode 100644 index 85f386b7..00000000 --- a/java-client/docs/AppNamespaceManagementApi.md +++ /dev/null @@ -1,514 +0,0 @@ -# AppNamespaceManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createAppNamespace**](AppNamespaceManagementApi.md#createAppNamespace) | **POST** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace (original openapi) | -| [**deleteAppNamespace**](AppNamespaceManagementApi.md#deleteAppNamespace) | **DELETE** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace (new added) | -| [**findAppNamespace**](AppNamespaceManagementApi.md#findAppNamespace) | **GET** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace (new added) | -| [**findAppNamespaceUsage**](AppNamespaceManagementApi.md#findAppNamespaceUsage) | **GET** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage | 查询appnamespace使用情况(new added) | -| [**getAppNamespaces**](AppNamespaceManagementApi.md#getAppNamespaces) | **GET** /openapi/v1/appnamespaces | 获取所有公共AppNamespace (new added) | -| [**getAppNamespacesByAppId**](AppNamespaceManagementApi.md#getAppNamespacesByAppId) | **GET** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace (new added) | -| [**getPublicAppNamespaceInstances**](AppNamespaceManagementApi.md#getPublicAppNamespaceInstances) | **GET** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 (new added) | - - - -# **createAppNamespace** -> OpenAppNamespaceDTO createAppNamespace(appId, openAppNamespaceDTO, operator) - -创建AppNamespace (original openapi) - -POST /openapi/v1/apps/{appId}/appnamespaces - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppNamespaceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppNamespaceManagementApi apiInstance = new AppNamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | - OpenAppNamespaceDTO openAppNamespaceDTO = new OpenAppNamespaceDTO(); // OpenAppNamespaceDTO | - String operator = "operator_example"; // String | 操作人用户名 - try { - OpenAppNamespaceDTO result = apiInstance.createAppNamespace(appId, openAppNamespaceDTO, operator); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppNamespaceManagementApi#createAppNamespace"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **openAppNamespaceDTO** | [**OpenAppNamespaceDTO**](OpenAppNamespaceDTO.md)| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -[**OpenAppNamespaceDTO**](OpenAppNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | AppNamespace创建成功 | - | -| **400** | 请求参数错误 | - | -| **403** | 权限不足 | - | - - -# **deleteAppNamespace** -> deleteAppNamespace(appId, namespaceName, operator) - -删除AppNamespace (new added) - -DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppNamespaceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppNamespaceManagementApi apiInstance = new AppNamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | 应用ID - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.deleteAppNamespace(appId, namespaceName, operator); - } catch (ApiException e) { - System.err.println("Exception when calling AppNamespaceManagementApi#deleteAppNamespace"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | -| **namespaceName** | **String**| 命名空间名称 | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | AppNamespace删除成功 | - | - - -# **findAppNamespace** -> OpenAppNamespaceDTO findAppNamespace(appId, namespaceName, extendInfo) - -获取指定的AppNamespace (new added) - -GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppNamespaceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppNamespaceManagementApi apiInstance = new AppNamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | 应用ID - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - Boolean extendInfo = false; // Boolean | - try { - OpenAppNamespaceDTO result = apiInstance.findAppNamespace(appId, namespaceName, extendInfo); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppNamespaceManagementApi#findAppNamespace"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | -| **namespaceName** | **String**| 命名空间名称 | | -| **extendInfo** | **Boolean**| | [optional] [default to false] | - -### Return type - -[**OpenAppNamespaceDTO**](OpenAppNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取AppNamespace | - | - - -# **findAppNamespaceUsage** -> List<OpenNamespaceUsageDTO> findAppNamespaceUsage(appId, namespaceName) - -查询appnamespace使用情况(new added) - -GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppNamespaceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppNamespaceManagementApi apiInstance = new AppNamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | 应用ID - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - try { - List result = apiInstance.findAppNamespaceUsage(appId, namespaceName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppNamespaceManagementApi#findAppNamespaceUsage"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | -| **namespaceName** | **String**| 命名空间名称 | | - -### Return type - -[**List<OpenNamespaceUsageDTO>**](OpenNamespaceUsageDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | AppNamespaceUsage查询成功 | - | - - -# **getAppNamespaces** -> List<OpenAppNamespaceDTO> getAppNamespaces() - -获取所有公共AppNamespace (new added) - -GET /openapi/v1/appnamespaces/public - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppNamespaceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppNamespaceManagementApi apiInstance = new AppNamespaceManagementApi(defaultClient); - try { - List result = apiInstance.getAppNamespaces(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppNamespaceManagementApi#getAppNamespaces"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**List<OpenAppNamespaceDTO>**](OpenAppNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **getAppNamespacesByAppId** -> List<OpenAppNamespaceDTO> getAppNamespacesByAppId(appId) - -获取指定应用的AppNamespace (new added) - -GET /openapi/v1/apps/{appId}/appnamespaces - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppNamespaceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppNamespaceManagementApi apiInstance = new AppNamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | - try { - List result = apiInstance.getAppNamespacesByAppId(appId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppNamespaceManagementApi#getAppNamespacesByAppId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | - -### Return type - -[**List<OpenAppNamespaceDTO>**](OpenAppNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **getPublicAppNamespaceInstances** -> List<OpenNamespaceDTO> getPublicAppNamespaceInstances(env, publicNamespaceName, page, size) - -获取公共AppNamespace的所有实例 (new added) - -GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.AppNamespaceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - AppNamespaceManagementApi apiInstance = new AppNamespaceManagementApi(defaultClient); - String env = "env_example"; // String | 环境标识 - String publicNamespaceName = "publicNamespaceName_example"; // String | 公共命名空间名称 - Integer page = 0; // Integer | 页码,从0开始 - Integer size = 10; // Integer | 每页数量 - try { - List result = apiInstance.getPublicAppNamespaceInstances(env, publicNamespaceName, page, size); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AppNamespaceManagementApi#getPublicAppNamespaceInstances"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| 环境标识 | | -| **publicNamespaceName** | **String**| 公共命名空间名称 | | -| **page** | **Integer**| 页码,从0开始 | | -| **size** | **Integer**| 每页数量 | | - -### Return type - -[**List<OpenNamespaceDTO>**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取实例列表 | - | diff --git a/java-client/docs/ClusterManagementApi.md b/java-client/docs/ClusterManagementApi.md deleted file mode 100644 index 74172070..00000000 --- a/java-client/docs/ClusterManagementApi.md +++ /dev/null @@ -1,236 +0,0 @@ -# ClusterManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**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) | - - - -# **createCluster** -> OpenClusterDTO createCluster(appId, env, openClusterDTO) - -创建集群 (original openapi) - -POST /openapi/v1/envs/{env}/apps/{appId}/clusters - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ClusterManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ClusterManagementApi apiInstance = new ClusterManagementApi(defaultClient); - String appId = "appId_example"; // String | 应用ID - String env = "env_example"; // String | - OpenClusterDTO openClusterDTO = new OpenClusterDTO(); // OpenClusterDTO | - try { - OpenClusterDTO result = apiInstance.createCluster(appId, env, openClusterDTO); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | -| **env** | **String**| | | -| **openClusterDTO** | [**OpenClusterDTO**](OpenClusterDTO.md)| | | - -### Return type - -[**OpenClusterDTO**](OpenClusterDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 集群创建成功 | - | -| **400** | 请求参数错误 | - | -| **403** | 权限不足 | - | - - -# **deleteCluster** -> deleteCluster(env, appId, clusterName, operator) - -删除集群 (new added) - -DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ClusterManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ClusterManagementApi apiInstance = new ClusterManagementApi(defaultClient); - String env = "env_example"; // String | - String appId = "appId_example"; // String | - String clusterName = "clusterName_example"; // String | - String operator = "operator_example"; // String | 操作人用户名,openapi外部调用时需传入 - try { - apiInstance.deleteCluster(env, appId, clusterName, operator); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **appId** | **String**| | | -| **clusterName** | **String**| | | -| **operator** | **String**| 操作人用户名,openapi外部调用时需传入 | [optional] | - -### Return type - -null (empty response body) - -### 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** | 集群不存在 | - | - - -# **getCluster** -> OpenClusterDTO getCluster(appId, clusterName, env) - -获取指定集群信息 (original openapi) - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ClusterManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ClusterManagementApi apiInstance = new ClusterManagementApi(defaultClient); - String appId = "appId_example"; // String | - String clusterName = "clusterName_example"; // String | - String env = "env_example"; // String | - try { - OpenClusterDTO result = apiInstance.getCluster(appId, clusterName, env); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **clusterName** | **String**| | | -| **env** | **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** | 集群不存在 | - | diff --git a/java-client/docs/EnvironmentManagementApi.md b/java-client/docs/EnvironmentManagementApi.md deleted file mode 100644 index 80a39e78..00000000 --- a/java-client/docs/EnvironmentManagementApi.md +++ /dev/null @@ -1,73 +0,0 @@ -# EnvironmentManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**getEnvs**](EnvironmentManagementApi.md#getEnvs) | **GET** /openapi/v1/envs | 获取所有环境 | - - - -# **getEnvs** -> List<String> getEnvs() - -获取所有环境 - -GET /openapi/v1/envs - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.EnvironmentManagementApi; - -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"); - - EnvironmentManagementApi apiInstance = new EnvironmentManagementApi(defaultClient); - try { - List result = apiInstance.getEnvs(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling EnvironmentManagementApi#getEnvs"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**List<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** | 成功获取环境列表 | - | diff --git a/java-client/docs/ExceptionResponse.md b/java-client/docs/ExceptionResponse.md deleted file mode 100644 index 059e5bfe..00000000 --- a/java-client/docs/ExceptionResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# ExceptionResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**status** | **Integer** | HTTP 状态码 | [optional] | -|**message** | **String** | 错误信息 | [optional] | -|**timestamp** | **OffsetDateTime** | 时间戳 | [optional] | -|**exception** | **String** | 错误类名 | [optional] | diff --git a/java-client/docs/InstanceManagementApi.md b/java-client/docs/InstanceManagementApi.md deleted file mode 100644 index 98d6cb33..00000000 --- a/java-client/docs/InstanceManagementApi.md +++ /dev/null @@ -1,315 +0,0 @@ -# InstanceManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**getByNamespace**](InstanceManagementApi.md#getByNamespace) | **GET** /openapi/v1/envs/{env}/instances/by-namespace | 根据namespaceName查询实例(new added) | -| [**getByRelease**](InstanceManagementApi.md#getByRelease) | **GET** /openapi/v1/envs/{env}/instances/by-release | 根据发布版本查询实例(支持分页) (new added) | -| [**getByReleasesAndNamespaceNotIn**](InstanceManagementApi.md#getByReleasesAndNamespaceNotIn) | **GET** /openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in | 查询不在指定发布版本中的实例 (new added) | -| [**getInstanceCountByNamespace**](InstanceManagementApi.md#getInstanceCountByNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 (original openapi) | - - - -# **getByNamespace** -> OpenInstancePageDTO getByNamespace(env, appId, clusterName, namespaceName, page, size, instanceAppId) - -根据namespaceName查询实例(new added) - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.InstanceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - InstanceManagementApi apiInstance = new InstanceManagementApi(defaultClient); - String env = "env_example"; // String | 环境标识 - String appId = "appId_example"; // String | 应用ID - String clusterName = "clusterName_example"; // String | 集群名称 - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - Integer page = 0; // Integer | 页数 - Integer size = 0; // Integer | 页大小 - String instanceAppId = "instanceAppId_example"; // String | Instance表中的AppID - try { - OpenInstancePageDTO result = apiInstance.getByNamespace(env, appId, clusterName, namespaceName, page, size, instanceAppId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InstanceManagementApi#getByNamespace"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| 环境标识 | | -| **appId** | **String**| 应用ID | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | -| **page** | **Integer**| 页数 | [default to 0] | -| **size** | **Integer**| 页大小 | [default to 0] | -| **instanceAppId** | **String**| Instance表中的AppID | [optional] | - -### Return type - -[**OpenInstancePageDTO**](OpenInstancePageDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **getByRelease** -> OpenInstancePageDTO getByRelease(env, releaseId, page, size) - -根据发布版本查询实例(支持分页) (new added) - -GET /openapi/v1/envs/{env}/instances/by-release - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.InstanceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - InstanceManagementApi apiInstance = new InstanceManagementApi(defaultClient); - String env = "env_example"; // String | - Long releaseId = 56L; // Long | - Integer page = 0; // Integer | - Integer size = 20; // Integer | - try { - OpenInstancePageDTO result = apiInstance.getByRelease(env, releaseId, page, size); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **releaseId** | **Long**| | | -| **page** | **Integer**| | | -| **size** | **Integer**| | | - -### Return type - -[**OpenInstancePageDTO**](OpenInstancePageDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **getByReleasesAndNamespaceNotIn** -> List<OpenInstanceDTO> getByReleasesAndNamespaceNotIn(env, appId, clusterName, namespaceName, releaseIds) - -查询不在指定发布版本中的实例 (new added) - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.InstanceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - InstanceManagementApi apiInstance = new InstanceManagementApi(defaultClient); - String env = "env_example"; // String | 环境标识 - String appId = "appId_example"; // String | 应用ID - String clusterName = "clusterName_example"; // String | 集群名称 - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - String releaseIds = "releaseIds_example"; // String | 排除的发布ID列表,用逗号分隔 - try { - List result = apiInstance.getByReleasesAndNamespaceNotIn(env, appId, clusterName, namespaceName, releaseIds); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling InstanceManagementApi#getByReleasesAndNamespaceNotIn"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| 环境标识 | | -| **appId** | **String**| 应用ID | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | -| **releaseIds** | **String**| 排除的发布ID列表,用逗号分隔 | | - -### 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** | | - | - - -# **getInstanceCountByNamespace** -> Integer getInstanceCountByNamespace(env, appId, clusterName, namespaceName) - -获取命名空间下的实例数量 (original openapi) - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.InstanceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - InstanceManagementApi apiInstance = new InstanceManagementApi(defaultClient); - String env = "env_example"; // String | - String appId = "appId_example"; // String | 应用ID - String clusterName = "clusterName_example"; // String | 集群名称 - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - try { - Integer result = apiInstance.getInstanceCountByNamespace(env, appId, clusterName, namespaceName); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| | | -| **appId** | **String**| 应用ID | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | - -### Return type - -**Integer** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功返回实例数量 | - | diff --git a/java-client/docs/ItemManagementApi.md b/java-client/docs/ItemManagementApi.md deleted file mode 100644 index 00f493b0..00000000 --- a/java-client/docs/ItemManagementApi.md +++ /dev/null @@ -1,1133 +0,0 @@ -# ItemManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**batchUpdateItemsByText**](ItemManagementApi.md#batchUpdateItemsByText) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 通过文本批量修改配置项 (new added) | -| [**compareItems**](ItemManagementApi.md#compareItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff | 对比命名空间配置差异 (new added) | -| [**createItem**](ItemManagementApi.md#createItem) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 (original openapi) | -| [**deleteItem**](ItemManagementApi.md#deleteItem) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置项 (original openapi) | -| [**deleteItemByEncodedKey**](ItemManagementApi.md#deleteItemByEncodedKey) | **DELETE** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key删除配置项 (original openapi) | -| [**findBranchItems**](ItemManagementApi.md#findBranchItems) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 (new added) | -| [**findItemsByNamespace**](ItemManagementApi.md#findItemsByNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 获取命名空间下的配置项列表 (original openapi) | -| [**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/revocation | 撤销配置项更改 (new added) | -| [**syncItems**](ItemManagementApi.md#syncItems) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize | 同步配置项到多个命名空间 (new added) | -| [**syntaxCheck**](ItemManagementApi.md#syntaxCheck) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation | 验证配置文本语法 (new added) | -| [**updateItem**](ItemManagementApi.md#updateItem) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 更新配置项 (original openapi) | -| [**updateItemByEncodedKey**](ItemManagementApi.md#updateItemByEncodedKey) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key更新配置项 (original openapi) | - - - -# **batchUpdateItemsByText** -> batchUpdateItemsByText(appId, env, clusterName, namespaceName, openNamespaceTextModel, operator) - -通过文本批量修改配置项 (new added) - -PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ItemManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - OpenNamespaceTextModel openNamespaceTextModel = new OpenNamespaceTextModel(); // OpenNamespaceTextModel | - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.batchUpdateItemsByText(appId, env, clusterName, namespaceName, openNamespaceTextModel, operator); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#batchUpdateItemsByText"); - System.err.println("Status code: " + e.getCode()); - 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**| | | -| **openNamespaceTextModel** | [**OpenNamespaceTextModel**](OpenNamespaceTextModel.md)| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 批量更新配置项成功 | - | -| **403** | 权限不足 | - | - - -# **compareItems** -> List<OpenItemDiffDTO> compareItems(appId, env, clusterName, namespaceName, openNamespaceSyncDTO) - -对比命名空间配置差异 (new added) - -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff - -### 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 | 应用ID - String env = "env_example"; // String | 环境标识 - String clusterName = "clusterName_example"; // String | 集群名称 - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - OpenNamespaceSyncDTO openNamespaceSyncDTO = new OpenNamespaceSyncDTO(); // OpenNamespaceSyncDTO | - try { - List result = apiInstance.compareItems(appId, env, clusterName, namespaceName, openNamespaceSyncDTO); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | -| **env** | **String**| 环境标识 | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | -| **openNamespaceSyncDTO** | [**OpenNamespaceSyncDTO**](OpenNamespaceSyncDTO.md)| | | - -### Return type - -[**List<OpenItemDiffDTO>**](OpenItemDiffDTO.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** | 成功对比命名空间配置差异 | - | - - -# **createItem** -> OpenItemDTO createItem(appId, env, clusterName, namespaceName, openItemDTO, operator) - -创建新的配置项 (original openapi) - -POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ItemManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | 应用ID - String env = "env_example"; // String | 环境标识 - String clusterName = "clusterName_example"; // String | 集群名称 - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - OpenItemDTO openItemDTO = new OpenItemDTO(); // OpenItemDTO | - String operator = "operator_example"; // String | 操作人用户名 - try { - OpenItemDTO result = apiInstance.createItem(appId, env, clusterName, namespaceName, openItemDTO, operator); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#createItem"); - 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**| 命名空间名称 | | -| **openItemDTO** | [**OpenItemDTO**](OpenItemDTO.md)| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### 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** | 权限不足 | - | - - -# **deleteItem** -> deleteItem(appId, env, clusterName, namespaceName, key, operator) - -删除配置项 (original openapi) - -DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ItemManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | 应用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 { - apiInstance.deleteItem(appId, env, clusterName, namespaceName, key, operator); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#deleteItem"); - System.err.println("Status code: " + e.getCode()); - 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**| 命名空间名称 | | -| **key** | **String**| 配置项键名 | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 配置项删除成功 | - | - - -# **deleteItemByEncodedKey** -> deleteItemByEncodedKey(appId, env, clusterName, namespaceName, key, operator) - -通过编码的key删除配置项 (original openapi) - -DELETE /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 | - String operator = "operator_example"; // String | - try { - apiInstance.deleteItemByEncodedKey(appId, env, clusterName, namespaceName, key, operator); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#deleteItemByEncodedKey"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **key** | **String**| | | -| **operator** | **String**| | | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **findBranchItems** -> List<OpenItemDTO> findBranchItems(appId, env, clusterName, namespaceName, branchName) - -获取分支下的配置项 (new added) - -GET /openapi/v1/envs/{env}/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.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 | 应用ID - String env = "env_example"; // String | 环境标识 - String clusterName = "clusterName_example"; // String | 集群名称 - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - String branchName = "branchName_example"; // String | 分支名称 - try { - List result = apiInstance.findBranchItems(appId, env, clusterName, namespaceName, branchName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#findBranchItems"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | -| **env** | **String**| 环境标识 | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | -| **branchName** | **String**| 分支名称 | | - -### Return type - -[**List<OpenItemDTO>**](OpenItemDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取分支下的配置项列表 | - | -| **404** | 分支不存在 | - | - - -# **findItemsByNamespace** -> OpenItemPageDTO findItemsByNamespace(appId, env, clusterName, namespaceName, page, size) - -获取命名空间下的配置项列表 (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.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 | 应用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 { - OpenItemPageDTO result = apiInstance.findItemsByNamespace(appId, env, clusterName, namespaceName, page, size); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#findItemsByNamespace"); - 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**| 命名空间名称 | | -| **page** | **Integer**| 页码,从0开始 | | -| **size** | **Integer**| 每页数量 | | - -### Return type - -[**OpenItemPageDTO**](OpenItemPageDTO.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** | 命名空间不存在 | - | - - -# **getItem** -> OpenItemDTO getItem(appId, env, clusterName, namespaceName, key) - -获取单个配置项 (original openapi) - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ItemManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | 应用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.getItem(appId, env, clusterName, namespaceName, key); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | -| **env** | **String**| 环境标识 | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | -| **key** | **String**| 配置项键名 | | - -### Return type - -[**OpenItemDTO**](OpenItemDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取配置项 | - | -| **404** | 配置项不存在 | - | - - -# **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** -> revertItems(appId, env, clusterName, namespaceName, operator) - -撤销配置项更改 (new added) - -POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation - -### 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 operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.revertItems(appId, env, clusterName, namespaceName, operator); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#revertItems"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### 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** | 权限不足 | - | - - -# **syncItems** -> syncItems(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, operator) - -同步配置项到多个命名空间 (new added) - -POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: - -### 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 | 应用ID - String env = "env_example"; // String | 环境标识 - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - OpenNamespaceSyncDTO openNamespaceSyncDTO = new OpenNamespaceSyncDTO(); // OpenNamespaceSyncDTO | - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.syncItems(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, operator); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#syncItems"); - System.err.println("Status code: " + e.getCode()); - 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**| | | -| **openNamespaceSyncDTO** | [**OpenNamespaceSyncDTO**](OpenNamespaceSyncDTO.md)| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### 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** | 权限不足 | - | - - -# **syntaxCheck** -> syntaxCheck(appId, env, clusterName, namespaceName, openNamespaceTextModel) - -验证配置文本语法 (new added) - -POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation - -### 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 | - OpenNamespaceTextModel openNamespaceTextModel = new OpenNamespaceTextModel(); // OpenNamespaceTextModel | - try { - apiInstance.syntaxCheck(appId, env, clusterName, namespaceName, openNamespaceTextModel); - } catch (ApiException e) { - System.err.println("Exception when calling ItemManagementApi#syntaxCheck"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **openNamespaceTextModel** | [**OpenNamespaceTextModel**](OpenNamespaceTextModel.md)| | | - -### Return type - -null (empty response body) - -### 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** | 配置文本语法错误 | - | - - -# **updateItem** -> updateItem(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator) - -更新配置项 (original openapi) - -PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ItemManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ItemManagementApi apiInstance = new ItemManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | 环境标识 - String clusterName = "clusterName_example"; // String | 集群名称 - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - String key = "key_example"; // String | - Boolean createIfNotExists = false; // Boolean | - OpenItemDTO openItemDTO = new OpenItemDTO(); // OpenItemDTO | - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.updateItem(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| 环境标识 | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | -| **key** | **String**| | | -| **createIfNotExists** | **Boolean**| | [default to false] | -| **openItemDTO** | [**OpenItemDTO**](OpenItemDTO.md)| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### 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** | 配置项不存在 | - | - - -# **updateItemByEncodedKey** -> updateItemByEncodedKey(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator) - -通过编码的key更新配置项 (original openapi) - -PUT /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 | 应用ID - String env = "env_example"; // String | 环境标识 - String clusterName = "clusterName_example"; // String | 集群名称 - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - String key = "key_example"; // String | 配置项键名(需要URL编码) - Boolean createIfNotExists = false; // Boolean | 若不存在则创建(true/false) - OpenItemDTO openItemDTO = new OpenItemDTO(); // OpenItemDTO | - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.updateItemByEncodedKey(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | -| **env** | **String**| 环境标识 | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | -| **key** | **String**| 配置项键名(需要URL编码) | | -| **createIfNotExists** | **Boolean**| 若不存在则创建(true/false) | [default to false] | -| **openItemDTO** | [**OpenItemDTO**](OpenItemDTO.md)| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### 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** | 配置项不存在 | - | diff --git a/java-client/docs/NamespaceBranchManagementApi.md b/java-client/docs/NamespaceBranchManagementApi.md deleted file mode 100644 index 0d9249b9..00000000 --- a/java-client/docs/NamespaceBranchManagementApi.md +++ /dev/null @@ -1,570 +0,0 @@ -# NamespaceBranchManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**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) | -| [**merge**](NamespaceBranchManagementApi.md#merge) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 (original openapi) | -| [**mergeBranch**](NamespaceBranchManagementApi.md#mergeBranch) | **POST** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 (new added) | -| [**updateBranchRules**](NamespaceBranchManagementApi.md#updateBranchRules) | **PUT** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules | 更新分支灰度发布规则 (original openapi) | - - - -# **createBranch** -> OpenNamespaceDTO createBranch(appId, env, clusterName, namespaceName, operator) - -创建命名空间分支 (original openapi) - -POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceBranchManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String appId = "appId_example"; // String | 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.createBranch(appId, env, clusterName, namespaceName, operator); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| app标识 | | -| **env** | **String**| 环境标识 | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### 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** | 命名空间分支创建成功 | - | - - -# **deleteBranch** -> deleteBranch(env, appId, clusterName, namespaceName, branchName, operator) - -删除命名空间分支 (original openapi) - -DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceBranchManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String env = "env_example"; // String | 环境标识 - String appId = "appId_example"; // String | 应用ID - String clusterName = "clusterName_example"; // String | 集群名称 - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - String branchName = "branchName_example"; // String | 分支名称 - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.deleteBranch(env, appId, clusterName, namespaceName, branchName, operator); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#deleteBranch"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| 环境标识 | | -| **appId** | **String**| 应用ID | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | -| **branchName** | **String**| 分支名称 | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 分支删除成功 | - | - - -# **findBranch** -> OpenNamespaceDTO findBranch(appId, env, clusterName, namespaceName, extendInfo) - -获取命名空间分支信息 (original openapi) - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceBranchManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String appId = "appId_example"; // String | 应用ID - String env = "env_example"; // String | 环境标识 - String clusterName = "clusterName_example"; // String | 集群名称 - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - Boolean extendInfo = false; // Boolean | - try { - OpenNamespaceDTO result = apiInstance.findBranch(appId, env, clusterName, namespaceName, extendInfo); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | -| **env** | **String**| 环境标识 | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | -| **extendInfo** | **Boolean**| | [optional] [default to false] | - -### 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** | 分支不存在 | - | - - -# **getBranchGrayRules** -> OpenGrayReleaseRuleDTO getBranchGrayRules(appId, env, clusterName, namespaceName, branchName) - -获取分支灰度发布规则 (original openapi) - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceBranchManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String appId = "appId_example"; // String | app标识 - String env = "env_example"; // String | 环境标识 - String clusterName = "clusterName_example"; // String | 集群名称 - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - String branchName = "branchName_example"; // String | 分支名称 - try { - OpenGrayReleaseRuleDTO result = apiInstance.getBranchGrayRules(appId, env, clusterName, namespaceName, branchName); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| app标识 | | -| **env** | **String**| 环境标识 | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | -| **branchName** | **String**| 分支名称 | | - -### Return type - -[**OpenGrayReleaseRuleDTO**](OpenGrayReleaseRuleDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取灰度发布规则 | - | - - -# **merge** -> OpenReleaseDTO merge(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO) - -合并分支 (original openapi) - -合并灰度分支并可选择删除分支 - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceBranchManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String appId = "appId_example"; // String | 应用ID - String env = "env_example"; // String | 环境标识 - String clusterName = "clusterName_example"; // String | 集群名称 - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - String branchName = "branchName_example"; // String | 分支名称 - Boolean deleteBranch = true; // Boolean | 合并后是否删除分支(true/false) - NamespaceReleaseDTO namespaceReleaseDTO = new NamespaceReleaseDTO(); // NamespaceReleaseDTO | - try { - OpenReleaseDTO result = apiInstance.merge(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#merge"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | -| **env** | **String**| 环境标识 | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | -| **branchName** | **String**| 分支名称 | | -| **deleteBranch** | **Boolean**| 合并后是否删除分支(true/false) | | -| **namespaceReleaseDTO** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | | - -### Return type - -[**OpenReleaseDTO**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 分支合并成功 | - | -| **400** | 合并参数错误 | - | -| **403** | 权限不足 | - | - - -# **mergeBranch** -> OpenReleaseDTO mergeBranch(env, appId, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, operator) - -合并分支到主分支 (new added) - -POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceBranchManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String env = "env_example"; // String | 环境标识 - String appId = "appId_example"; // String | 应用ID - 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 | - String operator = "operator_example"; // String | 操作人用户名 - try { - OpenReleaseDTO result = apiInstance.mergeBranch(env, appId, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, operator); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceBranchManagementApi#mergeBranch"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| 环境标识 | | -| **appId** | **String**| 应用ID | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | -| **branchName** | **String**| 分支名称 | | -| **deleteBranch** | **Boolean**| 合并后是否删除分支(true/false) | | -| **namespaceReleaseDTO** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### 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** | 分支合并成功 | - | - - -# **updateBranchRules** -> updateBranchRules(appId, env, clusterName, namespaceName, branchName, openGrayReleaseRuleDTO, operator) - -更新分支灰度发布规则 (original openapi) - -PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceBranchManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceBranchManagementApi apiInstance = new NamespaceBranchManagementApi(defaultClient); - String appId = "appId_example"; // String | 应用ID - String env = "env_example"; // String | 环境标识 - String clusterName = "clusterName_example"; // String | 集群名称 - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - String branchName = "branchName_example"; // String | 分支名称 - OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO = new OpenGrayReleaseRuleDTO(); // OpenGrayReleaseRuleDTO | - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.updateBranchRules(appId, env, clusterName, namespaceName, branchName, openGrayReleaseRuleDTO, operator); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | -| **env** | **String**| 环境标识 | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | -| **branchName** | **String**| 分支名称 | | -| **openGrayReleaseRuleDTO** | [**OpenGrayReleaseRuleDTO**](OpenGrayReleaseRuleDTO.md)| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 灰度规则更新成功 | - | diff --git a/java-client/docs/NamespaceGrayDelReleaseDTO.md b/java-client/docs/NamespaceGrayDelReleaseDTO.md deleted file mode 100644 index 6b3bf605..00000000 --- a/java-client/docs/NamespaceGrayDelReleaseDTO.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# NamespaceGrayDelReleaseDTO - -命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**releaseTitle** | **String** | 发布标题,用于标识这次灰度删除发布的名称或版本号 | [optional] | -|**releaseComment** | **String** | 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 | [optional] | -|**releasedBy** | **String** | 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 | [optional] | -|**isEmergencyPublish** | **Boolean** | 是否为紧急发布,紧急发布可能会跳过某些审核流程 | [optional] | -|**grayDelKeys** | **List<String>** | 需要在灰度发布中删除的配置项键名列表 | [optional] | diff --git a/java-client/docs/NamespaceLockManagementApi.md b/java-client/docs/NamespaceLockManagementApi.md deleted file mode 100644 index d6d17f83..00000000 --- a/java-client/docs/NamespaceLockManagementApi.md +++ /dev/null @@ -1,83 +0,0 @@ -# NamespaceLockManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**getNamespaceLock**](NamespaceLockManagementApi.md#getNamespaceLock) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 (original openapi) | - - - -# **getNamespaceLock** -> OpenNamespaceLockDTO getNamespaceLock(appId, env, clusterName, namespaceName) - -获取Namespace的锁状态 (original openapi) - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceLockManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceLockManagementApi apiInstance = new NamespaceLockManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - try { - OpenNamespaceLockDTO result = apiInstance.getNamespaceLock(appId, env, clusterName, namespaceName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceLockManagementApi#getNamespaceLock"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | - -### Return type - -[**OpenNamespaceLockDTO**](OpenNamespaceLockDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | diff --git a/java-client/docs/NamespaceManagementApi.md b/java-client/docs/NamespaceManagementApi.md deleted file mode 100644 index fdf9f406..00000000 --- a/java-client/docs/NamespaceManagementApi.md +++ /dev/null @@ -1,686 +0,0 @@ -# NamespaceManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**createMissingNamespaces**](NamespaceManagementApi.md#createMissingNamespaces) | **POST** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces | 创建缺失的Namespace (new added) | -| [**createNamespaces**](NamespaceManagementApi.md#createNamespaces) | **POST** /openapi/v1/namespaces | 创建Namespace (new added) | -| [**deleteNamespace**](NamespaceManagementApi.md#deleteNamespace) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} | 删除指定的Namespace (new added) | -| [**findMissingNamespaces**](NamespaceManagementApi.md#findMissingNamespaces) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces | 查找缺失的Namespace (new added) | -| [**findNamespace**](NamespaceManagementApi.md#findNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace (original openapi) | -| [**findNamespaceUsage**](NamespaceManagementApi.md#findNamespaceUsage) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage | 查询namespace使用情况(new added) | -| [**findNamespaces**](NamespaceManagementApi.md#findNamespaces) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取指定集群下的所有Namespace (original openapi) | -| [**findPublicNamespaceForAssociatedNamespace**](NamespaceManagementApi.md#findPublicNamespaceForAssociatedNamespace) | **GET** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace | 查询关联Namespace对应的公共Namespace详情 (new added) | -| [**getNamespacesReleaseStatus**](NamespaceManagementApi.md#getNamespacesReleaseStatus) | **GET** /openapi/v1/apps/{appId}/namespaces/releases/status | 获取应用下所有Namespace的发布状态 (new added) | - - - -# **createMissingNamespaces** -> createMissingNamespaces(appId, env, clusterName, operator) - -创建缺失的Namespace (new added) - -POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-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 | 应用ID - String env = "env_example"; // String | 环境标识 - String clusterName = "clusterName_example"; // String | 集群名称 - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.createMissingNamespaces(appId, env, clusterName, operator); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#createMissingNamespaces"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | -| **env** | **String**| 环境标识 | | -| **clusterName** | **String**| 集群名称 | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 缺失的命名空间创建成功 | - | - - -# **createNamespaces** -> createNamespaces(openCreateNamespaceDTO, operator) - -创建Namespace (new added) - -POST /openapi/v1/apps/{appId}/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); - List openCreateNamespaceDTO = Arrays.asList(); // List | - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.createNamespaces(openCreateNamespaceDTO, operator); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#createNamespaces"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **openCreateNamespaceDTO** | [**List<OpenCreateNamespaceDTO>**](OpenCreateNamespaceDTO.md)| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Namespace创建成功 | - | - - -# **deleteNamespace** -> deleteNamespace(appId, env, clusterName, namespaceName, operator) - -删除指定的Namespace (new added) - -DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | 应用ID - String env = "env_example"; // String | 环境标识 - String clusterName = "clusterName_example"; // String | 集群名称 - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.deleteNamespace(appId, env, clusterName, namespaceName, operator); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#deleteNamespace"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | -| **env** | **String**| 环境标识 | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 解除关联成功 | - | - - -# **findMissingNamespaces** -> List<String> findMissingNamespaces(appId, env, clusterName) - -查找缺失的Namespace (new added) - -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-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 | 应用ID - String env = "env_example"; // String | 环境标识 - String clusterName = "clusterName_example"; // String | 集群名称 - try { - List result = apiInstance.findMissingNamespaces(appId, env, clusterName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#findMissingNamespaces"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - 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** | 缺失的命名空间名称列表 | - | - - -# **findNamespace** -> OpenNamespaceDTO findNamespace(appId, env, clusterName, namespaceName, fillItemDetail, extendInfo) - -获取指定的Namespace (original openapi) - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - Boolean fillItemDetail = true; // Boolean | - Boolean extendInfo = false; // Boolean | - try { - OpenNamespaceDTO result = apiInstance.findNamespace(appId, env, clusterName, namespaceName, fillItemDetail, extendInfo); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#findNamespace"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **fillItemDetail** | **Boolean**| | [default to true] | -| **extendInfo** | **Boolean**| | [optional] [default to false] | - -### 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** | | - | - - -# **findNamespaceUsage** -> List<OpenNamespaceUsageDTO> findNamespaceUsage(appId, env, clusterName, namespaceName) - -查询namespace使用情况(new added) - -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String appId = "appId_example"; // String | 应用ID - String env = "env_example"; // String | 环境标识 - String clusterName = "clusterName_example"; // String | 集群名称 - String namespaceName = "namespaceName_example"; // String | 命名空间名称 - try { - List result = apiInstance.findNamespaceUsage(appId, env, clusterName, namespaceName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#findNamespaceUsage"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | -| **env** | **String**| 环境标识 | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | - -### Return type - -[**List<OpenNamespaceUsageDTO>**](OpenNamespaceUsageDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | NamespaceUsage查询成功 | - | - - -# **findNamespaces** -> List<OpenNamespaceDTO> findNamespaces(appId, env, clusterName, fillItemDetail, extendInfo) - -获取指定集群下的所有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 | - Boolean extendInfo = false; // Boolean | - try { - List result = apiInstance.findNamespaces(appId, env, clusterName, fillItemDetail, extendInfo); - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **fillItemDetail** | **Boolean**| | [default to true] | -| **extendInfo** | **Boolean**| | [optional] [default to false] | - -### 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** | | - | - - -# **findPublicNamespaceForAssociatedNamespace** -> OpenNamespaceDTO findPublicNamespaceForAssociatedNamespace(env, appId, clusterName, namespaceName, extendInfo) - -查询关联Namespace对应的公共Namespace详情 (new added) - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.NamespaceManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - NamespaceManagementApi apiInstance = new NamespaceManagementApi(defaultClient); - String env = "env_example"; // String | 环境标识 - String appId = "appId_example"; // String | 应用ID - String clusterName = "clusterName_example"; // String | 集群名称 - String namespaceName = "namespaceName_example"; // String | 关联Namespace名称 - Boolean extendInfo = false; // Boolean | - try { - OpenNamespaceDTO result = apiInstance.findPublicNamespaceForAssociatedNamespace(env, appId, clusterName, namespaceName, extendInfo); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling NamespaceManagementApi#findPublicNamespaceForAssociatedNamespace"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| 环境标识 | | -| **appId** | **String**| 应用ID | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 关联Namespace名称 | | -| **extendInfo** | **Boolean**| | [optional] [default to false] | - -### Return type - -[**OpenNamespaceDTO**](OpenNamespaceDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取关联的公共Namespace详情 | - | - - -# **getNamespacesReleaseStatus** -> Map<String, Map<String, Boolean>> getNamespacesReleaseStatus(appId) - -获取应用下所有Namespace的发布状态 (new added) - -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** | 成功获取发布状态映射 | - | diff --git a/java-client/docs/NamespaceReleaseDTO.md b/java-client/docs/NamespaceReleaseDTO.md deleted file mode 100644 index f521a059..00000000 --- a/java-client/docs/NamespaceReleaseDTO.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# NamespaceReleaseDTO - -命名空间发布请求数据传输对象,用于创建新的配置发布 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**releaseTitle** | **String** | 发布标题,用于标识这次发布的名称或版本号 | [optional] | -|**releaseComment** | **String** | 发布备注,详细描述本次发布的变更内容和目的 | [optional] | -|**releasedBy** | **String** | 发布操作者用户名,记录是谁执行了这次发布操作 | [optional] | -|**isEmergencyPublish** | **Boolean** | 是否为紧急发布,紧急发布可能会跳过某些审核流程 | [optional] | diff --git a/java-client/docs/OpenAccessKeyDTO.md b/java-client/docs/OpenAccessKeyDTO.md deleted file mode 100644 index 902ae7f2..00000000 --- a/java-client/docs/OpenAccessKeyDTO.md +++ /dev/null @@ -1,20 +0,0 @@ - - -# OpenAccessKeyDTO - - -## 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] | -|**secret** | **String** | | [optional] | -|**appId** | **String** | | [optional] | -|**mode** | **Integer** | | [optional] | -|**enabled** | **Boolean** | | [optional] | diff --git a/java-client/docs/OpenAppDTO.md b/java-client/docs/OpenAppDTO.md deleted file mode 100644 index 4b0cd223..00000000 --- a/java-client/docs/OpenAppDTO.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# OpenAppDTO - -Apollo应用信息数据传输对象,包含应用的基本信息和元数据 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | 数据创建者用户名,记录是谁创建了这个应用 | [optional] | -|**dataChangeCreatedByDisplayName** | **String** | 数据创建者显示名称,用于展示创建者的友好名称 | [optional] | -|**dataChangeLastModifiedBy** | **String** | 数据最后修改者用户名,记录最后一次修改应用信息的用户 | [optional] | -|**dataChangeLastModifiedByDisplayName** | **String** | 数据最后修改者显示名称,用于展示最后修改者的友好名称 | [optional] | -|**dataChangeCreatedTime** | **String** | 数据创建时间,ISO 8601格式的时间戳 | [optional] | -|**dataChangeLastModifiedTime** | **String** | 数据最后修改时间,ISO 8601格式的时间戳 | [optional] | -|**name** | **String** | 应用名称,用于显示的友好名称 | [optional] | -|**appId** | **String** | 应用唯一标识符,全局唯一的应用ID | [optional] | -|**orgId** | **String** | 组织ID,应用所属组织的唯一标识 | [optional] | -|**orgName** | **String** | 组织名称,应用所属组织的显示名称 | [optional] | -|**ownerName** | **String** | 应用负责人姓名,应用的主要负责人 | [optional] | -|**ownerEmail** | **String** | 应用负责人邮箱地址,用于接收应用相关通知 | [optional] | -|**ownerDisplayName** | **String** | | [optional] | diff --git a/java-client/docs/OpenAppNamespaceDTO.md b/java-client/docs/OpenAppNamespaceDTO.md deleted file mode 100644 index e180c751..00000000 --- a/java-client/docs/OpenAppNamespaceDTO.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# OpenAppNamespaceDTO - -Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | 命名空间创建者用户名,记录是谁创建了这个应用命名空间 | [optional] | -|**dataChangeCreatedByDisplayName** | **String** | 命名空间创建者显示名称,用于展示创建者的友好名称 | [optional] | -|**dataChangeLastModifiedBy** | **String** | 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 | [optional] | -|**dataChangeLastModifiedByDisplayName** | **String** | 命名空间最后修改者显示名称,用于展示最后修改者的友好名称 | [optional] | -|**dataChangeCreatedTime** | **String** | 命名空间创建时间,ISO 8601格式的时间戳 | [optional] | -|**dataChangeLastModifiedTime** | **String** | 命名空间最后修改时间,ISO 8601格式的时间戳 | [optional] | -|**name** | **String** | 命名空间名称,在同一应用内唯一标识一个命名空间 | [optional] | -|**appId** | **String** | 所属应用的唯一标识符 | [optional] | -|**format** | **String** | 命名空间格式类型,如properties、xml、json、yml等 | [optional] | -|**isPublic** | **Boolean** | 是否为公共命名空间,公共命名空间可以被其他应用关联使用 | [optional] | -|**appendNamespacePrefix** | **Boolean** | 对于公共命名空间,是否在命名空间名称前添加前缀 | [optional] | -|**comment** | **String** | 命名空间备注说明,描述命名空间的用途和包含的配置类型 | [optional] | diff --git a/java-client/docs/OpenAppRoleUserDTO.md b/java-client/docs/OpenAppRoleUserDTO.md deleted file mode 100644 index 942ab22d..00000000 --- a/java-client/docs/OpenAppRoleUserDTO.md +++ /dev/null @@ -1,11 +0,0 @@ - - -# OpenAppRoleUserDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**appId** | **String** | | [optional] | -|**masterUsers** | [**List<OpenUserInfoDTO>**](OpenUserInfoDTO.md) | | [optional] | diff --git a/java-client/docs/OpenClusterDTO.md b/java-client/docs/OpenClusterDTO.md deleted file mode 100644 index 8d75aa84..00000000 --- a/java-client/docs/OpenClusterDTO.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# OpenClusterDTO - -Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | 集群创建者用户名,记录是谁创建了这个集群 | [optional] | -|**dataChangeCreatedByDisplayName** | **String** | 集群创建者显示名称,用于展示创建者的友好名称 | [optional] | -|**dataChangeLastModifiedBy** | **String** | 集群最后修改者用户名,记录最后一次修改集群信息的用户 | [optional] | -|**dataChangeLastModifiedByDisplayName** | **String** | 集群最后修改者显示名称,用于展示最后修改者的友好名称 | [optional] | -|**dataChangeCreatedTime** | **String** | 集群创建时间,ISO 8601格式的时间戳 | [optional] | -|**dataChangeLastModifiedTime** | **String** | 集群最后修改时间,ISO 8601格式的时间戳 | [optional] | -|**name** | **String** | 集群名称,在同一应用和环境下唯一标识一个集群 | [optional] | -|**appId** | **String** | 所属应用的唯一标识符 | [optional] | -|**id** | **Long** | 集群的唯一标识符 | [optional] | -|**parentClusterId** | **Long** | 父集群的ID | [optional] | -|**comment** | **String** | 集群的备注说明 | [optional] | diff --git a/java-client/docs/OpenClusterNamespaceRoleUserDTO.md b/java-client/docs/OpenClusterNamespaceRoleUserDTO.md deleted file mode 100644 index 406a8d61..00000000 --- a/java-client/docs/OpenClusterNamespaceRoleUserDTO.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# OpenClusterNamespaceRoleUserDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**appId** | **String** | | [optional] | -|**env** | **String** | | [optional] | -|**cluster** | **String** | | [optional] | -|**modifyRoleUsers** | [**List<OpenUserInfoDTO>**](OpenUserInfoDTO.md) | | [optional] | -|**releaseRoleUsers** | [**List<OpenUserInfoDTO>**](OpenUserInfoDTO.md) | | [optional] | diff --git a/java-client/docs/OpenCreateAppDTO.md b/java-client/docs/OpenCreateAppDTO.md deleted file mode 100644 index 7baaff94..00000000 --- a/java-client/docs/OpenCreateAppDTO.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# OpenCreateAppDTO - -创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**assignAppRoleToSelf** | **Boolean** | 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 | [optional] | -|**admins** | **Set<String>** | 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 | [optional] | -|**app** | [**OpenAppDTO**](OpenAppDTO.md) | | [optional] | diff --git a/java-client/docs/OpenCreateNamespaceDTO.md b/java-client/docs/OpenCreateNamespaceDTO.md deleted file mode 100644 index 900e4b30..00000000 --- a/java-client/docs/OpenCreateNamespaceDTO.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# OpenCreateNamespaceDTO - -Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**appId** | **String** | 所属应用的唯一标识符 | [optional] | -|**env** | **String** | 所在那个环境创建 | [optional] | -|**clusterName** | **String** | 所属集群的名称 | [optional] | -|**appNamespaceName** | **String** | 根据已创建的appnamespace来实例化namespace | [optional] | diff --git a/java-client/docs/OpenEnvClusterDTO.md b/java-client/docs/OpenEnvClusterDTO.md deleted file mode 100644 index 1134e220..00000000 --- a/java-client/docs/OpenEnvClusterDTO.md +++ /dev/null @@ -1,11 +0,0 @@ - - -# OpenEnvClusterDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**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 deleted file mode 100644 index cca2f6f1..00000000 --- a/java-client/docs/OpenEnvClusterInfo.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# OpenEnvClusterInfo - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **Integer** | 查询状态码 | [optional] | -|**message** | **String** | 相关信息 | [optional] | -|**env** | **String** | 环境标识 | [optional] | -|**clusters** | [**List<OpenClusterDTO>**](OpenClusterDTO.md) | 集群信息列表 | [optional] | diff --git a/java-client/docs/OpenEnvNamespaceRoleUserDTO.md b/java-client/docs/OpenEnvNamespaceRoleUserDTO.md deleted file mode 100644 index ac2941e1..00000000 --- a/java-client/docs/OpenEnvNamespaceRoleUserDTO.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# OpenEnvNamespaceRoleUserDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**appId** | **String** | | [optional] | -|**namespaceName** | **String** | | [optional] | -|**modifyRoleUsers** | [**List<OpenUserInfoDTO>**](OpenUserInfoDTO.md) | | [optional] | -|**releaseRoleUsers** | [**List<OpenUserInfoDTO>**](OpenUserInfoDTO.md) | | [optional] | -|**env** | **String** | | [optional] | diff --git a/java-client/docs/OpenGrayReleaseRuleDTO.md b/java-client/docs/OpenGrayReleaseRuleDTO.md deleted file mode 100644 index 46289415..00000000 --- a/java-client/docs/OpenGrayReleaseRuleDTO.md +++ /dev/null @@ -1,21 +0,0 @@ - - -# OpenGrayReleaseRuleDTO - -Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 | [optional] | -|**dataChangeCreatedByDisplayName** | **String** | 灰度规则创建者显示名称,用于展示创建者的友好名称 | [optional] | -|**dataChangeLastModifiedBy** | **String** | 灰度规则最后修改者用户名,记录最后一次修改规则的用户 | [optional] | -|**dataChangeLastModifiedByDisplayName** | **String** | 灰度规则最后修改者显示名称,用于展示最后修改者的友好名称 | [optional] | -|**dataChangeCreatedTime** | **String** | 灰度规则创建时间,ISO 8601格式的时间戳 | [optional] | -|**dataChangeLastModifiedTime** | **String** | 灰度规则最后修改时间,ISO 8601格式的时间戳 | [optional] | -|**appId** | **String** | 所属应用的唯一标识符 | [optional] | -|**clusterName** | **String** | 所属集群的名称 | [optional] | -|**namespaceName** | **String** | 所属命名空间的名称 | [optional] | -|**branchName** | **String** | 灰度分支名称,标识灰度发布的分支 | [optional] | -|**ruleItems** | [**Set<OpenGrayReleaseRuleItemDTO>**](OpenGrayReleaseRuleItemDTO.md) | 灰度发布规则项列表,包含具体的灰度规则条件 | [optional] | diff --git a/java-client/docs/OpenGrayReleaseRuleItemDTO.md b/java-client/docs/OpenGrayReleaseRuleItemDTO.md deleted file mode 100644 index b70290f1..00000000 --- a/java-client/docs/OpenGrayReleaseRuleItemDTO.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# OpenGrayReleaseRuleItemDTO - -Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**clientAppId** | **String** | 客户端应用ID,指定哪个应用可以获取灰度配置 | [optional] | -|**clientIpList** | **Set<String>** | 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 | [optional] | -|**clientLabelList** | **Set<String>** | 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 | [optional] | diff --git a/java-client/docs/OpenInstanceConfigDTO.md b/java-client/docs/OpenInstanceConfigDTO.md deleted file mode 100644 index 4f959ce2..00000000 --- a/java-client/docs/OpenInstanceConfigDTO.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# OpenInstanceConfigDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**release** | [**OpenReleaseDTO**](OpenReleaseDTO.md) | | [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 deleted file mode 100644 index 595b4463..00000000 --- a/java-client/docs/OpenInstanceDTO.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# OpenInstanceDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**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/OpenInstancePageDTO.md b/java-client/docs/OpenInstancePageDTO.md deleted file mode 100644 index 9f4f32e3..00000000 --- a/java-client/docs/OpenInstancePageDTO.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# OpenInstancePageDTO - -分页实例数据传输对象,用于返回分页查询的实例列表结果 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**page** | **Integer** | 当前页码,从0开始计数 | [optional] | -|**size** | **Integer** | 每页显示的记录数量 | [optional] | -|**total** | **Long** | 总记录数,符合查询条件的实例总数量 | [optional] | -|**instances** | [**List<OpenInstanceDTO>**](OpenInstanceDTO.md) | 当前页的实例列表,包含具体的实例数据 | [optional] | diff --git a/java-client/docs/OpenItemDTO.md b/java-client/docs/OpenItemDTO.md deleted file mode 100644 index 334c8371..00000000 --- a/java-client/docs/OpenItemDTO.md +++ /dev/null @@ -1,22 +0,0 @@ - - -# OpenItemDTO - -Apollo配置项核心数据对象,仅包含键值及基础审计信息 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**key** | **String** | 配置项的键名,在同一命名空间内唯一标识一个配置项 | [optional] | -|**value** | **String** | 配置项的值,可以是字符串、数字、JSON等格式 | [optional] | -|**type** | **Integer** | 配置项类型 | [optional] | -|**comment** | **String** | 配置项的注释说明,用于描述配置项的用途和含义 | [optional] | -|**lineNum** | **Integer** | 配置项在命名空间中的行号,用于保持和旧版 Portal 配置项列表一致的默认展示顺序 | [optional] | -|**extendInfo** | [**OpenItemExtendDTO**](OpenItemExtendDTO.md) | | [optional] | -|**dataChangeCreatedBy** | **String** | 配置项创建者用户名,记录是谁创建了这个配置项 | [optional] | -|**dataChangeCreatedByDisplayName** | **String** | 配置项创建者显示名称,用于展示创建者的友好名称 | [optional] | -|**dataChangeLastModifiedBy** | **String** | 配置项最后修改者用户名,记录最后一次修改配置的用户 | [optional] | -|**dataChangeLastModifiedByDisplayName** | **String** | 配置项最后修改者显示名称,用于展示最后修改者的友好名称 | [optional] | -|**dataChangeCreatedTime** | **String** | 配置项创建时间,ISO 8601格式的时间戳 | [optional] | -|**dataChangeLastModifiedTime** | **String** | 配置项最后修改时间,ISO 8601格式的时间戳 | [optional] | diff --git a/java-client/docs/OpenItemDiffDTO.md b/java-client/docs/OpenItemDiffDTO.md deleted file mode 100644 index d2333b5f..00000000 --- a/java-client/docs/OpenItemDiffDTO.md +++ /dev/null @@ -1,15 +0,0 @@ - - -# OpenItemDiffDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **Integer** | 查找结果 | [optional] | -|**message** | **String** | 查找结果信息 | [optional] | -|**namespace** | [**OpenNamespaceIdentifier**](OpenNamespaceIdentifier.md) | | [optional] | -|**createItems** | [**List<OpenItemDTO>**](OpenItemDTO.md) | | [optional] | -|**deleteItems** | [**List<OpenItemDTO>**](OpenItemDTO.md) | | [optional] | -|**updateItems** | [**List<OpenItemDTO>**](OpenItemDTO.md) | | [optional] | diff --git a/java-client/docs/OpenItemExtendDTO.md b/java-client/docs/OpenItemExtendDTO.md deleted file mode 100644 index 2d0651f1..00000000 --- a/java-client/docs/OpenItemExtendDTO.md +++ /dev/null @@ -1,16 +0,0 @@ - - -# OpenItemExtendDTO - -Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**namespaceId** | **Long** | 所属命名空间的ID | [optional] | -|**isModified** | **Boolean** | 是否有未发布的修改 | [optional] | -|**isDeleted** | **Boolean** | 是否被标记为删除(未发布) | [optional] | -|**isNewlyAdded** | **Boolean** | 是否为新添加的配置项(未发布) | [optional] | -|**newValue** | **String** | 新的值 | [optional] | -|**oldValue** | **String** | 上一次发布的值,用于对比变更 | [optional] | diff --git a/java-client/docs/OpenItemPageDTO.md b/java-client/docs/OpenItemPageDTO.md deleted file mode 100644 index 013107f1..00000000 --- a/java-client/docs/OpenItemPageDTO.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# OpenItemPageDTO - -分页配置项数据传输对象,用于返回分页查询的配置项列表结果 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**page** | **Integer** | 当前页码,从0开始计数 | [optional] | -|**size** | **Integer** | 每页显示的记录数量 | [optional] | -|**total** | **Long** | 总记录数,符合查询条件的配置项总数量 | [optional] | -|**content** | [**List<OpenItemDTO>**](OpenItemDTO.md) | 当前页的配置项列表,包含具体的配置项数据 | [optional] | diff --git a/java-client/docs/OpenMissEnvDTO.md b/java-client/docs/OpenMissEnvDTO.md deleted file mode 100644 index 982ca5fd..00000000 --- a/java-client/docs/OpenMissEnvDTO.md +++ /dev/null @@ -1,11 +0,0 @@ - - -# OpenMissEnvDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**code** | **Integer** | 查询状态码 | [optional] | -|**message** | **String** | | [optional] | diff --git a/java-client/docs/OpenNamespaceDTO.md b/java-client/docs/OpenNamespaceDTO.md deleted file mode 100644 index 8820d8c2..00000000 --- a/java-client/docs/OpenNamespaceDTO.md +++ /dev/null @@ -1,24 +0,0 @@ - - -# OpenNamespaceDTO - -Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | 命名空间创建者用户名,记录是谁创建了这个命名空间 | [optional] | -|**dataChangeCreatedByDisplayName** | **String** | 命名空间创建者显示名称,用于展示创建者的友好名称 | [optional] | -|**dataChangeLastModifiedBy** | **String** | 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 | [optional] | -|**dataChangeLastModifiedByDisplayName** | **String** | 命名空间最后修改者显示名称,用于展示最后修改者的友好名称 | [optional] | -|**dataChangeCreatedTime** | **String** | 命名空间创建时间,ISO 8601格式的时间戳 | [optional] | -|**dataChangeLastModifiedTime** | **String** | 命名空间最后修改时间,ISO 8601格式的时间戳 | [optional] | -|**appId** | **String** | 所属应用的唯一标识符 | [optional] | -|**clusterName** | **String** | 所属集群的名称 | [optional] | -|**namespaceName** | **String** | 命名空间名称,在同一应用和集群下唯一标识一个命名空间 | [optional] | -|**comment** | **String** | 命名空间备注说明,描述命名空间的用途 | [optional] | -|**format** | **String** | 命名空间格式类型,如properties、xml、json、yml等 | [optional] | -|**isPublic** | **Boolean** | 是否为公共命名空间,公共命名空间可以被其他应用关联使用 | [optional] | -|**items** | [**List<OpenItemDTO>**](OpenItemDTO.md) | 命名空间包含的配置项列表 | [optional] | -|**extendInfo** | [**OpenNamespaceExtendDTO**](OpenNamespaceExtendDTO.md) | | [optional] | diff --git a/java-client/docs/OpenNamespaceExtendDTO.md b/java-client/docs/OpenNamespaceExtendDTO.md deleted file mode 100644 index 6d37e2e4..00000000 --- a/java-client/docs/OpenNamespaceExtendDTO.md +++ /dev/null @@ -1,12 +0,0 @@ - - -# OpenNamespaceExtendDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**isConfigHidden** | **Boolean** | 当当前用户无权限查看配置时置为 true | [optional] | -|**parentAppId** | **String** | 公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转 | [optional] | -|**itemModifiedCnt** | **Integer** | 未发布变更数 | [optional] | diff --git a/java-client/docs/OpenNamespaceIdentifier.md b/java-client/docs/OpenNamespaceIdentifier.md deleted file mode 100644 index d9a138ce..00000000 --- a/java-client/docs/OpenNamespaceIdentifier.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# 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 deleted file mode 100644 index 8eddba0e..00000000 --- a/java-client/docs/OpenNamespaceLockDTO.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# OpenNamespaceLockDTO - -Apollo命名空间锁状态数据传输对象 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**namespaceName** | **String** | 命名空间名称 | [optional] | -|**isLocked** | **Boolean** | 是否被锁定 | [optional] | -|**lockedBy** | **String** | 锁定者用户名 | [optional] | -|**isEmergencyPublishAllowed** | **Boolean** | 是否允许紧急发布 | [optional] | diff --git a/java-client/docs/OpenNamespaceRoleUserDTO.md b/java-client/docs/OpenNamespaceRoleUserDTO.md deleted file mode 100644 index 5bba2680..00000000 --- a/java-client/docs/OpenNamespaceRoleUserDTO.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# OpenNamespaceRoleUserDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**appId** | **String** | | [optional] | -|**namespaceName** | **String** | | [optional] | -|**modifyRoleUsers** | [**List<OpenUserInfoDTO>**](OpenUserInfoDTO.md) | | [optional] | -|**releaseRoleUsers** | [**List<OpenUserInfoDTO>**](OpenUserInfoDTO.md) | | [optional] | diff --git a/java-client/docs/OpenNamespaceSyncDTO.md b/java-client/docs/OpenNamespaceSyncDTO.md deleted file mode 100644 index de6ccba8..00000000 --- a/java-client/docs/OpenNamespaceSyncDTO.md +++ /dev/null @@ -1,11 +0,0 @@ - - -# OpenNamespaceSyncDTO - - -## 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 deleted file mode 100644 index 6823cded..00000000 --- a/java-client/docs/OpenNamespaceTextModel.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# 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/OpenNamespaceUsageDTO.md b/java-client/docs/OpenNamespaceUsageDTO.md deleted file mode 100644 index bdda8961..00000000 --- a/java-client/docs/OpenNamespaceUsageDTO.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# OpenNamespaceUsageDTO - -命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**namespaceName** | **String** | 命名空间名称 | [optional] | -|**appId** | **String** | 所属应用的唯一标识符 | [optional] | -|**clusterName** | **String** | 所属集群名称 | [optional] | -|**envName** | **String** | 环境名称 | [optional] | -|**instanceCount** | **Integer** | 该命名空间关联的实例数量 | [optional] | -|**branchInstanceCount** | **Integer** | 分支命名空间关联的实例数量 | [optional] | -|**linkedNamespaceCount** | **Integer** | 关联到该公共命名空间的命名空间数量 | [optional] | diff --git a/java-client/docs/OpenOrganizationDto.md b/java-client/docs/OpenOrganizationDto.md deleted file mode 100644 index 281c9dfe..00000000 --- a/java-client/docs/OpenOrganizationDto.md +++ /dev/null @@ -1,11 +0,0 @@ - - -# OpenOrganizationDto - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**orgId** | **String** | 组织ID | [optional] | -|**orgName** | **String** | 组织名称 | [optional] | diff --git a/java-client/docs/OpenPermissionConditionDTO.md b/java-client/docs/OpenPermissionConditionDTO.md deleted file mode 100644 index 5424be70..00000000 --- a/java-client/docs/OpenPermissionConditionDTO.md +++ /dev/null @@ -1,10 +0,0 @@ - - -# OpenPermissionConditionDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**hasPermission** | **Boolean** | | [optional] | diff --git a/java-client/docs/OpenReleaseChangeDTO.md b/java-client/docs/OpenReleaseChangeDTO.md deleted file mode 100644 index c2350c7f..00000000 --- a/java-client/docs/OpenReleaseChangeDTO.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# OpenReleaseChangeDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**changeType** | **String** | 修改类型 | [optional] | -|**key** | **String** | key | [optional] | -|**newValue** | **String** | new value | [optional] | -|**oldValue** | **String** | old value | [optional] | diff --git a/java-client/docs/OpenReleaseDTO.md b/java-client/docs/OpenReleaseDTO.md deleted file mode 100644 index 584c66e3..00000000 --- a/java-client/docs/OpenReleaseDTO.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# OpenReleaseDTO - -Apollo发布信息数据传输对象,表示一次配置发布的完整信息 - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**dataChangeCreatedBy** | **String** | 发布创建者用户名,记录是谁创建了这次发布 | [optional] | -|**dataChangeCreatedByDisplayName** | **String** | 发布创建者显示名称,用于展示创建者的友好名称 | [optional] | -|**dataChangeLastModifiedBy** | **String** | 发布最后修改者用户名,记录最后一次修改发布信息的用户 | [optional] | -|**dataChangeLastModifiedByDisplayName** | **String** | 发布最后修改者显示名称,用于展示最后修改者的友好名称 | [optional] | -|**dataChangeCreatedTime** | **String** | 发布创建时间,ISO 8601格式的时间戳 | [optional] | -|**dataChangeLastModifiedTime** | **String** | 发布最后修改时间,ISO 8601格式的时间戳 | [optional] | -|**id** | **Long** | 发布记录的唯一标识符,系统自动生成 | [optional] | -|**appId** | **String** | 所属应用的唯一标识符 | [optional] | -|**clusterName** | **String** | 所属集群的名称 | [optional] | -|**namespaceName** | **String** | 所属命名空间的名称 | [optional] | -|**name** | **String** | 发布名称,用于标识这次发布的版本或描述 | [optional] | -|**configurations** | **Map<String, String>** | | [optional] | -|**comment** | **String** | 发布备注,描述本次发布的变更内容和目的 | [optional] | diff --git a/java-client/docs/OpenReleaseDiffDTO.md b/java-client/docs/OpenReleaseDiffDTO.md deleted file mode 100644 index 93228495..00000000 --- a/java-client/docs/OpenReleaseDiffDTO.md +++ /dev/null @@ -1,10 +0,0 @@ - - -# OpenReleaseDiffDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**changes** | [**List<OpenReleaseChangeDTO>**](OpenReleaseChangeDTO.md) | A list of changes, ensuring order if necessary. | [optional] | diff --git a/java-client/docs/OpenUserDTO.md b/java-client/docs/OpenUserDTO.md deleted file mode 100644 index e17ae5ad..00000000 --- a/java-client/docs/OpenUserDTO.md +++ /dev/null @@ -1,14 +0,0 @@ - - -# OpenUserDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**username** | **String** | 用户名 | [optional] | -|**userDisplayName** | **String** | 用户显示名 | [optional] | -|**password** | **String** | 用户密码 | [optional] | -|**email** | **String** | 用户邮箱 | [optional] | -|**enabled** | **Integer** | 是否启用,1 表示启用,0 表示禁用 | [optional] | diff --git a/java-client/docs/OpenUserInfoDTO.md b/java-client/docs/OpenUserInfoDTO.md deleted file mode 100644 index cc291a2a..00000000 --- a/java-client/docs/OpenUserInfoDTO.md +++ /dev/null @@ -1,13 +0,0 @@ - - -# OpenUserInfoDTO - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**userId** | **String** | | [optional] | -|**name** | **String** | | [optional] | -|**email** | **String** | | [optional] | -|**enabled** | **Integer** | | [optional] | diff --git a/java-client/docs/OrganizationManagementApi.md b/java-client/docs/OrganizationManagementApi.md deleted file mode 100644 index a73b6ec4..00000000 --- a/java-client/docs/OrganizationManagementApi.md +++ /dev/null @@ -1,74 +0,0 @@ -# OrganizationManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**getOrganization**](OrganizationManagementApi.md#getOrganization) | **GET** /openapi/v1/organizations | 获取所有组织信息 (original openapi) | - - - -# **getOrganization** -> List<OpenOrganizationDto> getOrganization() - -获取所有组织信息 (original openapi) - -GET /openapi/v1/organizations - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.OrganizationManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - OrganizationManagementApi apiInstance = new OrganizationManagementApi(defaultClient); - try { - List result = apiInstance.getOrganization(); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**List<OpenOrganizationDto>**](OpenOrganizationDto.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取组织列表 | - | -| **401** | 未授权访问 | - | diff --git a/java-client/docs/PermissionManagementApi.md b/java-client/docs/PermissionManagementApi.md deleted file mode 100644 index 12d34080..00000000 --- a/java-client/docs/PermissionManagementApi.md +++ /dev/null @@ -1,1933 +0,0 @@ -# PermissionManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**addCreateApplicationRoleToUsers**](PermissionManagementApi.md#addCreateApplicationRoleToUsers) | **POST** /openapi/v1/system/roles/create-application | 分配建应用角色 (new added) | -| [**addManageAppMasterRoleToUser**](PermissionManagementApi.md#addManageAppMasterRoleToUser) | **POST** /openapi/v1/apps/{appId}/roles/master | 分配AppMaster (new added) | -| [**assignAppRoleToUser**](PermissionManagementApi.md#assignAppRoleToUser) | **POST** /openapi/v1/apps/{appId}/roles/{roleType} | 分配应用角色 (new added) | -| [**assignClusterNamespaceRoleToUser**](PermissionManagementApi.md#assignClusterNamespaceRoleToUser) | **POST** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/roles/{roleType} | 分配集群Namespace角色 (new added) | -| [**assignNamespaceEnvRoleToUser**](PermissionManagementApi.md#assignNamespaceEnvRoleToUser) | **POST** /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType} | 分配环境Namespace角色 (new added) | -| [**assignNamespaceRoleToUser**](PermissionManagementApi.md#assignNamespaceRoleToUser) | **POST** /openapi/v1/apps/{appId}/namespaces/{namespaceName}/roles/{roleType} | 分配Namespace角色 (new added) | -| [**deleteCreateApplicationRoleFromUser**](PermissionManagementApi.md#deleteCreateApplicationRoleFromUser) | **DELETE** /openapi/v1/system/roles/create-application | 移除建应用角色 (new added) | -| [**getAppRoles**](PermissionManagementApi.md#getAppRoles) | **GET** /openapi/v1/apps/{appId}/role-users | 获取应用角色用户 (new added) | -| [**getClusterNamespaceRoles**](PermissionManagementApi.md#getClusterNamespaceRoles) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/role-users | 获取集群Namespace用户 (new added) | -| [**getCreateApplicationRoleUsers**](PermissionManagementApi.md#getCreateApplicationRoleUsers) | **GET** /openapi/v1/system/roles/create-application/role-users | 获取建应用用户 (new added) | -| [**getNamespaceEnvRoleUsers**](PermissionManagementApi.md#getNamespaceEnvRoleUsers) | **GET** /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/role-users | 获取环境Namespace用户 (new added) | -| [**getNamespaceRoles**](PermissionManagementApi.md#getNamespaceRoles) | **GET** /openapi/v1/apps/{appId}/namespaces/{namespaceName}/role-users | 获取Namespace用户 (new added) | -| [**hasAppPermission**](PermissionManagementApi.md#hasAppPermission) | **GET** /openapi/v1/apps/{appId}/permissions/{permissionType} | 校验应用权限 (new added) | -| [**hasClusterNamespacePermission**](PermissionManagementApi.md#hasClusterNamespacePermission) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permissions/{permissionType} | 校验集群Namespace权限 (new added) | -| [**hasCreateApplicationPermission**](PermissionManagementApi.md#hasCreateApplicationPermission) | **GET** /openapi/v1/system/roles/create-application | 校验建应用权限 (new added) | -| [**hasEnvNamespacePermission**](PermissionManagementApi.md#hasEnvNamespacePermission) | **GET** /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/permissions/{permissionType} | 校验环境Namespace权限 (new added) | -| [**hasNamespacePermission**](PermissionManagementApi.md#hasNamespacePermission) | **GET** /openapi/v1/apps/{appId}/namespaces/{namespaceName}/permissions/{permissionType} | 校验Namespace权限 (new added) | -| [**hasRootPermission**](PermissionManagementApi.md#hasRootPermission) | **GET** /openapi/v1/permissions/root | 校验Root权限 (new added) | -| [**initAppPermission**](PermissionManagementApi.md#initAppPermission) | **POST** /openapi/v1/apps/{appId}/namespaces/{namespaceName}/permission-init | 初始化应用权限 (new added) | -| [**initClusterNamespacePermission**](PermissionManagementApi.md#initClusterNamespacePermission) | **POST** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permission-init | 初始化集群Namespace权限 (new added) | -| [**isManageAppMasterPermissionEnabled**](PermissionManagementApi.md#isManageAppMasterPermissionEnabled) | **GET** /openapi/v1/system/role/manage-app-master | 校验AppMaster开关 (new added) | -| [**removeAppRoleFromUser**](PermissionManagementApi.md#removeAppRoleFromUser) | **DELETE** /openapi/v1/apps/{appId}/roles/{roleType} | 移除应用角色 (new added) | -| [**removeClusterNamespaceRoleFromUser**](PermissionManagementApi.md#removeClusterNamespaceRoleFromUser) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/roles/{roleType} | 移除集群Namespace角色 (new added) | -| [**removeManageAppMasterRoleFromUser**](PermissionManagementApi.md#removeManageAppMasterRoleFromUser) | **DELETE** /openapi/v1/apps/{appId}/roles/master | 移除AppMaster (new added) | -| [**removeNamespaceEnvRoleFromUser**](PermissionManagementApi.md#removeNamespaceEnvRoleFromUser) | **DELETE** /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType} | 移除环境Namespace角色 (new added) | -| [**removeNamespaceRoleFromUser**](PermissionManagementApi.md#removeNamespaceRoleFromUser) | **DELETE** /openapi/v1/apps/{appId}/namespaces/{namespaceName}/roles/{roleType} | 移除Namespace角色 (new added) | - - - -# **addCreateApplicationRoleToUsers** -> addCreateApplicationRoleToUsers(operator, requestBody) - -分配建应用角色 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String operator = "operator_example"; // String | 操作人用户名 - List requestBody = Arrays.asList(); // List | - try { - apiInstance.addCreateApplicationRoleToUsers(operator, requestBody); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#addCreateApplicationRoleToUsers"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **operator** | **String**| 操作人用户名 | [optional] | -| **requestBody** | [**List<String>**](String.md)| | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **addManageAppMasterRoleToUser** -> addManageAppMasterRoleToUser(appId, userId, operator) - -分配AppMaster (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String appId = "appId_example"; // String | - String userId = "userId_example"; // String | the user which role assign to - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.addManageAppMasterRoleToUser(appId, userId, operator); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#addManageAppMasterRoleToUser"); - 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**| | | -| **userId** | **String**| the user which role assign to | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **assignAppRoleToUser** -> assignAppRoleToUser(appId, roleType, userId, operator, body) - -分配应用角色 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String appId = "appId_example"; // String | - String roleType = "roleType_example"; // String | - String userId = "userId_example"; // String | the user which role removed from - String operator = "operator_example"; // String | 操作人用户名 - String body = "body_example"; // String | - try { - apiInstance.assignAppRoleToUser(appId, roleType, userId, operator, body); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#assignAppRoleToUser"); - 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**| | | -| **roleType** | **String**| | | -| **userId** | **String**| the user which role removed from | | -| **operator** | **String**| 操作人用户名 | [optional] | -| **body** | **String**| | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **assignClusterNamespaceRoleToUser** -> assignClusterNamespaceRoleToUser(appId, env, clusterName, roleType, userId, operator) - -分配集群Namespace角色 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String roleType = "roleType_example"; // String | - String userId = "userId_example"; // String | the user which role assigned to - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.assignClusterNamespaceRoleToUser(appId, env, clusterName, roleType, userId, operator); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#assignClusterNamespaceRoleToUser"); - 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**| | | -| **roleType** | **String**| | | -| **userId** | **String**| the user which role assigned to | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **assignNamespaceEnvRoleToUser** -> assignNamespaceEnvRoleToUser(appId, env, namespaceName, roleType, userId, operator) - -分配环境Namespace角色 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String roleType = "roleType_example"; // String | - String userId = "userId_example"; // String | the user which role assigned to - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.assignNamespaceEnvRoleToUser(appId, env, namespaceName, roleType, userId, operator); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#assignNamespaceEnvRoleToUser"); - 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**| | | -| **namespaceName** | **String**| | | -| **roleType** | **String**| | | -| **userId** | **String**| the user which role assigned to | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **assignNamespaceRoleToUser** -> assignNamespaceRoleToUser(appId, namespaceName, roleType, userId, operator) - -分配Namespace角色 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String appId = "appId_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String roleType = "roleType_example"; // String | - String userId = "userId_example"; // String | the user which role assigned to - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.assignNamespaceRoleToUser(appId, namespaceName, roleType, userId, operator); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#assignNamespaceRoleToUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **namespaceName** | **String**| | | -| **roleType** | **String**| | | -| **userId** | **String**| the user which role assigned to | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **deleteCreateApplicationRoleFromUser** -> deleteCreateApplicationRoleFromUser(userId, operator) - -移除建应用角色 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String userId = "userId_example"; // String | - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.deleteCreateApplicationRoleFromUser(userId, operator); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#deleteCreateApplicationRoleFromUser"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **userId** | **String**| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **getAppRoles** -> OpenAppRoleUserDTO getAppRoles(appId) - -获取应用角色用户 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String appId = "appId_example"; // String | - try { - OpenAppRoleUserDTO result = apiInstance.getAppRoles(appId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#getAppRoles"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | - -### Return type - -[**OpenAppRoleUserDTO**](OpenAppRoleUserDTO.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** | | - | - - -# **getClusterNamespaceRoles** -> OpenClusterNamespaceRoleUserDTO getClusterNamespaceRoles(appId, env, clusterName) - -获取集群Namespace用户 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - try { - OpenClusterNamespaceRoleUserDTO result = apiInstance.getClusterNamespaceRoles(appId, env, clusterName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#getClusterNamespaceRoles"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | - -### Return type - -[**OpenClusterNamespaceRoleUserDTO**](OpenClusterNamespaceRoleUserDTO.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** | | - | - - -# **getCreateApplicationRoleUsers** -> List<String> getCreateApplicationRoleUsers() - -获取建应用用户 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - try { - List result = apiInstance.getCreateApplicationRoleUsers(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#getCreateApplicationRoleUsers"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**List<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** | | - | - - -# **getNamespaceEnvRoleUsers** -> OpenEnvNamespaceRoleUserDTO getNamespaceEnvRoleUsers(appId, env, namespaceName) - -获取环境Namespace用户 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String namespaceName = "namespaceName_example"; // String | - try { - OpenEnvNamespaceRoleUserDTO result = apiInstance.getNamespaceEnvRoleUsers(appId, env, namespaceName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#getNamespaceEnvRoleUsers"); - 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**| | | -| **namespaceName** | **String**| | | - -### Return type - -[**OpenEnvNamespaceRoleUserDTO**](OpenEnvNamespaceRoleUserDTO.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** | | - | - - -# **getNamespaceRoles** -> OpenNamespaceRoleUserDTO getNamespaceRoles(appId, namespaceName) - -获取Namespace用户 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String appId = "appId_example"; // String | - String namespaceName = "namespaceName_example"; // String | - try { - OpenNamespaceRoleUserDTO result = apiInstance.getNamespaceRoles(appId, namespaceName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#getNamespaceRoles"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **namespaceName** | **String**| | | - -### Return type - -[**OpenNamespaceRoleUserDTO**](OpenNamespaceRoleUserDTO.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** | | - | - - -# **hasAppPermission** -> OpenPermissionConditionDTO hasAppPermission(appId, permissionType, userId) - -校验应用权限 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String appId = "appId_example"; // String | - String permissionType = "permissionType_example"; // String | - String userId = "userId_example"; // String | - try { - OpenPermissionConditionDTO result = apiInstance.hasAppPermission(appId, permissionType, userId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#hasAppPermission"); - 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**| | | -| **permissionType** | **String**| | | -| **userId** | **String**| | | - -### Return type - -[**OpenPermissionConditionDTO**](OpenPermissionConditionDTO.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** | | - | - - -# **hasClusterNamespacePermission** -> OpenPermissionConditionDTO hasClusterNamespacePermission(appId, env, clusterName, permissionType, userId) - -校验集群Namespace权限 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String permissionType = "permissionType_example"; // String | - String userId = "userId_example"; // String | - try { - OpenPermissionConditionDTO result = apiInstance.hasClusterNamespacePermission(appId, env, clusterName, permissionType, userId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#hasClusterNamespacePermission"); - 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**| | | -| **permissionType** | **String**| | | -| **userId** | **String**| | | - -### Return type - -[**OpenPermissionConditionDTO**](OpenPermissionConditionDTO.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** | | - | - - -# **hasCreateApplicationPermission** -> Map<String, Boolean> hasCreateApplicationPermission(userId) - -校验建应用权限 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String userId = "userId_example"; // String | - try { - Map result = apiInstance.hasCreateApplicationPermission(userId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#hasCreateApplicationPermission"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **userId** | **String**| | | - -### Return type - -**Map<String, Boolean>** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **hasEnvNamespacePermission** -> OpenPermissionConditionDTO hasEnvNamespacePermission(appId, env, namespaceName, permissionType, userId) - -校验环境Namespace权限 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String permissionType = "permissionType_example"; // String | - String userId = "userId_example"; // String | - try { - OpenPermissionConditionDTO result = apiInstance.hasEnvNamespacePermission(appId, env, namespaceName, permissionType, userId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#hasEnvNamespacePermission"); - 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**| | | -| **namespaceName** | **String**| | | -| **permissionType** | **String**| | | -| **userId** | **String**| | | - -### Return type - -[**OpenPermissionConditionDTO**](OpenPermissionConditionDTO.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** | | - | - - -# **hasNamespacePermission** -> OpenPermissionConditionDTO hasNamespacePermission(appId, namespaceName, permissionType, userId) - -校验Namespace权限 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String appId = "appId_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String permissionType = "permissionType_example"; // String | - String userId = "userId_example"; // String | - try { - OpenPermissionConditionDTO result = apiInstance.hasNamespacePermission(appId, namespaceName, permissionType, userId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#hasNamespacePermission"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **namespaceName** | **String**| | | -| **permissionType** | **String**| | | -| **userId** | **String**| | | - -### Return type - -[**OpenPermissionConditionDTO**](OpenPermissionConditionDTO.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** | | - | - - -# **hasRootPermission** -> OpenPermissionConditionDTO hasRootPermission(userId) - -校验Root权限 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String userId = "userId_example"; // String | - try { - OpenPermissionConditionDTO result = apiInstance.hasRootPermission(userId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#hasRootPermission"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **userId** | **String**| | | - -### Return type - -[**OpenPermissionConditionDTO**](OpenPermissionConditionDTO.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** | | - | - - -# **initAppPermission** -> initAppPermission(appId, namespaceName, operator) - -初始化应用权限 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String appId = "appId_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.initAppPermission(appId, namespaceName, operator); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#initAppPermission"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **namespaceName** | **String**| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 初始化成功 | - | - - -# **initClusterNamespacePermission** -> initClusterNamespacePermission(appId, env, clusterName, operator) - -初始化集群Namespace权限 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.initClusterNamespacePermission(appId, env, clusterName, operator); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#initClusterNamespacePermission"); - 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**| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **isManageAppMasterPermissionEnabled** -> Map<String, Boolean> isManageAppMasterPermissionEnabled() - -校验AppMaster开关 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - try { - Map result = apiInstance.isManageAppMasterPermissionEnabled(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#isManageAppMasterPermissionEnabled"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**Map<String, Boolean>** - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **removeAppRoleFromUser** -> removeAppRoleFromUser(appId, roleType, userId, operator) - -移除应用角色 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String appId = "appId_example"; // String | - String roleType = "roleType_example"; // String | - String userId = "userId_example"; // String | the user which role removed from - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.removeAppRoleFromUser(appId, roleType, userId, operator); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#removeAppRoleFromUser"); - 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**| | | -| **roleType** | **String**| | | -| **userId** | **String**| the user which role removed from | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **removeClusterNamespaceRoleFromUser** -> removeClusterNamespaceRoleFromUser(appId, env, clusterName, roleType, userId, operator) - -移除集群Namespace角色 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String roleType = "roleType_example"; // String | - String userId = "userId_example"; // String | the user which role removed from - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.removeClusterNamespaceRoleFromUser(appId, env, clusterName, roleType, userId, operator); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#removeClusterNamespaceRoleFromUser"); - 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**| | | -| **roleType** | **String**| | | -| **userId** | **String**| the user which role removed from | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **removeManageAppMasterRoleFromUser** -> removeManageAppMasterRoleFromUser(appId, userId, operator) - -移除AppMaster (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String appId = "appId_example"; // String | - String userId = "userId_example"; // String | the user which role removed from - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.removeManageAppMasterRoleFromUser(appId, userId, operator); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#removeManageAppMasterRoleFromUser"); - 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**| | | -| **userId** | **String**| the user which role removed from | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **removeNamespaceEnvRoleFromUser** -> removeNamespaceEnvRoleFromUser(appId, env, namespaceName, roleType, userId, operator) - -移除环境Namespace角色 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String roleType = "roleType_example"; // String | - String userId = "userId_example"; // String | the user which role removed from - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.removeNamespaceEnvRoleFromUser(appId, env, namespaceName, roleType, userId, operator); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#removeNamespaceEnvRoleFromUser"); - 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**| | | -| **namespaceName** | **String**| | | -| **roleType** | **String**| | | -| **userId** | **String**| the user which role removed from | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | - - -# **removeNamespaceRoleFromUser** -> removeNamespaceRoleFromUser(appId, namespaceName, roleType, userId, operator) - -移除Namespace角色 (new added) - - - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PermissionManagementApi; - -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"); - - PermissionManagementApi apiInstance = new PermissionManagementApi(defaultClient); - String appId = "appId_example"; // String | - String namespaceName = "namespaceName_example"; // String | - String roleType = "roleType_example"; // String | - String userId = "userId_example"; // String | the user which role removed from - String operator = "operator_example"; // String | 操作人用户名 - try { - apiInstance.removeNamespaceRoleFromUser(appId, namespaceName, roleType, userId, operator); - } catch (ApiException e) { - System.err.println("Exception when calling PermissionManagementApi#removeNamespaceRoleFromUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **namespaceName** | **String**| | | -| **roleType** | **String**| | | -| **userId** | **String**| the user which role removed from | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | | - | diff --git a/java-client/docs/PortalManagementApi.md b/java-client/docs/PortalManagementApi.md deleted file mode 100644 index b107cba8..00000000 --- a/java-client/docs/PortalManagementApi.md +++ /dev/null @@ -1,2611 +0,0 @@ -# PortalManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**addFavorite**](PortalManagementApi.md#addFavorite) | **POST** /openapi/v1/favorites | 添加收藏(new added) | -| [**assignRoleToConsumer**](PortalManagementApi.md#assignRoleToConsumer) | **POST** /openapi/v1/consumers/{token}/assign-role | 给消费者授权(new added) | -| [**checkExportAppConfig**](PortalManagementApi.md#checkExportAppConfig) | **HEAD** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export | 检查应用配置导出权限(new added) | -| [**checkSystemHealth**](PortalManagementApi.md#checkSystemHealth) | **GET** /openapi/v1/system-info/health | 检查系统实例健康状态(new added) | -| [**createConsumer**](PortalManagementApi.md#createConsumer) | **POST** /openapi/v1/consumers | 创建开放平台消费者(new added) | -| [**createOrUpdateConfigDBConfig**](PortalManagementApi.md#createOrUpdateConfigDBConfig) | **POST** /openapi/v1/server/envs/{env}/config-db/config | 创建或更新Config DB配置(new added) | -| [**createOrUpdatePortalDBConfig**](PortalManagementApi.md#createOrUpdatePortalDBConfig) | **POST** /openapi/v1/server/portal-db/config | 创建或更新Portal DB配置(new added) | -| [**deleteConfigDBConfig**](PortalManagementApi.md#deleteConfigDBConfig) | **DELETE** /openapi/v1/server/envs/{env}/config-db/config | 删除Config DB配置(new added) | -| [**deleteConsumer**](PortalManagementApi.md#deleteConsumer) | **DELETE** /openapi/v1/consumers/by-appId | 按应用ID删除消费者(new added) | -| [**deleteFavorite**](PortalManagementApi.md#deleteFavorite) | **DELETE** /openapi/v1/favorites/{favoriteId} | 删除收藏(new added) | -| [**deletePortalDBConfig**](PortalManagementApi.md#deletePortalDBConfig) | **DELETE** /openapi/v1/server/portal-db/config | 删除Portal DB配置(new added) | -| [**exportAllConfigs**](PortalManagementApi.md#exportAllConfigs) | **GET** /openapi/v1/configs/export | 导出所有配置(new added) | -| [**exportAppConfig**](PortalManagementApi.md#exportAppConfig) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export | 导出应用配置(new added) | -| [**exportNamespaceItems**](PortalManagementApi.md#exportNamespaceItems) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export | 导出命名空间配置项(new added) | -| [**findAllConfigDBConfig**](PortalManagementApi.md#findAllConfigDBConfig) | **GET** /openapi/v1/server/envs/{env}/config-db/config/find-all-config | 查询指定环境全部Config DB配置(new added) | -| [**findAllPortalDBConfig**](PortalManagementApi.md#findAllPortalDBConfig) | **GET** /openapi/v1/server/portal-db/config/find-all-config | 查询全部Portal DB配置(new added) | -| [**findAuditDataInfluencesByField**](PortalManagementApi.md#findAuditDataInfluencesByField) | **GET** /openapi/v1/apollo/audit/logs/dataInfluences/field | 查询审计数据影响(new added) | -| [**findAuditLogs**](PortalManagementApi.md#findAuditLogs) | **GET** /openapi/v1/apollo/audit/logs | 查询审计日志(new added) | -| [**findAuditLogsByOpName**](PortalManagementApi.md#findAuditLogsByOpName) | **GET** /openapi/v1/apollo/audit/logs/opName | 按操作名查询审计日志(new added) | -| [**findAuditTraceDetails**](PortalManagementApi.md#findAuditTraceDetails) | **GET** /openapi/v1/apollo/audit/trace | 查询审计链路详情(new added) | -| [**findCommits**](PortalManagementApi.md#findCommits) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits | 查询命名空间提交记录(new added) | -| [**findFavorites**](PortalManagementApi.md#findFavorites) | **GET** /openapi/v1/favorites | 查询收藏(new added) | -| [**findReleaseHistoriesByNamespace**](PortalManagementApi.md#findReleaseHistoriesByNamespace) | **GET** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories | 查询命名空间发布历史(new added) | -| [**getAuditProperties**](PortalManagementApi.md#getAuditProperties) | **GET** /openapi/v1/apollo/audit/properties | 获取审计配置(new added) | -| [**getConsumerList**](PortalManagementApi.md#getConsumerList) | **GET** /openapi/v1/consumers | 查询开放平台消费者列表(new added) | -| [**getConsumerTokenByAppId**](PortalManagementApi.md#getConsumerTokenByAppId) | **GET** /openapi/v1/consumer-tokens/by-appId | 按应用ID查询消费者Token(new added) | -| [**getPageSettings**](PortalManagementApi.md#getPageSettings) | **GET** /openapi/v1/page-settings | 获取Portal页面配置(new added) | -| [**getSystemInfo**](PortalManagementApi.md#getSystemInfo) | **GET** /openapi/v1/system-info | 获取系统信息(new added) | -| [**importAllConfigs**](PortalManagementApi.md#importAllConfigs) | **POST** /openapi/v1/configs/import | 导入所有配置(new added) | -| [**importAppConfig**](PortalManagementApi.md#importAppConfig) | **POST** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import | 导入应用配置(new added) | -| [**importConfig**](PortalManagementApi.md#importConfig) | **POST** /openapi/v1/import | 导入配置兼容入口(new added) | -| [**importNamespaceItems**](PortalManagementApi.md#importNamespaceItems) | **POST** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import | 导入命名空间配置项(new added) | -| [**searchAppsByAppIdOrName**](PortalManagementApi.md#searchAppsByAppIdOrName) | **GET** /openapi/v1/apps/search/by-appid-or-name | 按应用ID或名称搜索应用(new added) | -| [**searchAuditLogs**](PortalManagementApi.md#searchAuditLogs) | **GET** /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator | 搜索审计日志(new added) | -| [**searchItemInfoByKeyOrValue**](PortalManagementApi.md#searchItemInfoByKeyOrValue) | **GET** /openapi/v1/global-search/item-info/by-key-or-value | 按Key或Value全局搜索配置(new added) | -| [**topFavorite**](PortalManagementApi.md#topFavorite) | **PUT** /openapi/v1/favorites/{favoriteId} | 收藏置顶(new added) | - - - -# **addFavorite** -> Object addFavorite(body) - -添加收藏(new added) - -POST /openapi/v1/favorites - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - Object body = null; // Object | - try { - Object result = apiInstance.addFavorite(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#addFavorite"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **body** | **Object**| | | - -### 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** | 成功添加收藏 | - | - - -# **assignRoleToConsumer** -> List<Object> assignRoleToConsumer(token, type, body, envs) - -给消费者授权(new added) - -POST /openapi/v1/consumers/{token}/assign-role - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String token = "token_example"; // String | - String type = "type_example"; // String | - Object body = null; // Object | - String envs = "envs_example"; // String | - try { - List result = apiInstance.assignRoleToConsumer(token, type, body, envs); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#assignRoleToConsumer"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **token** | **String**| | | -| **type** | **String**| | | -| **body** | **Object**| | | -| **envs** | **String**| | [optional] | - -### Return type - -**List<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** | 成功授权 | - | - - -# **checkExportAppConfig** -> checkExportAppConfig(appId, env, clusterName) - -检查应用配置导出权限(new added) - -HEAD /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - try { - apiInstance.checkExportAppConfig(appId, env, clusterName); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#checkExportAppConfig"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 可导出 | - | - - -# **checkSystemHealth** -> Object checkSystemHealth(instanceId) - -检查系统实例健康状态(new added) - -GET /openapi/v1/system-info/health - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String instanceId = "instanceId_example"; // String | - try { - Object result = apiInstance.checkSystemHealth(instanceId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#checkSystemHealth"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **instanceId** | **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** | 成功获取健康状态 | - | - - -# **createConsumer** -> Object createConsumer(body, expires) - -创建开放平台消费者(new added) - -POST /openapi/v1/consumers - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - Object body = null; // Object | - String expires = "expires_example"; // String | - try { - Object result = apiInstance.createConsumer(body, expires); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#createConsumer"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **body** | **Object**| | | -| **expires** | **String**| | [optional] | - -### 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** | 成功创建消费者 | - | - - -# **createOrUpdateConfigDBConfig** -> Object createOrUpdateConfigDBConfig(env, body) - -创建或更新Config DB配置(new added) - -POST /openapi/v1/server/envs/{env}/config-db/config - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String env = "env_example"; // String | - Object body = null; // Object | - try { - Object result = apiInstance.createOrUpdateConfigDBConfig(env, body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#createOrUpdateConfigDBConfig"); - 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**| | | -| **body** | **Object**| | | - -### 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** | 成功创建或更新配置 | - | - - -# **createOrUpdatePortalDBConfig** -> Object createOrUpdatePortalDBConfig(body) - -创建或更新Portal DB配置(new added) - -POST /openapi/v1/server/portal-db/config - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - Object body = null; // Object | - try { - Object result = apiInstance.createOrUpdatePortalDBConfig(body); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#createOrUpdatePortalDBConfig"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **body** | **Object**| | | - -### 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** | 成功创建或更新配置 | - | - - -# **deleteConfigDBConfig** -> deleteConfigDBConfig(env, key, cluster) - -删除Config DB配置(new added) - -DELETE /openapi/v1/server/envs/{env}/config-db/config - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String env = "env_example"; // String | - String key = "key_example"; // String | - String cluster = "cluster_example"; // String | - try { - apiInstance.deleteConfigDBConfig(env, key, cluster); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#deleteConfigDBConfig"); - 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**| | | -| **key** | **String**| | | -| **cluster** | **String**| | | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功删除配置 | - | - - -# **deleteConsumer** -> deleteConsumer(appId) - -按应用ID删除消费者(new added) - -DELETE /openapi/v1/consumers/by-appId - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String appId = "appId_example"; // String | - try { - apiInstance.deleteConsumer(appId); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#deleteConsumer"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功删除消费者 | - | - - -# **deleteFavorite** -> deleteFavorite(favoriteId) - -删除收藏(new added) - -DELETE /openapi/v1/favorites/{favoriteId} - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - Long favoriteId = 56L; // Long | - try { - apiInstance.deleteFavorite(favoriteId); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#deleteFavorite"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **favoriteId** | **Long**| | | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功删除收藏 | - | - - -# **deletePortalDBConfig** -> deletePortalDBConfig(key) - -删除Portal DB配置(new added) - -DELETE /openapi/v1/server/portal-db/config - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String key = "key_example"; // String | - try { - apiInstance.deletePortalDBConfig(key); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#deletePortalDBConfig"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **key** | **String**| | | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功删除配置 | - | - - -# **exportAllConfigs** -> File exportAllConfigs(envs) - -导出所有配置(new added) - -GET /openapi/v1/configs/export - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String envs = "envs_example"; // String | - try { - File result = apiInstance.exportAllConfigs(envs); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#exportAllConfigs"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **envs** | **String**| | | - -### Return type - -[**File**](File.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/octet-stream - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功导出配置 | - | - - -# **exportAppConfig** -> File exportAppConfig(appId, env, clusterName) - -导出应用配置(new added) - -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - try { - File result = apiInstance.exportAppConfig(appId, env, clusterName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#exportAppConfig"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | - -### Return type - -[**File**](File.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/octet-stream - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功导出应用配置 | - | - - -# **exportNamespaceItems** -> File exportNamespaceItems(appId, env, clusterName, namespaceName) - -导出命名空间配置项(new added) - -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - try { - File result = apiInstance.exportNamespaceItems(appId, env, clusterName, namespaceName); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#exportNamespaceItems"); - 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 - -[**File**](File.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/octet-stream - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功导出命名空间配置项 | - | - - -# **findAllConfigDBConfig** -> List<Object> findAllConfigDBConfig(env) - -查询指定环境全部Config DB配置(new added) - -GET /openapi/v1/server/envs/{env}/config-db/config/find-all-config - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String env = "env_example"; // String | - try { - List result = apiInstance.findAllConfigDBConfig(env); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#findAllConfigDBConfig"); - 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**| | | - -### Return type - -**List<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** | 成功获取配置列表 | - | - - -# **findAllPortalDBConfig** -> List<Object> findAllPortalDBConfig() - -查询全部Portal DB配置(new added) - -GET /openapi/v1/server/portal-db/config/find-all-config - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - try { - List result = apiInstance.findAllPortalDBConfig(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#findAllPortalDBConfig"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**List<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** | 成功获取配置列表 | - | - - -# **findAuditDataInfluencesByField** -> List<Object> findAuditDataInfluencesByField(entityName, entityId, fieldName, page, size) - -查询审计数据影响(new added) - -GET /openapi/v1/apollo/audit/logs/dataInfluences/field - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String entityName = "entityName_example"; // String | - String entityId = "entityId_example"; // String | - String fieldName = "fieldName_example"; // String | - Integer page = 0; // Integer | - Integer size = 10; // Integer | - try { - List result = apiInstance.findAuditDataInfluencesByField(entityName, entityId, fieldName, page, size); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#findAuditDataInfluencesByField"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **entityName** | **String**| | | -| **entityId** | **String**| | | -| **fieldName** | **String**| | | -| **page** | **Integer**| | [optional] [default to 0] | -| **size** | **Integer**| | [optional] [default to 10] | - -### Return type - -**List<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** | 成功获取审计数据影响 | - | - - -# **findAuditLogs** -> List<Object> findAuditLogs(page, size) - -查询审计日志(new added) - -GET /openapi/v1/apollo/audit/logs - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - Integer page = 0; // Integer | - Integer size = 10; // Integer | - try { - List result = apiInstance.findAuditLogs(page, size); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#findAuditLogs"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **page** | **Integer**| | [optional] [default to 0] | -| **size** | **Integer**| | [optional] [default to 10] | - -### Return type - -**List<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** | 成功获取审计日志 | - | - - -# **findAuditLogsByOpName** -> List<Object> findAuditLogsByOpName(opName, page, size, startDate, endDate) - -按操作名查询审计日志(new added) - -GET /openapi/v1/apollo/audit/logs/opName - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String opName = "opName_example"; // String | - Integer page = 0; // Integer | - Integer size = 10; // Integer | - String startDate = "startDate_example"; // String | - String endDate = "endDate_example"; // String | - try { - List result = apiInstance.findAuditLogsByOpName(opName, page, size, startDate, endDate); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#findAuditLogsByOpName"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **opName** | **String**| | | -| **page** | **Integer**| | [optional] [default to 0] | -| **size** | **Integer**| | [optional] [default to 10] | -| **startDate** | **String**| | [optional] | -| **endDate** | **String**| | [optional] | - -### Return type - -**List<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** | 成功获取审计日志 | - | - - -# **findAuditTraceDetails** -> List<Object> findAuditTraceDetails(traceId) - -查询审计链路详情(new added) - -GET /openapi/v1/apollo/audit/trace - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String traceId = "traceId_example"; // String | - try { - List result = apiInstance.findAuditTraceDetails(traceId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#findAuditTraceDetails"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **traceId** | **String**| | | - -### Return type - -**List<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** | 成功获取审计链路详情 | - | - - -# **findCommits** -> List<Object> findCommits(appId, env, clusterName, namespaceName, key, page, size) - -查询命名空间提交记录(new added) - -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(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 | - Integer page = 0; // Integer | - Integer size = 10; // Integer | - try { - List result = apiInstance.findCommits(appId, env, clusterName, namespaceName, key, page, size); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#findCommits"); - 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**| | [optional] | -| **page** | **Integer**| | [optional] [default to 0] | -| **size** | **Integer**| | [optional] [default to 10] | - -### Return type - -**List<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** | 成功获取提交记录 | - | - - -# **findFavorites** -> List<Object> findFavorites(userId, appId, page, size) - -查询收藏(new added) - -GET /openapi/v1/favorites - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String userId = "userId_example"; // String | - String appId = "appId_example"; // String | - Integer page = 0; // Integer | - Integer size = 10; // Integer | - try { - List result = apiInstance.findFavorites(userId, appId, page, size); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#findFavorites"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **userId** | **String**| | [optional] | -| **appId** | **String**| | [optional] | -| **page** | **Integer**| | [optional] [default to 0] | -| **size** | **Integer**| | [optional] [default to 10] | - -### Return type - -**List<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** | 成功获取收藏 | - | - - -# **findReleaseHistoriesByNamespace** -> List<Object> findReleaseHistoriesByNamespace(appId, env, clusterName, namespaceName, page, size) - -查询命名空间发布历史(new added) - -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(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 = 10; // Integer | - try { - List result = apiInstance.findReleaseHistoriesByNamespace(appId, env, clusterName, namespaceName, page, size); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#findReleaseHistoriesByNamespace"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **page** | **Integer**| | [optional] [default to 0] | -| **size** | **Integer**| | [optional] [default to 10] | - -### Return type - -**List<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** | 成功获取发布历史 | - | - - -# **getAuditProperties** -> Object getAuditProperties() - -获取审计配置(new added) - -GET /openapi/v1/apollo/audit/properties - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - try { - Object result = apiInstance.getAuditProperties(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#getAuditProperties"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**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** | 成功获取审计配置 | - | - - -# **getConsumerList** -> List<Object> getConsumerList(page, size) - -查询开放平台消费者列表(new added) - -GET /openapi/v1/consumers - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - Integer page = 0; // Integer | - Integer size = 10; // Integer | - try { - List result = apiInstance.getConsumerList(page, size); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#getConsumerList"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **page** | **Integer**| | [optional] [default to 0] | -| **size** | **Integer**| | [optional] [default to 10] | - -### Return type - -**List<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** | 成功获取消费者列表 | - | - - -# **getConsumerTokenByAppId** -> Object getConsumerTokenByAppId(appId) - -按应用ID查询消费者Token(new added) - -GET /openapi/v1/consumer-tokens/by-appId - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String appId = "appId_example"; // String | - try { - Object result = apiInstance.getConsumerTokenByAppId(appId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#getConsumerTokenByAppId"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | - -### Return type - -**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** | 成功获取消费者Token | - | - - -# **getPageSettings** -> Object getPageSettings() - -获取Portal页面配置(new added) - -GET /openapi/v1/page-settings - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - try { - Object result = apiInstance.getPageSettings(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#getPageSettings"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**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** | 成功获取页面配置 | - | - - -# **getSystemInfo** -> Object getSystemInfo() - -获取系统信息(new added) - -GET /openapi/v1/system-info - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - try { - Object result = apiInstance.getSystemInfo(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#getSystemInfo"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -**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** | 成功获取系统信息 | - | - - -# **importAllConfigs** -> importAllConfigs(envs, conflictAction, _file) - -导入所有配置(new added) - -POST /openapi/v1/configs/import - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String envs = "envs_example"; // String | - String conflictAction = "ignore"; // String | - File _file = new File("/path/to/file"); // File | - try { - apiInstance.importAllConfigs(envs, conflictAction, _file); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#importAllConfigs"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **envs** | **String**| | | -| **conflictAction** | **String**| | [optional] [default to ignore] | -| **_file** | **File**| | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 导入成功 | - | - - -# **importAppConfig** -> importAppConfig(appId, env, clusterName, conflictAction, _file) - -导入应用配置(new added) - -POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String conflictAction = "ignore"; // String | - File _file = new File("/path/to/file"); // File | - try { - apiInstance.importAppConfig(appId, env, clusterName, conflictAction, _file); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#importAppConfig"); - 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**| | | -| **conflictAction** | **String**| | [optional] [default to ignore] | -| **_file** | **File**| | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 导入成功 | - | - - -# **importConfig** -> importConfig(envs, conflictAction, _file) - -导入配置兼容入口(new added) - -POST /openapi/v1/import - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String envs = "envs_example"; // String | - String conflictAction = "ignore"; // String | - File _file = new File("/path/to/file"); // File | - try { - apiInstance.importConfig(envs, conflictAction, _file); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#importConfig"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **envs** | **String**| | | -| **conflictAction** | **String**| | [optional] [default to ignore] | -| **_file** | **File**| | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 导入成功 | - | - - -# **importNamespaceItems** -> importNamespaceItems(appId, env, clusterName, namespaceName, _file) - -导入命名空间配置项(new added) - -POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String appId = "appId_example"; // String | - String env = "env_example"; // String | - String clusterName = "clusterName_example"; // String | - String namespaceName = "namespaceName_example"; // String | - File _file = new File("/path/to/file"); // File | - try { - apiInstance.importNamespaceItems(appId, env, clusterName, namespaceName, _file); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#importNamespaceItems"); - 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**| | | -| **_file** | **File**| | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: multipart/form-data - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 导入成功 | - | - - -# **searchAppsByAppIdOrName** -> Object searchAppsByAppIdOrName(query, page, size) - -按应用ID或名称搜索应用(new added) - -GET /openapi/v1/apps/search/by-appid-or-name - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String query = "query_example"; // String | - Integer page = 0; // Integer | - Integer size = 20; // Integer | - try { - Object result = apiInstance.searchAppsByAppIdOrName(query, page, size); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#searchAppsByAppIdOrName"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **query** | **String**| | [optional] | -| **page** | **Integer**| | [optional] [default to 0] | -| **size** | **Integer**| | [optional] [default to 20] | - -### 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** | 成功搜索应用 | - | - - -# **searchAuditLogs** -> List<Object> searchAuditLogs(query, page, size) - -搜索审计日志(new added) - -GET /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String query = "query_example"; // String | - Integer page = 0; // Integer | - Integer size = 10; // Integer | - try { - List result = apiInstance.searchAuditLogs(query, page, size); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#searchAuditLogs"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **query** | **String**| | | -| **page** | **Integer**| | [optional] [default to 0] | -| **size** | **Integer**| | [optional] [default to 10] | - -### Return type - -**List<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** | 成功搜索审计日志 | - | - - -# **searchItemInfoByKeyOrValue** -> Object searchItemInfoByKeyOrValue(key, value) - -按Key或Value全局搜索配置(new added) - -GET /openapi/v1/global-search/item-info/by-key-or-value - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - String key = ""; // String | - String value = ""; // String | - try { - Object result = apiInstance.searchItemInfoByKeyOrValue(key, value); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#searchItemInfoByKeyOrValue"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **key** | **String**| | [optional] [default to ] | -| **value** | **String**| | [optional] [default to ] | - -### 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** | 成功搜索配置 | - | - - -# **topFavorite** -> topFavorite(favoriteId) - -收藏置顶(new added) - -PUT /openapi/v1/favorites/{favoriteId} - -### 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.PortalManagementApi; - -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"); - - PortalManagementApi apiInstance = new PortalManagementApi(defaultClient); - Long favoriteId = 56L; // Long | - try { - apiInstance.topFavorite(favoriteId); - } catch (ApiException e) { - System.err.println("Exception when calling PortalManagementApi#topFavorite"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **favoriteId** | **Long**| | | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功置顶收藏 | - | diff --git a/java-client/docs/ReleaseManagementApi.md b/java-client/docs/ReleaseManagementApi.md deleted file mode 100644 index 5be055fe..00000000 --- a/java-client/docs/ReleaseManagementApi.md +++ /dev/null @@ -1,631 +0,0 @@ -# ReleaseManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**compareRelease**](ReleaseManagementApi.md#compareRelease) | **GET** /openapi/v1/envs/{env}/releases/comparison | Compare two releases | -| [**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) | -| [**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) | -| [**rollback**](ReleaseManagementApi.md#rollback) | **PUT** /openapi/v1/envs/{env}/releases/{releaseId}/rollback | 回滚发布 (original openapi) | - - - -# **compareRelease** -> OpenReleaseDiffDTO compareRelease(env, baseReleaseId, toCompareReleaseId) - -Compare two releases - -Get the configuration differences between two releases. - -### 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 | Environment - Long baseReleaseId = 56L; // Long | The base release ID - Long toCompareReleaseId = 56L; // Long | The release ID to compare against - try { - OpenReleaseDiffDTO result = apiInstance.compareRelease(env, baseReleaseId, toCompareReleaseId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling ReleaseManagementApi#compareRelease"); - 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**| Environment | | -| **baseReleaseId** | **Long**| The base release ID | | -| **toCompareReleaseId** | **Long**| The release ID to compare against | | - -### Return type - -[**OpenReleaseDiffDTO**](OpenReleaseDiffDTO.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** | Successful comparison | - | - - -# **createGrayDelRelease** -> OpenReleaseDTO createGrayDelRelease(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO, 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 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 | - String operator = "operator_example"; // String | 操作人用户名 - try { - OpenReleaseDTO result = apiInstance.createGrayDelRelease(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO, operator); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| | | -| **env** | **String**| | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| | | -| **branchName** | **String**| | | -| **namespaceGrayDelReleaseDTO** | [**NamespaceGrayDelReleaseDTO**](NamespaceGrayDelReleaseDTO.md)| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### 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** | | - | - - -# **createGrayRelease** -> OpenReleaseDTO createGrayRelease(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO, 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 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 | - String operator = "operator_example"; // String | 操作人用户名 - try { - OpenReleaseDTO result = apiInstance.createGrayRelease(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO, operator); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| app标识 | | -| **env** | **String**| 环境标识 | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | -| **branchName** | **String**| 分支名称 | | -| **namespaceReleaseDTO** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### 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** | 灰度发布创建成功 | - | - - -# **createRelease** -> OpenReleaseDTO createRelease(appId, env, clusterName, namespaceName, namespaceReleaseDTO, 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 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 | - String operator = "operator_example"; // String | 操作人用户名 - try { - OpenReleaseDTO result = apiInstance.createRelease(appId, env, clusterName, namespaceName, namespaceReleaseDTO, operator); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| app标识 | | -| **env** | **String**| 环境标识 | | -| **clusterName** | **String**| | | -| **namespaceName** | **String**| 命名空间名称 | | -| **namespaceReleaseDTO** | [**NamespaceReleaseDTO**](NamespaceReleaseDTO.md)| | | -| **operator** | **String**| 操作人用户名 | [optional] | - -### 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** | 权限不足 | - | - - -# **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 -// 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 | 命名空间名称 - Integer page = 0; // Integer | 页码,从0开始 - Integer size = 5; // Integer | 每页数量 - try { - List result = apiInstance.findActiveReleases(appId, env, clusterName, namespaceName, page, size); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **appId** | **String**| 应用ID | | -| **env** | **String**| 环境标识 | | -| **clusterName** | **String**| 集群名称 | | -| **namespaceName** | **String**| 命名空间名称 | | -| **page** | **Integer**| 页码,从0开始 | | -| **size** | **Integer**| 每页数量 | | - -### Return type - -[**List<OpenReleaseDTO>**](OpenReleaseDTO.md) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 成功获取活跃发布列表 | - | - - -# **getReleaseById** -> OpenReleaseDTO getReleaseById(env, releaseId) - -获取发布详情 (new added) - -GET /openapi/v1/envs/{env}/releases/{releaseId} - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.ReleaseManagementApi; - -public class Example { - public static void main(String[] args) { - ApiClient defaultClient = Configuration.getDefaultApiClient(); - defaultClient.setBasePath("http://localhost"); - - // Configure API key authorization: ApiKeyAuth - ApiKeyAuth ApiKeyAuth = (ApiKeyAuth) defaultClient.getAuthentication("ApiKeyAuth"); - ApiKeyAuth.setApiKey("YOUR API KEY"); - // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) - //ApiKeyAuth.setApiKeyPrefix("Token"); - - ReleaseManagementApi apiInstance = new ReleaseManagementApi(defaultClient); - String env = "env_example"; // String | 环境标识 - Long releaseId = 56L; // Long | 发布ID - try { - OpenReleaseDTO result = apiInstance.getReleaseById(env, releaseId); - System.out.println(result); - } catch (ApiException e) { - 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()); - e.printStackTrace(); - } - } -} -``` - -### Parameters - -| Name | Type | Description | Notes | -|------------- | ------------- | ------------- | -------------| -| **env** | **String**| 环境标识 | | -| **releaseId** | **Long**| 发布ID | | - -### 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** | 成功获取发布详情 | - | - - -# **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 - -[**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** | 未找到活跃发布 | - | - - -# **rollback** -> rollback(env, releaseId, operator, toReleaseId) - -回滚发布 (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 | 操作人用户名 - Long toReleaseId = 56L; // Long | 要回滚到的目标发布ID;不传时回滚到上一版本 - try { - apiInstance.rollback(env, releaseId, operator, toReleaseId); - } 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**| 操作人用户名 | [optional] | -| **toReleaseId** | **Long**| 要回滚到的目标发布ID;不传时回滚到上一版本 | [optional] | - -### Return type - -null (empty response body) - -### Authorization - -[ApiKeyAuth](../README.md#ApiKeyAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | 发布回滚成功 | - | diff --git a/java-client/docs/UserManagementApi.md b/java-client/docs/UserManagementApi.md deleted file mode 100644 index ff94a1b7..00000000 --- a/java-client/docs/UserManagementApi.md +++ /dev/null @@ -1,374 +0,0 @@ -# UserManagementApi - -All URIs are relative to *http://localhost* - -| Method | HTTP request | Description | -|------------- | ------------- | -------------| -| [**changeUserEnabled**](UserManagementApi.md#changeUserEnabled) | **PUT** /openapi/v1/users/enabled | 修改用户启用状态(new added) | -| [**createOrUpdateUser**](UserManagementApi.md#createOrUpdateUser) | **POST** /openapi/v1/users | 创建或更新用户(new added) | -| [**getCurrentUser**](UserManagementApi.md#getCurrentUser) | **GET** /openapi/v1/user | 获取当前Portal用户(new added) | -| [**getUserByUserId**](UserManagementApi.md#getUserByUserId) | **GET** /openapi/v1/users/{userId} | 获取指定用户(new added) | -| [**searchUsers**](UserManagementApi.md#searchUsers) | **GET** /openapi/v1/users | 搜索用户(new added) | - - - -# **changeUserEnabled** -> changeUserEnabled(openUserDTO, operator) - -修改用户启用状态(new added) - -PUT /openapi/v1/users/enabled,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.UserManagementApi; - -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"); - - UserManagementApi apiInstance = new UserManagementApi(defaultClient); - OpenUserDTO openUserDTO = new OpenUserDTO(); // OpenUserDTO | - String operator = "operator_example"; // String | 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数 - try { - apiInstance.changeUserEnabled(openUserDTO, operator); - } catch (ApiException e) { - System.err.println("Exception when calling UserManagementApi#changeUserEnabled"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **openUserDTO** | [**OpenUserDTO**](OpenUserDTO.md)| | | -| **operator** | **String**| 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数 | [optional] | - -### Return type - -null (empty response body) - -### 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** | 权限不足 | - | - - -# **createOrUpdateUser** -> createOrUpdateUser(openUserDTO, isCreate, operator) - -创建或更新用户(new added) - -POST /openapi/v1/users,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - -### Example -```java -// Import classes: -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.Configuration; -import org.openapitools.client.auth.*; -import org.openapitools.client.models.*; -import org.openapitools.client.api.UserManagementApi; - -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"); - - UserManagementApi apiInstance = new UserManagementApi(defaultClient); - OpenUserDTO openUserDTO = new OpenUserDTO(); // OpenUserDTO | - Boolean isCreate = false; // Boolean | true 表示创建用户,false 表示更新用户 - String operator = "operator_example"; // String | 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数 - try { - apiInstance.createOrUpdateUser(openUserDTO, isCreate, operator); - } catch (ApiException e) { - System.err.println("Exception when calling UserManagementApi#createOrUpdateUser"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **openUserDTO** | [**OpenUserDTO**](OpenUserDTO.md)| | | -| **isCreate** | **Boolean**| true 表示创建用户,false 表示更新用户 | [optional] [default to false] | -| **operator** | **String**| 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数 | [optional] | - -### Return type - -null (empty response body) - -### 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** | 权限不足 | - | - - -# **getCurrentUser** -> OpenUserInfoDTO getCurrentUser() - -获取当前Portal用户(new added) - -GET /openapi/v1/user - -### 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.UserManagementApi; - -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"); - - UserManagementApi apiInstance = new UserManagementApi(defaultClient); - try { - OpenUserInfoDTO result = apiInstance.getCurrentUser(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UserManagementApi#getCurrentUser"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**OpenUserInfoDTO**](OpenUserInfoDTO.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** | 未登录或未授权访问 | - | -| **403** | 仅支持Portal用户登录态访问 | - | - - -# **getUserByUserId** -> OpenUserInfoDTO getUserByUserId(userId) - -获取指定用户(new added) - -GET /openapi/v1/users/{userId},支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - -### 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.UserManagementApi; - -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"); - - UserManagementApi apiInstance = new UserManagementApi(defaultClient); - String userId = "userId_example"; // String | 用户ID - try { - OpenUserInfoDTO result = apiInstance.getUserByUserId(userId); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UserManagementApi#getUserByUserId"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **userId** | **String**| 用户ID | | - -### Return type - -[**OpenUserInfoDTO**](OpenUserInfoDTO.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** | 请求参数错误或用户不存在 | - | -| **401** | 未登录或未认证 | - | -| **403** | 权限不足 | - | - - -# **searchUsers** -> List<OpenUserInfoDTO> searchUsers(keyword, includeInactiveUsers, offset, limit) - -搜索用户(new added) - -GET /openapi/v1/users,支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - -### 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.UserManagementApi; - -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"); - - UserManagementApi apiInstance = new UserManagementApi(defaultClient); - String keyword = "keyword_example"; // String | 用户名、显示名或邮箱关键字 - Boolean includeInactiveUsers = false; // Boolean | 是否包含禁用用户 - Integer offset = 0; // Integer | 偏移量 - Integer limit = 10; // Integer | 返回数量 - try { - List result = apiInstance.searchUsers(keyword, includeInactiveUsers, offset, limit); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling UserManagementApi#searchUsers"); - 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 | -|------------- | ------------- | ------------- | -------------| -| **keyword** | **String**| 用户名、显示名或邮箱关键字 | | -| **includeInactiveUsers** | **Boolean**| 是否包含禁用用户 | [optional] [default to false] | -| **offset** | **Integer**| 偏移量 | [optional] [default to 0] | -| **limit** | **Integer**| 返回数量 | [optional] [default to 10] | - -### Return type - -[**List<OpenUserInfoDTO>**](OpenUserInfoDTO.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** | 未登录或未授权访问 | - | -| **403** | 权限不足 | - | diff --git a/java-client/git_push.sh b/java-client/git_push.sh deleted file mode 100644 index f53a75d4..00000000 --- a/java-client/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/java-client/gradle.properties b/java-client/gradle.properties deleted file mode 100644 index a3408578..00000000 --- a/java-client/gradle.properties +++ /dev/null @@ -1,6 +0,0 @@ -# This file is automatically generated by OpenAPI Generator (https://github.com/openAPITools/openapi-generator). -# To include other gradle properties as part of the code generation process, please use the `gradleProperties` option. -# -# Gradle properties reference: https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties -# For example, uncomment below to build for Android -#target = android diff --git a/java-client/gradle/wrapper/gradle-wrapper.jar b/java-client/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 7454180f2ae8848c63b8b4dea2cb829da983f2fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 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 diff --git a/java-client/gradle/wrapper/gradle-wrapper.properties b/java-client/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index ffed3a25..00000000 --- a/java-client/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/java-client/gradlew b/java-client/gradlew deleted file mode 100644 index 005bcde0..00000000 --- a/java-client/gradlew +++ /dev/null @@ -1,234 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" -APP_BASE_NAME=${0##*/} - -# 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 "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - 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 - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - 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: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - -# 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 \ - "$@" - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/java-client/gradlew.bat b/java-client/gradlew.bat deleted file mode 100644 index 6a68175e..00000000 --- a/java-client/gradlew.bat +++ /dev/null @@ -1,89 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS=-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%" == "0" goto execute - -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 - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -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 - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="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! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/java-client/pom.xml b/java-client/pom.xml deleted file mode 100644 index 365e4b70..00000000 --- a/java-client/pom.xml +++ /dev/null @@ -1,353 +0,0 @@ - - 4.0.0 - com.apollo - apollo-openapi-client - jar - apollo-openapi-client - 0.3.8 - https://github.com/openapitools/openapi-generator - OpenAPI Java - - scm:git:git@github.com:openapitools/openapi-generator.git - scm:git:git@github.com:openapitools/openapi-generator.git - https://github.com/openapitools/openapi-generator - - - - - Unlicense - http://unlicense.org - repo - - - - - - OpenAPI-Generator Contributors - team@openapitools.org - OpenAPITools.org - http://openapitools.org - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.8.1 - - true - 128m - 512m - - -Xlint:all - -J-Xss4m - - - - - org.apache.maven.plugins - maven-enforcer-plugin - 3.1.0 - - - enforce-maven - - enforce - - - - - 2.2.0 - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.22.2 - - - - loggerPath - conf/log4j.properties - - - -Xms512m -Xmx1500m - methods - 10 - - - - - org.junit.jupiter - junit-jupiter-engine - ${junit-version} - - - - - maven-dependency-plugin - 3.3.0 - - - package - - copy-dependencies - - - ${project.build.directory}/lib - - - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.3.0 - - - - test-jar - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.3.0 - - - add_sources - generate-sources - - add-source - - - - src/main/java - - - - - add_test_sources - generate-test-sources - - add-test-source - - - - src/test/java - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.4.1 - - - attach-javadocs - - jar - - - - - none - - - http.response.details - a - Http Response Details: - - - - - - org.apache.maven.plugins - maven-source-plugin - 3.2.1 - - - attach-sources - - jar-no-fork - - - - - - - com.diffplug.spotless - spotless-maven-plugin - ${spotless.version} - - - - - - - .gitignore - - - - - - true - 4 - - - - - - - - - - 1.8 - - true - - - - - - - - - - - - - - sign-artifacts - - - - org.apache.maven.plugins - maven-gpg-plugin - 3.0.1 - - - sign-artifacts - verify - - sign - - - - - - - - - - - - - com.google.code.findbugs - jsr305 - 3.0.2 - - - com.squareup.okhttp3 - okhttp - ${okhttp-version} - - - com.squareup.okhttp3 - logging-interceptor - ${okhttp-version} - - - com.google.code.gson - gson - ${gson-version} - - - io.gsonfire - gson-fire - ${gson-fire-version} - - - org.apache.commons - commons-lang3 - ${commons-lang3-version} - - - jakarta.annotation - jakarta.annotation-api - ${jakarta-annotation-version} - provided - - - org.openapitools - jackson-databind-nullable - ${jackson-databind-nullable-version} - - - - javax.ws.rs - jsr311-api - ${jsr311-api-version} - - - javax.ws.rs - javax.ws.rs-api - ${javax.ws.rs-api-version} - - - - org.junit.jupiter - junit-jupiter-engine - ${junit-version} - test - - - org.junit.platform - junit-platform-runner - ${junit-platform-runner.version} - test - - - org.mockito - mockito-core - ${mockito-core-version} - test - - - - 1.8 - ${java.version} - ${java.version} - 1.8.5 - 1.6.6 - 4.10.0 - 2.9.1 - 3.12.0 - 0.2.6 - 1.3.5 - 5.9.1 - 1.9.1 - 3.12.4 - 2.1.1 - 1.1.1 - UTF-8 - 2.27.2 - - diff --git a/java-client/settings.gradle b/java-client/settings.gradle deleted file mode 100644 index c6fad06e..00000000 --- a/java-client/settings.gradle +++ /dev/null @@ -1 +0,0 @@ -rootProject.name = "apollo-openapi-client" diff --git a/java-client/src/main/AndroidManifest.xml b/java-client/src/main/AndroidManifest.xml deleted file mode 100644 index 54fbcb3d..00000000 --- a/java-client/src/main/AndroidManifest.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/java-client/src/main/java/org/openapitools/client/ApiCallback.java b/java-client/src/main/java/org/openapitools/client/ApiCallback.java deleted file mode 100644 index 15873316..00000000 --- a/java-client/src/main/java/org/openapitools/client/ApiCallback.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import java.io.IOException; - -import java.util.Map; -import java.util.List; - -/** - * Callback for asynchronous API call. - * - * @param The return type - */ -public interface ApiCallback { - /** - * This is called when the API call fails. - * - * @param e The exception causing the failure - * @param statusCode Status code of the response if available, otherwise it would be 0 - * @param responseHeaders Headers of the response if available, otherwise it would be null - */ - void onFailure(ApiException e, int statusCode, Map> responseHeaders); - - /** - * This is called when the API call succeeded. - * - * @param result The result deserialized from response - * @param statusCode Status code of the response - * @param responseHeaders Headers of the response - */ - void onSuccess(T result, int statusCode, Map> responseHeaders); - - /** - * This is called when the API upload processing. - * - * @param bytesWritten bytes Written - * @param contentLength content length of request body - * @param done write end - */ - void onUploadProgress(long bytesWritten, long contentLength, boolean done); - - /** - * This is called when the API download processing. - * - * @param bytesRead bytes Read - * @param contentLength content length of the response - * @param done Read end - */ - void onDownloadProgress(long bytesRead, long contentLength, boolean done); -} diff --git a/java-client/src/main/java/org/openapitools/client/ApiClient.java b/java-client/src/main/java/org/openapitools/client/ApiClient.java deleted file mode 100644 index 386a9579..00000000 --- a/java-client/src/main/java/org/openapitools/client/ApiClient.java +++ /dev/null @@ -1,1548 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import okhttp3.*; -import okhttp3.internal.http.HttpMethod; -import okhttp3.internal.tls.OkHostnameVerifier; -import okhttp3.logging.HttpLoggingInterceptor; -import okhttp3.logging.HttpLoggingInterceptor.Level; -import okio.Buffer; -import okio.BufferedSink; -import okio.Okio; - -import javax.net.ssl.*; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.UnsupportedEncodingException; -import java.lang.reflect.Type; -import java.net.URI; -import java.net.URLConnection; -import java.net.URLEncoder; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.security.GeneralSecurityException; -import java.security.KeyStore; -import java.security.SecureRandom; -import java.security.cert.Certificate; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.text.DateFormat; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.*; -import java.util.Map.Entry; -import java.util.concurrent.TimeUnit; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import org.openapitools.client.auth.Authentication; -import org.openapitools.client.auth.HttpBasicAuth; -import org.openapitools.client.auth.HttpBearerAuth; -import org.openapitools.client.auth.ApiKeyAuth; - -/** - *

ApiClient class.

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

Getter for the field keyManagers.

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

Getter for the field dateFormat.

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

Setter for the field dateFormat.

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

Set SqlDateFormat.

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

Set OffsetDateTimeFormat.

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

Set LocalDateFormat.

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

Set LenientOnJson.

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

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import java.util.Map; -import java.util.List; - -import javax.ws.rs.core.GenericType; - -/** - *

ApiException class.

- */ -@SuppressWarnings("serial") -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApiException extends Exception { - private int code = 0; - private Map> responseHeaders = null; - private String responseBody = null; - - /** - *

Constructor for ApiException.

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

Constructor for ApiException.

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

Constructor for ApiException.

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

Constructor for ApiException.

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

Constructor for ApiException.

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

Constructor for ApiException.

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

Constructor for ApiException.

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

Constructor for ApiException.

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

Constructor for ApiException.

- * - * @param code HTTP status code - * @param message the error message - * @param responseHeaders a {@link java.util.Map} of HTTP response headers - * @param responseBody the response body - */ - public ApiException(int code, String message, Map> responseHeaders, String responseBody) { - this(code, message); - this.responseHeaders = responseHeaders; - this.responseBody = responseBody; - } - - /** - * Get the HTTP status code. - * - * @return HTTP status code - */ - public int getCode() { - return code; - } - - /** - * Get the HTTP response headers. - * - * @return A map of list of string - */ - public Map> getResponseHeaders() { - return responseHeaders; - } - - /** - * Get the HTTP response body. - * - * @return Response body in the form of string - */ - public String getResponseBody() { - return responseBody; - } - - /** - * Get the exception message including HTTP response data. - * - * @return The exception message - */ - public String getMessage() { - return String.format("Message: %s%nHTTP response code: %s%nHTTP response body: %s%nHTTP response headers: %s", - super.getMessage(), this.getCode(), this.getResponseBody(), this.getResponseHeaders()); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/ApiResponse.java b/java-client/src/main/java/org/openapitools/client/ApiResponse.java deleted file mode 100644 index ccac344d..00000000 --- a/java-client/src/main/java/org/openapitools/client/ApiResponse.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import java.util.List; -import java.util.Map; - -/** - * API response returned by API call. - */ -public class ApiResponse { - final private int statusCode; - final private Map> headers; - final private T data; - - /** - *

Constructor for ApiResponse.

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

Constructor for ApiResponse.

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

Get the status code.

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

Get the headers.

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

Get the data.

- * - * @return the data - */ - public T getData() { - return data; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/Configuration.java b/java-client/src/main/java/org/openapitools/client/Configuration.java deleted file mode 100644 index 2339cf6c..00000000 --- a/java-client/src/main/java/org/openapitools/client/Configuration.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Configuration { - public static final String VERSION = "0.3.8"; - - 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; - } - - /** - * 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 deleted file mode 100644 index 2f3710ab..00000000 --- a/java-client/src/main/java/org/openapitools/client/GzipRequestInterceptor.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import okhttp3.*; -import okio.Buffer; -import okio.BufferedSink; -import okio.GzipSink; -import okio.Okio; - -import java.io.IOException; - -/** - * Encodes request bodies using gzip. - * - * Taken from https://github.com/square/okhttp/issues/350 - */ -class GzipRequestInterceptor implements Interceptor { - @Override - public Response intercept(Chain chain) throws IOException { - Request originalRequest = chain.request(); - if (originalRequest.body() == null || originalRequest.header("Content-Encoding") != null) { - return chain.proceed(originalRequest); - } - - Request compressedRequest = originalRequest.newBuilder() - .header("Content-Encoding", "gzip") - .method(originalRequest.method(), forceContentLength(gzip(originalRequest.body()))) - .build(); - return chain.proceed(compressedRequest); - } - - private RequestBody forceContentLength(final RequestBody requestBody) throws IOException { - final Buffer buffer = new Buffer(); - requestBody.writeTo(buffer); - return new RequestBody() { - @Override - public MediaType contentType() { - return requestBody.contentType(); - } - - @Override - public long contentLength() { - return buffer.size(); - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - sink.write(buffer.snapshot()); - } - }; - } - - private RequestBody gzip(final RequestBody body) { - return new RequestBody() { - @Override - public MediaType contentType() { - return body.contentType(); - } - - @Override - public long contentLength() { - return -1; // We don't know the compressed length in advance! - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - BufferedSink gzipSink = Okio.buffer(new GzipSink(sink)); - body.writeTo(gzipSink); - gzipSink.close(); - } - }; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/JSON.java b/java-client/src/main/java/org/openapitools/client/JSON.java deleted file mode 100644 index 31932a3a..00000000 --- a/java-client/src/main/java/org/openapitools/client/JSON.java +++ /dev/null @@ -1,438 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapter; -import com.google.gson.internal.bind.util.ISO8601Utils; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import com.google.gson.JsonElement; -import io.gsonfire.GsonFireBuilder; -import io.gsonfire.TypeSelector; - -import okio.ByteString; - -import java.io.IOException; -import java.io.StringReader; -import java.lang.reflect.Type; -import java.text.DateFormat; -import java.text.ParseException; -import java.text.ParsePosition; -import java.time.LocalDate; -import java.time.OffsetDateTime; -import java.time.format.DateTimeFormatter; -import java.util.Date; -import java.util.Locale; -import java.util.Map; -import java.util.HashMap; - -/* - * A JSON utility class - * - * NOTE: in the future, this class may be converted to static, which may break - * backward-compatibility - */ -public class JSON { - private static Gson gson; - private static boolean isLenientOnJson = false; - private static DateTypeAdapter dateTypeAdapter = new DateTypeAdapter(); - private static SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); - private static OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); - private static LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); - private static ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); - - @SuppressWarnings("unchecked") - public static GsonBuilder createGson() { - GsonFireBuilder fireBuilder = new GsonFireBuilder() - ; - GsonBuilder builder = fireBuilder.createGsonBuilder(); - return builder; - } - - private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { - JsonElement element = readElement.getAsJsonObject().get(discriminatorField); - if (null == element) { - throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">"); - } - return element.getAsString(); - } - - /** - * Returns the Java class that implements the OpenAPI schema for the specified discriminator value. - * - * @param classByDiscriminatorValue The map of discriminator values to Java classes. - * @param discriminatorValue The value of the OpenAPI discriminator in the input data. - * @return The Java class that implements the OpenAPI schema - */ - private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) { - Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue); - if (null == clazz) { - throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">"); - } - return clazz; - } - - { - 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.ExceptionResponse.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NamespaceGrayDelReleaseDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.NamespaceReleaseDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenAccessKeyDTO.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.OpenAppRoleUserDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenClusterDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenClusterNamespaceRoleUserDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenCreateAppDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenCreateNamespaceDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenEnvClusterDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenEnvClusterInfo.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenEnvNamespaceRoleUserDTO.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.OpenInstancePageDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenItemDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenItemDiffDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenItemExtendDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenItemPageDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenMissEnvDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenNamespaceDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenNamespaceExtendDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenNamespaceIdentifier.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenNamespaceLockDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenNamespaceRoleUserDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenNamespaceSyncDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenNamespaceTextModel.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenNamespaceUsageDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenOrganizationDto.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenPermissionConditionDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenReleaseChangeDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenReleaseDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenReleaseDiffDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenUserDTO.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.OpenUserInfoDTO.CustomTypeAdapterFactory()); - gson = gsonBuilder.create(); - } - - /** - * Get Gson. - * - * @return Gson - */ - public static Gson getGson() { - return gson; - } - - /** - * Set Gson. - * - * @param gson Gson - */ - public static void setGson(Gson gson) { - JSON.gson = gson; - } - - public static void setLenientOnJson(boolean lenientOnJson) { - isLenientOnJson = lenientOnJson; - } - - /** - * Serialize the given Java object into JSON string. - * - * @param obj Object - * @return String representation of the JSON - */ - public static String serialize(Object obj) { - return gson.toJson(obj); - } - - /** - * Deserialize the given JSON string to Java object. - * - * @param Type - * @param body The JSON string - * @param returnType The type to deserialize into - * @return The deserialized Java object - */ - @SuppressWarnings("unchecked") - public static T deserialize(String body, Type returnType) { - try { - if (isLenientOnJson) { - JsonReader jsonReader = new JsonReader(new StringReader(body)); - // see https://google-gson.googlecode.com/svn/trunk/gson/docs/javadocs/com/google/gson/stream/JsonReader.html#setLenient(boolean) - jsonReader.setLenient(true); - return gson.fromJson(jsonReader, returnType); - } else { - return gson.fromJson(body, returnType); - } - } catch (JsonParseException e) { - // Fallback processing when failed to parse JSON form response body: - // return the response body string directly for the String return type; - if (returnType.equals(String.class)) { - return (T) body; - } else { - throw (e); - } - } - } - - /** - * Gson TypeAdapter for Byte Array type - */ - public static class ByteArrayAdapter extends TypeAdapter { - - @Override - public void write(JsonWriter out, byte[] value) throws IOException { - if (value == null) { - out.nullValue(); - } else { - out.value(ByteString.of(value).base64()); - } - } - - @Override - public byte[] read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String bytesAsBase64 = in.nextString(); - ByteString byteString = ByteString.decodeBase64(bytesAsBase64); - return byteString.toByteArray(); - } - } - } - - /** - * Gson TypeAdapter for JSR310 OffsetDateTime type - */ - public static class OffsetDateTimeTypeAdapter extends TypeAdapter { - - private DateTimeFormatter formatter; - - public OffsetDateTimeTypeAdapter() { - this(DateTimeFormatter.ISO_OFFSET_DATE_TIME); - } - - public OffsetDateTimeTypeAdapter(DateTimeFormatter formatter) { - this.formatter = formatter; - } - - public void setFormat(DateTimeFormatter dateFormat) { - this.formatter = dateFormat; - } - - @Override - public void write(JsonWriter out, OffsetDateTime date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } - } - - @Override - public OffsetDateTime read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - if (date.endsWith("+0000")) { - date = date.substring(0, date.length()-5) + "Z"; - } - return OffsetDateTime.parse(date, formatter); - } - } - } - - /** - * Gson TypeAdapter for JSR310 LocalDate type - */ - public static class LocalDateTypeAdapter extends TypeAdapter { - - private DateTimeFormatter formatter; - - public LocalDateTypeAdapter() { - this(DateTimeFormatter.ISO_LOCAL_DATE); - } - - public LocalDateTypeAdapter(DateTimeFormatter formatter) { - this.formatter = formatter; - } - - public void setFormat(DateTimeFormatter dateFormat) { - this.formatter = dateFormat; - } - - @Override - public void write(JsonWriter out, LocalDate date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - out.value(formatter.format(date)); - } - } - - @Override - public LocalDate read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - return LocalDate.parse(date, formatter); - } - } - } - - public static void setOffsetDateTimeFormat(DateTimeFormatter dateFormat) { - offsetDateTimeTypeAdapter.setFormat(dateFormat); - } - - public static void setLocalDateFormat(DateTimeFormatter dateFormat) { - localDateTypeAdapter.setFormat(dateFormat); - } - - /** - * Gson TypeAdapter for java.sql.Date type - * If the dateFormat is null, a simple "yyyy-MM-dd" format will be used - * (more efficient than SimpleDateFormat). - */ - public static class SqlDateTypeAdapter extends TypeAdapter { - - private DateFormat dateFormat; - - public SqlDateTypeAdapter() {} - - public SqlDateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - @Override - public void write(JsonWriter out, java.sql.Date date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = date.toString(); - } - out.value(value); - } - } - - @Override - public java.sql.Date read(JsonReader in) throws IOException { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return new java.sql.Date(dateFormat.parse(date).getTime()); - } - return new java.sql.Date(ISO8601Utils.parse(date, new ParsePosition(0)).getTime()); - } catch (ParseException e) { - throw new JsonParseException(e); - } - } - } - } - - /** - * Gson TypeAdapter for java.util.Date type - * If the dateFormat is null, ISO8601Utils will be used. - */ - public static class DateTypeAdapter extends TypeAdapter { - - private DateFormat dateFormat; - - public DateTypeAdapter() {} - - public DateTypeAdapter(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - public void setFormat(DateFormat dateFormat) { - this.dateFormat = dateFormat; - } - - @Override - public void write(JsonWriter out, Date date) throws IOException { - if (date == null) { - out.nullValue(); - } else { - String value; - if (dateFormat != null) { - value = dateFormat.format(date); - } else { - value = ISO8601Utils.format(date, true); - } - out.value(value); - } - } - - @Override - public Date read(JsonReader in) throws IOException { - try { - switch (in.peek()) { - case NULL: - in.nextNull(); - return null; - default: - String date = in.nextString(); - try { - if (dateFormat != null) { - return dateFormat.parse(date); - } - return ISO8601Utils.parse(date, new ParsePosition(0)); - } catch (ParseException e) { - throw new JsonParseException(e); - } - } - } catch (IllegalArgumentException e) { - throw new JsonParseException(e); - } - } - } - - public static void setDateFormat(DateFormat dateFormat) { - dateTypeAdapter.setFormat(dateFormat); - } - - public static void setSqlDateFormat(DateFormat dateFormat) { - sqlDateTypeAdapter.setFormat(dateFormat); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/Pair.java b/java-client/src/main/java/org/openapitools/client/Pair.java deleted file mode 100644 index d6f58fc3..00000000 --- a/java-client/src/main/java/org/openapitools/client/Pair.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class Pair { - 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 String getName() { - return this.name; - } - - public String getValue() { - return this.value; - } - - private boolean isValidString(String arg) { - if (arg == null) { - return false; - } - - 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 deleted file mode 100644 index 960868cd..00000000 --- a/java-client/src/main/java/org/openapitools/client/ProgressRequestBody.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import okhttp3.MediaType; -import okhttp3.RequestBody; - -import java.io.IOException; - -import okio.Buffer; -import okio.BufferedSink; -import okio.ForwardingSink; -import okio.Okio; -import okio.Sink; - -public class ProgressRequestBody extends RequestBody { - - private final RequestBody requestBody; - - private final ApiCallback callback; - - public ProgressRequestBody(RequestBody requestBody, ApiCallback callback) { - this.requestBody = requestBody; - this.callback = callback; - } - - @Override - public MediaType contentType() { - return requestBody.contentType(); - } - - @Override - public long contentLength() throws IOException { - return requestBody.contentLength(); - } - - @Override - public void writeTo(BufferedSink sink) throws IOException { - BufferedSink bufferedSink = Okio.buffer(sink(sink)); - requestBody.writeTo(bufferedSink); - bufferedSink.flush(); - } - - private Sink sink(Sink sink) { - return new ForwardingSink(sink) { - - long bytesWritten = 0L; - long contentLength = 0L; - - @Override - public void write(Buffer source, long byteCount) throws IOException { - super.write(source, byteCount); - if (contentLength == 0) { - contentLength = contentLength(); - } - - bytesWritten += byteCount; - callback.onUploadProgress(bytesWritten, contentLength, bytesWritten == contentLength); - } - }; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/ProgressResponseBody.java b/java-client/src/main/java/org/openapitools/client/ProgressResponseBody.java deleted file mode 100644 index 72fd091e..00000000 --- a/java-client/src/main/java/org/openapitools/client/ProgressResponseBody.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import okhttp3.MediaType; -import okhttp3.ResponseBody; - -import java.io.IOException; - -import okio.Buffer; -import okio.BufferedSource; -import okio.ForwardingSource; -import okio.Okio; -import okio.Source; - -public class ProgressResponseBody extends ResponseBody { - - private final ResponseBody responseBody; - private final ApiCallback callback; - private BufferedSource bufferedSource; - - public ProgressResponseBody(ResponseBody responseBody, ApiCallback callback) { - this.responseBody = responseBody; - this.callback = callback; - } - - @Override - public MediaType contentType() { - return responseBody.contentType(); - } - - @Override - public long contentLength() { - return responseBody.contentLength(); - } - - @Override - public BufferedSource source() { - if (bufferedSource == null) { - bufferedSource = Okio.buffer(source(responseBody.source())); - } - return bufferedSource; - } - - private Source source(Source source) { - return new ForwardingSource(source) { - long totalBytesRead = 0L; - - @Override - public long read(Buffer sink, long byteCount) throws IOException { - long bytesRead = super.read(sink, byteCount); - // read() returns the number of bytes read, or -1 if this source is exhausted. - totalBytesRead += bytesRead != -1 ? bytesRead : 0; - callback.onDownloadProgress(totalBytesRead, responseBody.contentLength(), bytesRead == -1); - return bytesRead; - } - }; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/ServerConfiguration.java b/java-client/src/main/java/org/openapitools/client/ServerConfiguration.java deleted file mode 100644 index 59edc528..00000000 --- a/java-client/src/main/java/org/openapitools/client/ServerConfiguration.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.openapitools.client; - -import java.util.Map; - -/** - * Representing a Server configuration. - */ -public class ServerConfiguration { - public String URL; - public String description; - public Map variables; - - /** - * @param URL A URL to the target host. - * @param description A description of the host designated by the URL. - * @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template. - */ - public ServerConfiguration(String URL, String description, Map variables) { - this.URL = URL; - this.description = description; - this.variables = variables; - } - - /** - * Format URL template using given variables. - * - * @param variables A map between a variable name and its value. - * @return Formatted URL. - */ - public String URL(Map variables) { - String url = this.URL; - - // go through variables and replace placeholders - for (Map.Entry variable: this.variables.entrySet()) { - String name = variable.getKey(); - ServerVariable serverVariable = variable.getValue(); - String value = serverVariable.defaultValue; - - if (variables != null && variables.containsKey(name)) { - value = variables.get(name); - if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) { - throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + "."); - } - } - url = url.replace("{" + name + "}", value); - } - return url; - } - - /** - * Format URL template using default server variables. - * - * @return Formatted URL. - */ - public String URL() { - return URL(null); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/ServerVariable.java b/java-client/src/main/java/org/openapitools/client/ServerVariable.java deleted file mode 100644 index c2f13e21..00000000 --- a/java-client/src/main/java/org/openapitools/client/ServerVariable.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.openapitools.client; - -import java.util.HashSet; - -/** - * Representing a Server Variable for server URL template substitution. - */ -public class ServerVariable { - public String description; - public String defaultValue; - public HashSet enumValues = null; - - /** - * @param description A description for the server variable. - * @param defaultValue The default value to use for substitution. - * @param enumValues An enumeration of string values to be used if the substitution options are from a limited set. - */ - public ServerVariable(String description, String defaultValue, HashSet enumValues) { - this.description = description; - this.defaultValue = defaultValue; - this.enumValues = enumValues; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/StringUtil.java b/java-client/src/main/java/org/openapitools/client/StringUtil.java deleted file mode 100644 index db183c85..00000000 --- a/java-client/src/main/java/org/openapitools/client/StringUtil.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client; - -import java.util.Collection; -import java.util.Iterator; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class StringUtil { - /** - * Check if the given array contains the given value (with case-insensitive comparison). - * - * @param array The array - * @param value The value to search - * @return true if the array contains the value - */ - public static boolean containsIgnoreCase(String[] array, String value) { - for (String str : array) { - if (value == null && str == null) { - return true; - } - if (value != null && value.equalsIgnoreCase(str)) { - return true; - } - } - return false; - } - - /** - * Join an array of strings with the given separator. - *

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

- * - * @param array The array of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(String[] array, String separator) { - int len = array.length; - if (len == 0) { - return ""; - } - - StringBuilder out = new StringBuilder(); - out.append(array[0]); - for (int i = 1; i < len; i++) { - out.append(separator).append(array[i]); - } - return out.toString(); - } - - /** - * Join a list of strings with the given separator. - * - * @param list The list of strings - * @param separator The separator - * @return the resulting string - */ - public static String join(Collection list, String separator) { - Iterator iterator = list.iterator(); - StringBuilder out = new StringBuilder(); - if (iterator.hasNext()) { - out.append(iterator.next()); - } - while (iterator.hasNext()) { - out.append(separator).append(iterator.next()); - } - return out.toString(); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/api/AccessKeyManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/AccessKeyManagementApi.java deleted file mode 100644 index f74e2578..00000000 --- a/java-client/src/main/java/org/openapitools/client/api/AccessKeyManagementApi.java +++ /dev/null @@ -1,795 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.OpenAccessKeyDTO; - -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 AccessKeyManagementApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public AccessKeyManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public AccessKeyManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createAccessKey - * @param appId (required) - * @param env (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call createAccessKeyCall(String appId, String env, 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}/accesskeys" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createAccessKeyValidateBeforeCall(String appId, String env, 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 createAccessKey(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling createAccessKey(Async)"); - } - - return createAccessKeyCall(appId, env, operator, _callback); - - } - - /** - * 创建AccessKey - * - * @param appId (required) - * @param env (required) - * @param operator 操作人用户名 (optional) - * @return OpenAccessKeyDTO - * @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 OpenAccessKeyDTO createAccessKey(String appId, String env, String operator) throws ApiException { - ApiResponse localVarResp = createAccessKeyWithHttpInfo(appId, env, operator); - return localVarResp.getData(); - } - - /** - * 创建AccessKey - * - * @param appId (required) - * @param env (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<OpenAccessKeyDTO> - * @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 createAccessKeyWithHttpInfo(String appId, String env, String operator) throws ApiException { - okhttp3.Call localVarCall = createAccessKeyValidateBeforeCall(appId, env, operator, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 创建AccessKey (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call createAccessKeyAsync(String appId, String env, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createAccessKeyValidateBeforeCall(appId, env, operator, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteAccessKey - * @param appId (required) - * @param env (required) - * @param accessKeyId (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call deleteAccessKeyCall(String appId, String env, Long accessKeyId, 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}/accesskeys/{accessKeyId}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "accessKeyId" + "}", localVarApiClient.escapeString(accessKeyId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteAccessKeyValidateBeforeCall(String appId, String env, Long accessKeyId, 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 deleteAccessKey(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling deleteAccessKey(Async)"); - } - - // verify the required parameter 'accessKeyId' is set - if (accessKeyId == null) { - throw new ApiException("Missing the required parameter 'accessKeyId' when calling deleteAccessKey(Async)"); - } - - return deleteAccessKeyCall(appId, env, accessKeyId, operator, _callback); - - } - - /** - * 删除AccessKey - * - * @param appId (required) - * @param env (required) - * @param accessKeyId (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public void deleteAccessKey(String appId, String env, Long accessKeyId, String operator) throws ApiException { - deleteAccessKeyWithHttpInfo(appId, env, accessKeyId, operator); - } - - /** - * 删除AccessKey - * - * @param appId (required) - * @param env (required) - * @param accessKeyId (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse deleteAccessKeyWithHttpInfo(String appId, String env, Long accessKeyId, String operator) throws ApiException { - okhttp3.Call localVarCall = deleteAccessKeyValidateBeforeCall(appId, env, accessKeyId, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 删除AccessKey (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param accessKeyId (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call deleteAccessKeyAsync(String appId, String env, Long accessKeyId, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteAccessKeyValidateBeforeCall(appId, env, accessKeyId, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for disableAccessKey - * @param appId (required) - * @param env (required) - * @param accessKeyId (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call disableAccessKeyCall(String appId, String env, Long accessKeyId, 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}/accesskeys/{accessKeyId}/deactivation" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "accessKeyId" + "}", localVarApiClient.escapeString(accessKeyId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call disableAccessKeyValidateBeforeCall(String appId, String env, Long accessKeyId, 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 disableAccessKey(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling disableAccessKey(Async)"); - } - - // verify the required parameter 'accessKeyId' is set - if (accessKeyId == null) { - throw new ApiException("Missing the required parameter 'accessKeyId' when calling disableAccessKey(Async)"); - } - - return disableAccessKeyCall(appId, env, accessKeyId, operator, _callback); - - } - - /** - * 禁用AccessKey - * - * @param appId (required) - * @param env (required) - * @param accessKeyId (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public void disableAccessKey(String appId, String env, Long accessKeyId, String operator) throws ApiException { - disableAccessKeyWithHttpInfo(appId, env, accessKeyId, operator); - } - - /** - * 禁用AccessKey - * - * @param appId (required) - * @param env (required) - * @param accessKeyId (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse disableAccessKeyWithHttpInfo(String appId, String env, Long accessKeyId, String operator) throws ApiException { - okhttp3.Call localVarCall = disableAccessKeyValidateBeforeCall(appId, env, accessKeyId, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 禁用AccessKey (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param accessKeyId (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call disableAccessKeyAsync(String appId, String env, Long accessKeyId, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = disableAccessKeyValidateBeforeCall(appId, env, accessKeyId, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for enableAccessKey - * @param appId (required) - * @param env (required) - * @param accessKeyId (required) - * @param mode (optional, default to 0) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call enableAccessKeyCall(String appId, String env, Long accessKeyId, Integer mode, 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}/accesskeys/{accessKeyId}/activation" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "accessKeyId" + "}", localVarApiClient.escapeString(accessKeyId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (mode != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("mode", mode)); - } - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call enableAccessKeyValidateBeforeCall(String appId, String env, Long accessKeyId, Integer mode, 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 enableAccessKey(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling enableAccessKey(Async)"); - } - - // verify the required parameter 'accessKeyId' is set - if (accessKeyId == null) { - throw new ApiException("Missing the required parameter 'accessKeyId' when calling enableAccessKey(Async)"); - } - - return enableAccessKeyCall(appId, env, accessKeyId, mode, operator, _callback); - - } - - /** - * 启用AccessKey - * - * @param appId (required) - * @param env (required) - * @param accessKeyId (required) - * @param mode (optional, default to 0) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public void enableAccessKey(String appId, String env, Long accessKeyId, Integer mode, String operator) throws ApiException { - enableAccessKeyWithHttpInfo(appId, env, accessKeyId, mode, operator); - } - - /** - * 启用AccessKey - * - * @param appId (required) - * @param env (required) - * @param accessKeyId (required) - * @param mode (optional, default to 0) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse enableAccessKeyWithHttpInfo(String appId, String env, Long accessKeyId, Integer mode, String operator) throws ApiException { - okhttp3.Call localVarCall = enableAccessKeyValidateBeforeCall(appId, env, accessKeyId, mode, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 启用AccessKey (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param accessKeyId (required) - * @param mode (optional, default to 0) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call enableAccessKeyAsync(String appId, String env, Long accessKeyId, Integer mode, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = enableAccessKeyValidateBeforeCall(appId, env, accessKeyId, mode, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findAccessKeys - * @param appId (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 - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call findAccessKeysCall(String appId, String env, 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}/accesskeys" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - 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 findAccessKeysValidateBeforeCall(String appId, 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 findAccessKeys(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling findAccessKeys(Async)"); - } - - return findAccessKeysCall(appId, env, _callback); - - } - - /** - * 查找AccessKey - * - * @param appId (required) - * @param env (required) - * @return List<OpenAccessKeyDTO> - * @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 findAccessKeys(String appId, String env) throws ApiException { - ApiResponse> localVarResp = findAccessKeysWithHttpInfo(appId, env); - return localVarResp.getData(); - } - - /** - * 查找AccessKey - * - * @param appId (required) - * @param env (required) - * @return ApiResponse<List<OpenAccessKeyDTO>> - * @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> findAccessKeysWithHttpInfo(String appId, String env) throws ApiException { - okhttp3.Call localVarCall = findAccessKeysValidateBeforeCall(appId, env, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 查找AccessKey (asynchronously) - * - * @param appId (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 - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call findAccessKeysAsync(String appId, String env, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = findAccessKeysValidateBeforeCall(appId, 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/AppManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/AppManagementApi.java deleted file mode 100644 index d42e7e2a..00000000 --- a/java-client/src/main/java/org/openapitools/client/api/AppManagementApi.java +++ /dev/null @@ -1,1521 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.ExceptionResponse; -import org.openapitools.client.model.OpenAppDTO; -import org.openapitools.client.model.OpenCreateAppDTO; -import org.openapitools.client.model.OpenEnvClusterDTO; -import org.openapitools.client.model.OpenEnvClusterInfo; -import org.openapitools.client.model.OpenMissEnvDTO; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.ws.rs.core.GenericType; - -public class AppManagementApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public AppManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public AppManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for 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 - - - - - -
Status Code Description Response Headers
200 应用创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call createAppCall(OpenCreateAppDTO openCreateAppDTO, 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 = openCreateAppDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/apps"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call 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)"); - } - - return createAppCall(openCreateAppDTO, _callback); - - } - - /** - * 创建应用 (original openapi) - * POST /openapi/v1/apps - * @param openCreateAppDTO (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 应用创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public void createApp(OpenCreateAppDTO openCreateAppDTO) throws ApiException { - createAppWithHttpInfo(openCreateAppDTO); - } - - /** - * 创建应用 (original openapi) - * POST /openapi/v1/apps - * @param openCreateAppDTO (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 应用创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public ApiResponse createAppWithHttpInfo(OpenCreateAppDTO openCreateAppDTO) throws ApiException { - okhttp3.Call localVarCall = createAppValidateBeforeCall(openCreateAppDTO, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 创建应用 (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 - - - - - -
Status Code Description Response Headers
200 应用创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call createAppAsync(OpenCreateAppDTO openCreateAppDTO, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createAppValidateBeforeCall(openCreateAppDTO, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for createAppInEnv - * @param env 环境标识,例如 DEV、FAT、UAT、PROD (required) - * @param openAppDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 应用在指定环境创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call createAppInEnvCall(String env, OpenAppDTO openAppDTO, 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 = openAppDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/envs/{env}" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createAppInEnvValidateBeforeCall(String env, OpenAppDTO openAppDTO, String operator, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling createAppInEnv(Async)"); - } - - // verify the required parameter 'openAppDTO' is set - if (openAppDTO == null) { - throw new ApiException("Missing the required parameter 'openAppDTO' when calling createAppInEnv(Async)"); - } - - return createAppInEnvCall(env, openAppDTO, operator, _callback); - - } - - /** - * 在指定环境创建应用(new added) - * POST /openapi/v1/apps/envs/{env} - * @param env 环境标识,例如 DEV、FAT、UAT、PROD (required) - * @param openAppDTO (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 应用在指定环境创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public void createAppInEnv(String env, OpenAppDTO openAppDTO, String operator) throws ApiException { - createAppInEnvWithHttpInfo(env, openAppDTO, operator); - } - - /** - * 在指定环境创建应用(new added) - * POST /openapi/v1/apps/envs/{env} - * @param env 环境标识,例如 DEV、FAT、UAT、PROD (required) - * @param openAppDTO (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 应用在指定环境创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public ApiResponse createAppInEnvWithHttpInfo(String env, OpenAppDTO openAppDTO, String operator) throws ApiException { - okhttp3.Call localVarCall = createAppInEnvValidateBeforeCall(env, openAppDTO, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 在指定环境创建应用(new added) (asynchronously) - * POST /openapi/v1/apps/envs/{env} - * @param env 环境标识,例如 DEV、FAT、UAT、PROD (required) - * @param openAppDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 应用在指定环境创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call createAppInEnvAsync(String env, OpenAppDTO openAppDTO, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createAppInEnvValidateBeforeCall(env, openAppDTO, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for deleteApp - * @param appId 应用ID (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 应用删除成功 -
403 权限不足,需要超级管理员权限 -
404 应用不存在 -
- */ - public okhttp3.Call deleteAppCall(String appId, 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}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - 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 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 deleteApp(Async)"); - } - - return deleteAppCall(appId, operator, _callback); - - } - - /** - * 删除应用(new added) - * DELETE /openapi/v1/apps/{appId} - * @param appId 应用ID (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 应用删除成功 -
403 权限不足,需要超级管理员权限 -
404 应用不存在 -
- */ - public void deleteApp(String appId, String operator) throws ApiException { - deleteAppWithHttpInfo(appId, operator); - } - - /** - * 删除应用(new added) - * DELETE /openapi/v1/apps/{appId} - * @param appId 应用ID (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 应用删除成功 -
403 权限不足,需要超级管理员权限 -
404 应用不存在 -
- */ - public ApiResponse deleteAppWithHttpInfo(String appId, String operator) throws ApiException { - okhttp3.Call localVarCall = deleteAppValidateBeforeCall(appId, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 删除应用(new added) (asynchronously) - * DELETE /openapi/v1/apps/{appId} - * @param appId 应用ID (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 应用删除成功 -
403 权限不足,需要超级管理员权限 -
404 应用不存在 -
- */ - public okhttp3.Call deleteAppAsync(String appId, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteAppValidateBeforeCall(appId, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * 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 - - - - -
Status Code Description Response Headers
200 成功获取应用列表 -
401 未授权访问 -
- */ - public okhttp3.Call findAppsCall(String appIds, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (appIds != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("appIds", appIds)); - } - - 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 findAppsValidateBeforeCall(String appIds, final ApiCallback _callback) throws ApiException { - return findAppsCall(appIds, _callback); - - } - - /** - * 查找应用 (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 - - - - -
Status Code Description Response Headers
200 成功获取应用列表 -
401 未授权访问 -
- */ - public List findApps(String appIds) throws ApiException { - ApiResponse> localVarResp = findAppsWithHttpInfo(appIds); - return localVarResp.getData(); - } - - /** - * 查找应用 (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 - - - - -
Status Code Description Response Headers
200 成功获取应用列表 -
401 未授权访问 -
- */ - public ApiResponse> findAppsWithHttpInfo(String appIds) throws ApiException { - okhttp3.Call localVarCall = findAppsValidateBeforeCall(appIds, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 查找应用 (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 - - - - -
Status Code Description Response Headers
200 成功获取应用列表 -
401 未授权访问 -
- */ - public okhttp3.Call findAppsAsync(String appIds, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = findAppsValidateBeforeCall(appIds, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * 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 - - - - -
Status Code Description Response Headers
200 成功获取授权应用列表 -
401 未授权访问 -
- */ - public okhttp3.Call findAppsAuthorizedCall(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/authorized"; - - 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 findAppsAuthorizedValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return findAppsAuthorizedCall(_callback); - - } - - /** - * 获取当前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 - - - - -
Status Code Description Response Headers
200 成功获取授权应用列表 -
401 未授权访问 -
- */ - public List findAppsAuthorized() throws ApiException { - ApiResponse> localVarResp = findAppsAuthorizedWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * 获取当前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 - - - - -
Status Code Description Response Headers
200 成功获取授权应用列表 -
401 未授权访问 -
- */ - public ApiResponse> findAppsAuthorizedWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = findAppsAuthorizedValidateBeforeCall(null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取当前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 - - - - -
Status Code Description Response Headers
200 成功获取授权应用列表 -
401 未授权访问 -
- */ - public okhttp3.Call findAppsAuthorizedAsync(final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = findAppsAuthorizedValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * 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 - - - - -
Status Code Description Response Headers
200 成功获取应用缺失的环境列表 -
404 应用不存在 -
- */ - public okhttp3.Call findMissEnvsCall(String appId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/miss-envs" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call 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 findMissEnvs(Async)"); - } - - return findMissEnvsCall(appId, _callback); - - } - - /** - * 查找缺失的环境(new added) - * GET /openapi/v1/apps/{appId}/miss-envs - * @param appId 应用ID (required) - * @return List<OpenMissEnvDTO> - * @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 List findMissEnvs(String appId) throws ApiException { - ApiResponse> localVarResp = findMissEnvsWithHttpInfo(appId); - return localVarResp.getData(); - } - - /** - * 查找缺失的环境(new added) - * GET /openapi/v1/apps/{appId}/miss-envs - * @param appId 应用ID (required) - * @return ApiResponse<List<OpenMissEnvDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 成功获取应用缺失的环境列表 -
404 应用不存在 -
- */ - public ApiResponse> findMissEnvsWithHttpInfo(String appId) throws ApiException { - okhttp3.Call localVarCall = findMissEnvsValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 查找缺失的环境(new added) (asynchronously) - * GET /openapi/v1/apps/{appId}/miss-envs - * @param appId 应用ID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @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 findMissEnvsAsync(String appId, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = findMissEnvsValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * 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 - - - - -
Status Code Description Response Headers
200 成功获取应用信息 -
404 应用不存在 -
- */ - public okhttp3.Call getAppCall(String appId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call 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 getApp(Async)"); - } - - return getAppCall(appId, _callback); - - } - - /** - * 获取单个应用信息(new added) - * GET /openapi/v1/apps/{appId} - * @param appId (required) - * @return OpenAppDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 成功获取应用信息 -
404 应用不存在 -
- */ - public OpenAppDTO getApp(String appId) throws ApiException { - ApiResponse localVarResp = getAppWithHttpInfo(appId); - return localVarResp.getData(); - } - - /** - * 获取单个应用信息(new added) - * GET /openapi/v1/apps/{appId} - * @param appId (required) - * @return ApiResponse<OpenAppDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 成功获取应用信息 -
404 应用不存在 -
- */ - public ApiResponse getAppWithHttpInfo(String appId) throws ApiException { - okhttp3.Call localVarCall = getAppValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取单个应用信息(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 - - - - -
Status Code Description Response Headers
200 成功获取应用信息 -
404 应用不存在 -
- */ - public okhttp3.Call getAppAsync(String appId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getAppValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getAppsBySelf - * @param page 页数 (required) - * @param size 页大小 (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 成功获取Consumer的应用列表 -
401 未授权访问 -
- */ - public okhttp3.Call getAppsBySelfCall(Integer page, Integer size, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/by-self"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (size != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getAppsBySelfValidateBeforeCall(Integer page, Integer size, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException("Missing the required parameter 'page' when calling getAppsBySelf(Async)"); - } - - // verify the required parameter 'size' is set - if (size == null) { - throw new ApiException("Missing the required parameter 'size' when calling getAppsBySelf(Async)"); - } - - return getAppsBySelfCall(page, size, _callback); - - } - - /** - * 获取当前Consumer/User的应用列表(分页)(new added) - * GET /openapi/v1/apps/by-self - * @param page 页数 (required) - * @param size 页大小 (required) - * @return List<OpenAppDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 成功获取Consumer的应用列表 -
401 未授权访问 -
- */ - public List getAppsBySelf(Integer page, Integer size) throws ApiException { - ApiResponse> localVarResp = getAppsBySelfWithHttpInfo(page, size); - return localVarResp.getData(); - } - - /** - * 获取当前Consumer/User的应用列表(分页)(new added) - * GET /openapi/v1/apps/by-self - * @param page 页数 (required) - * @param size 页大小 (required) - * @return ApiResponse<List<OpenAppDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 成功获取Consumer的应用列表 -
401 未授权访问 -
- */ - 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/User的应用列表(分页)(new added) (asynchronously) - * GET /openapi/v1/apps/by-self - * @param page 页数 (required) - * @param size 页大小 (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 成功获取Consumer的应用列表 -
401 未授权访问 -
- */ - public okhttp3.Call getAppsBySelfAsync(Integer page, Integer size, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = getAppsBySelfValidateBeforeCall(page, size, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getEnvClusterInfo - * @param appId 应用ID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取应用环境集群详情 -
- */ - public okhttp3.Call getEnvClusterInfoCall(String appId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/env-cluster-info" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call 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 getEnvClusterInfoCall(appId, _callback); - - } - - /** - * 获取应用环境集群详情(new added) - * /openapi/v1/apps/{appId}/env-cluster-info - * @param appId 应用ID (required) - * @return List<OpenEnvClusterInfo> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取应用环境集群详情 -
- */ - public List getEnvClusterInfo(String appId) throws ApiException { - ApiResponse> localVarResp = getEnvClusterInfoWithHttpInfo(appId); - return localVarResp.getData(); - } - - /** - * 获取应用环境集群详情(new added) - * /openapi/v1/apps/{appId}/env-cluster-info - * @param appId 应用ID (required) - * @return ApiResponse<List<OpenEnvClusterInfo>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取应用环境集群详情 -
- */ - public ApiResponse> getEnvClusterInfoWithHttpInfo(String appId) throws ApiException { - okhttp3.Call localVarCall = getEnvClusterInfoValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取应用环境集群详情(new added) (asynchronously) - * /openapi/v1/apps/{appId}/env-cluster-info - * @param appId 应用ID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取应用环境集群详情 -
- */ - public okhttp3.Call getEnvClusterInfoAsync(String appId, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = getEnvClusterInfoValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getEnvClusters - * @param appId 应用ID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 成功获取应用环境集群信息 -
404 应用不存在 -
- */ - public okhttp3.Call getEnvClustersCall(String appId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/envclusters" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getEnvClustersValidateBeforeCall(String appId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling getEnvClusters(Async)"); - } - - return getEnvClustersCall(appId, _callback); - - } - - /** - * 获取应用的环境集群信息 (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 - - - - -
Status Code Description Response Headers
200 成功获取应用环境集群信息 -
404 应用不存在 -
- */ - public List getEnvClusters(String appId) throws ApiException { - ApiResponse> localVarResp = getEnvClustersWithHttpInfo(appId); - return localVarResp.getData(); - } - - /** - * 获取应用的环境集群信息 (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 - - - - -
Status Code Description Response Headers
200 成功获取应用环境集群信息 -
404 应用不存在 -
- */ - public ApiResponse> getEnvClustersWithHttpInfo(String appId) throws ApiException { - okhttp3.Call localVarCall = getEnvClustersValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取应用的环境集群信息 (original openapi) (asynchronously) - * GET /openapi/v1/apps/{appId}/envclusters - * @param appId 应用ID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 成功获取应用环境集群信息 -
404 应用不存在 -
- */ - public okhttp3.Call getEnvClustersAsync(String appId, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = getEnvClustersValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateApp - * @param appId 应用ID (required) - * @param openAppDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 应用更新成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call updateAppCall(String appId, OpenAppDTO openAppDTO, 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 = openAppDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateAppValidateBeforeCall(String appId, OpenAppDTO openAppDTO, String operator, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling updateApp(Async)"); - } - - // verify the required parameter 'openAppDTO' is set - if (openAppDTO == null) { - throw new ApiException("Missing the required parameter 'openAppDTO' when calling updateApp(Async)"); - } - - return updateAppCall(appId, openAppDTO, operator, _callback); - - } - - /** - * 更新应用(new added) - * PUT /openapi/v1/apps/{appId} - * @param appId 应用ID (required) - * @param openAppDTO (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 应用更新成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public void updateApp(String appId, OpenAppDTO openAppDTO, String operator) throws ApiException { - updateAppWithHttpInfo(appId, openAppDTO, operator); - } - - /** - * 更新应用(new added) - * PUT /openapi/v1/apps/{appId} - * @param appId 应用ID (required) - * @param openAppDTO (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 应用更新成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public ApiResponse updateAppWithHttpInfo(String appId, OpenAppDTO openAppDTO, String operator) throws ApiException { - okhttp3.Call localVarCall = updateAppValidateBeforeCall(appId, openAppDTO, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 更新应用(new added) (asynchronously) - * PUT /openapi/v1/apps/{appId} - * @param appId 应用ID (required) - * @param openAppDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 应用更新成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call updateAppAsync(String appId, OpenAppDTO openAppDTO, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateAppValidateBeforeCall(appId, openAppDTO, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/api/AppNamespaceManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/AppNamespaceManagementApi.java deleted file mode 100644 index fc067cb6..00000000 --- a/java-client/src/main/java/org/openapitools/client/api/AppNamespaceManagementApi.java +++ /dev/null @@ -1,1032 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.ExceptionResponse; -import org.openapitools.client.model.OpenAppNamespaceDTO; -import org.openapitools.client.model.OpenNamespaceDTO; -import org.openapitools.client.model.OpenNamespaceUsageDTO; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.ws.rs.core.GenericType; - -public class AppNamespaceManagementApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public AppNamespaceManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public AppNamespaceManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createAppNamespace - * @param appId (required) - * @param openAppNamespaceDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call createAppNamespaceCall(String appId, OpenAppNamespaceDTO openAppNamespaceDTO, String operator, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = openAppNamespaceDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/appnamespaces" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createAppNamespaceValidateBeforeCall(String appId, OpenAppNamespaceDTO openAppNamespaceDTO, String operator, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling createAppNamespace(Async)"); - } - - // verify the required parameter 'openAppNamespaceDTO' is set - if (openAppNamespaceDTO == null) { - throw new ApiException("Missing the required parameter 'openAppNamespaceDTO' when calling createAppNamespace(Async)"); - } - - return createAppNamespaceCall(appId, openAppNamespaceDTO, operator, _callback); - - } - - /** - * 创建AppNamespace (original openapi) - * POST /openapi/v1/apps/{appId}/appnamespaces - * @param appId (required) - * @param openAppNamespaceDTO (required) - * @param operator 操作人用户名 (optional) - * @return OpenAppNamespaceDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public OpenAppNamespaceDTO createAppNamespace(String appId, OpenAppNamespaceDTO openAppNamespaceDTO, String operator) throws ApiException { - ApiResponse localVarResp = createAppNamespaceWithHttpInfo(appId, openAppNamespaceDTO, operator); - return localVarResp.getData(); - } - - /** - * 创建AppNamespace (original openapi) - * POST /openapi/v1/apps/{appId}/appnamespaces - * @param appId (required) - * @param openAppNamespaceDTO (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<OpenAppNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public ApiResponse createAppNamespaceWithHttpInfo(String appId, OpenAppNamespaceDTO openAppNamespaceDTO, String operator) throws ApiException { - okhttp3.Call localVarCall = createAppNamespaceValidateBeforeCall(appId, openAppNamespaceDTO, operator, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 创建AppNamespace (original openapi) (asynchronously) - * POST /openapi/v1/apps/{appId}/appnamespaces - * @param appId (required) - * @param openAppNamespaceDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 AppNamespace创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call createAppNamespaceAsync(String appId, OpenAppNamespaceDTO openAppNamespaceDTO, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createAppNamespaceValidateBeforeCall(appId, openAppNamespaceDTO, operator, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteAppNamespace - * @param appId 应用ID (required) - * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 AppNamespace删除成功 -
- */ - public okhttp3.Call deleteAppNamespaceCall(String appId, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteAppNamespaceValidateBeforeCall(String appId, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling deleteAppNamespace(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling deleteAppNamespace(Async)"); - } - - return deleteAppNamespaceCall(appId, namespaceName, operator, _callback); - - } - - /** - * 删除AppNamespace (new added) - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * @param appId 应用ID (required) - * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 AppNamespace删除成功 -
- */ - public void deleteAppNamespace(String appId, String namespaceName, String operator) throws ApiException { - deleteAppNamespaceWithHttpInfo(appId, namespaceName, operator); - } - - /** - * 删除AppNamespace (new added) - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * @param appId 应用ID (required) - * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 AppNamespace删除成功 -
- */ - public ApiResponse deleteAppNamespaceWithHttpInfo(String appId, String namespaceName, String operator) throws ApiException { - okhttp3.Call localVarCall = deleteAppNamespaceValidateBeforeCall(appId, namespaceName, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 删除AppNamespace (new added) (asynchronously) - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * @param appId 应用ID (required) - * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 AppNamespace删除成功 -
- */ - public okhttp3.Call deleteAppNamespaceAsync(String appId, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteAppNamespaceValidateBeforeCall(appId, namespaceName, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findAppNamespace - * @param appId 应用ID (required) - * @param namespaceName 命名空间名称 (required) - * @param extendInfo (optional, default to false) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取AppNamespace -
- */ - public okhttp3.Call findAppNamespaceCall(String appId, String namespaceName, Boolean extendInfo, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (extendInfo != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("extendInfo", extendInfo)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findAppNamespaceValidateBeforeCall(String appId, String namespaceName, Boolean extendInfo, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling findAppNamespace(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling findAppNamespace(Async)"); - } - - return findAppNamespaceCall(appId, namespaceName, extendInfo, _callback); - - } - - /** - * 获取指定的AppNamespace (new added) - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * @param appId 应用ID (required) - * @param namespaceName 命名空间名称 (required) - * @param extendInfo (optional, default to false) - * @return OpenAppNamespaceDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取AppNamespace -
- */ - public OpenAppNamespaceDTO findAppNamespace(String appId, String namespaceName, Boolean extendInfo) throws ApiException { - ApiResponse localVarResp = findAppNamespaceWithHttpInfo(appId, namespaceName, extendInfo); - return localVarResp.getData(); - } - - /** - * 获取指定的AppNamespace (new added) - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * @param appId 应用ID (required) - * @param namespaceName 命名空间名称 (required) - * @param extendInfo (optional, default to false) - * @return ApiResponse<OpenAppNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取AppNamespace -
- */ - public ApiResponse findAppNamespaceWithHttpInfo(String appId, String namespaceName, Boolean extendInfo) throws ApiException { - okhttp3.Call localVarCall = findAppNamespaceValidateBeforeCall(appId, namespaceName, extendInfo, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取指定的AppNamespace (new added) (asynchronously) - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * @param appId 应用ID (required) - * @param namespaceName 命名空间名称 (required) - * @param extendInfo (optional, default to false) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取AppNamespace -
- */ - public okhttp3.Call findAppNamespaceAsync(String appId, String namespaceName, Boolean extendInfo, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findAppNamespaceValidateBeforeCall(appId, namespaceName, extendInfo, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findAppNamespaceUsage - * @param appId 应用ID (required) - * @param namespaceName 命名空间名称 (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 AppNamespaceUsage查询成功 -
- */ - public okhttp3.Call findAppNamespaceUsageCall(String appId, String namespaceName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findAppNamespaceUsageValidateBeforeCall(String appId, String namespaceName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling findAppNamespaceUsage(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling findAppNamespaceUsage(Async)"); - } - - return findAppNamespaceUsageCall(appId, namespaceName, _callback); - - } - - /** - * 查询appnamespace使用情况(new added) - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage - * @param appId 应用ID (required) - * @param namespaceName 命名空间名称 (required) - * @return List<OpenNamespaceUsageDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 AppNamespaceUsage查询成功 -
- */ - public List findAppNamespaceUsage(String appId, String namespaceName) throws ApiException { - ApiResponse> localVarResp = findAppNamespaceUsageWithHttpInfo(appId, namespaceName); - return localVarResp.getData(); - } - - /** - * 查询appnamespace使用情况(new added) - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage - * @param appId 应用ID (required) - * @param namespaceName 命名空间名称 (required) - * @return ApiResponse<List<OpenNamespaceUsageDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 AppNamespaceUsage查询成功 -
- */ - public ApiResponse> findAppNamespaceUsageWithHttpInfo(String appId, String namespaceName) throws ApiException { - okhttp3.Call localVarCall = findAppNamespaceUsageValidateBeforeCall(appId, namespaceName, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 查询appnamespace使用情况(new added) (asynchronously) - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage - * @param appId 应用ID (required) - * @param namespaceName 命名空间名称 (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 AppNamespaceUsage查询成功 -
- */ - public okhttp3.Call findAppNamespaceUsageAsync(String appId, String namespaceName, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = findAppNamespaceUsageValidateBeforeCall(appId, namespaceName, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getAppNamespaces - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getAppNamespacesCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/appnamespaces"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getAppNamespacesValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getAppNamespacesCall(_callback); - - } - - /** - * 获取所有公共AppNamespace (new added) - * GET /openapi/v1/appnamespaces/public - * @return List<OpenAppNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public List getAppNamespaces() throws ApiException { - ApiResponse> localVarResp = getAppNamespacesWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * 获取所有公共AppNamespace (new added) - * GET /openapi/v1/appnamespaces/public - * @return ApiResponse<List<OpenAppNamespaceDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse> getAppNamespacesWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getAppNamespacesValidateBeforeCall(null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取所有公共AppNamespace (new added) (asynchronously) - * GET /openapi/v1/appnamespaces/public - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getAppNamespacesAsync(final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = getAppNamespacesValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getAppNamespacesByAppId - * @param appId (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getAppNamespacesByAppIdCall(String appId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/appnamespaces" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getAppNamespacesByAppIdValidateBeforeCall(String appId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling getAppNamespacesByAppId(Async)"); - } - - return getAppNamespacesByAppIdCall(appId, _callback); - - } - - /** - * 获取指定应用的AppNamespace (new added) - * GET /openapi/v1/apps/{appId}/appnamespaces - * @param appId (required) - * @return List<OpenAppNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public List getAppNamespacesByAppId(String appId) throws ApiException { - ApiResponse> localVarResp = getAppNamespacesByAppIdWithHttpInfo(appId); - return localVarResp.getData(); - } - - /** - * 获取指定应用的AppNamespace (new added) - * GET /openapi/v1/apps/{appId}/appnamespaces - * @param appId (required) - * @return ApiResponse<List<OpenAppNamespaceDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse> getAppNamespacesByAppIdWithHttpInfo(String appId) throws ApiException { - okhttp3.Call localVarCall = getAppNamespacesByAppIdValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取指定应用的AppNamespace (new added) (asynchronously) - * GET /openapi/v1/apps/{appId}/appnamespaces - * @param appId (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getAppNamespacesByAppIdAsync(String appId, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = getAppNamespacesByAppIdValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getPublicAppNamespaceInstances - * @param env 环境标识 (required) - * @param publicNamespaceName 公共命名空间名称 (required) - * @param page 页码,从0开始 (required) - * @param size 每页数量 (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取实例列表 -
- */ - public okhttp3.Call getPublicAppNamespaceInstancesCall(String env, String publicNamespaceName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "publicNamespaceName" + "}", localVarApiClient.escapeString(publicNamespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (size != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getPublicAppNamespaceInstancesValidateBeforeCall(String env, String publicNamespaceName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling getPublicAppNamespaceInstances(Async)"); - } - - // verify the required parameter 'publicNamespaceName' is set - if (publicNamespaceName == null) { - throw new ApiException("Missing the required parameter 'publicNamespaceName' when calling getPublicAppNamespaceInstances(Async)"); - } - - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException("Missing the required parameter 'page' when calling getPublicAppNamespaceInstances(Async)"); - } - - // verify the required parameter 'size' is set - if (size == null) { - throw new ApiException("Missing the required parameter 'size' when calling getPublicAppNamespaceInstances(Async)"); - } - - return getPublicAppNamespaceInstancesCall(env, publicNamespaceName, page, size, _callback); - - } - - /** - * 获取公共AppNamespace的所有实例 (new added) - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * @param env 环境标识 (required) - * @param publicNamespaceName 公共命名空间名称 (required) - * @param page 页码,从0开始 (required) - * @param size 每页数量 (required) - * @return List<OpenNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取实例列表 -
- */ - public List getPublicAppNamespaceInstances(String env, String publicNamespaceName, Integer page, Integer size) throws ApiException { - ApiResponse> localVarResp = getPublicAppNamespaceInstancesWithHttpInfo(env, publicNamespaceName, page, size); - return localVarResp.getData(); - } - - /** - * 获取公共AppNamespace的所有实例 (new added) - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * @param env 环境标识 (required) - * @param publicNamespaceName 公共命名空间名称 (required) - * @param page 页码,从0开始 (required) - * @param size 每页数量 (required) - * @return ApiResponse<List<OpenNamespaceDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取实例列表 -
- */ - public ApiResponse> getPublicAppNamespaceInstancesWithHttpInfo(String env, String publicNamespaceName, Integer page, Integer size) throws ApiException { - okhttp3.Call localVarCall = getPublicAppNamespaceInstancesValidateBeforeCall(env, publicNamespaceName, page, size, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取公共AppNamespace的所有实例 (new added) (asynchronously) - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * @param env 环境标识 (required) - * @param publicNamespaceName 公共命名空间名称 (required) - * @param page 页码,从0开始 (required) - * @param size 每页数量 (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取实例列表 -
- */ - public okhttp3.Call getPublicAppNamespaceInstancesAsync(String env, String publicNamespaceName, Integer page, Integer size, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = getPublicAppNamespaceInstancesValidateBeforeCall(env, publicNamespaceName, page, size, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/api/ClusterManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/ClusterManagementApi.java deleted file mode 100644 index a2e0e5ea..00000000 --- a/java-client/src/main/java/org/openapitools/client/api/ClusterManagementApi.java +++ /dev/null @@ -1,533 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.ExceptionResponse; -import org.openapitools.client.model.OpenClusterDTO; - -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; - private int localHostIndex; - private String localCustomBaseUrl; - - public ClusterManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public ClusterManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for 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 - - - - - -
Status Code Description Response Headers
200 集群创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call createClusterCall(String appId, String env, OpenClusterDTO openClusterDTO, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = openClusterDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/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(); - 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 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 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 createCluster(Async)"); - } - - return createClusterCall(appId, env, openClusterDTO, _callback); - - } - - /** - * 创建集群 (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 - - - - - -
Status Code Description Response Headers
200 集群创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public OpenClusterDTO createCluster(String appId, String env, OpenClusterDTO openClusterDTO) throws ApiException { - ApiResponse localVarResp = createClusterWithHttpInfo(appId, env, openClusterDTO); - return localVarResp.getData(); - } - - /** - * 创建集群 (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 - - - - - -
Status Code Description Response Headers
200 集群创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - 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); - } - - /** - * 创建集群 (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 - - - - - -
Status Code Description Response Headers
200 集群创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call createClusterAsync(String appId, String env, OpenClusterDTO openClusterDTO, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createClusterValidateBeforeCall(appId, env, openClusterDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteCluster - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param operator 操作人用户名,openapi外部调用时需传入 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 集群删除成功 -
400 删除失败,集群可能包含配置 -
403 权限不足 -
404 集群不存在 -
- */ - 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[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - 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 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 deleteCluster(Async)"); - } - - // verify the required parameter 'appId' is set - if (appId == null) { - 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 deleteCluster(Async)"); - } - - 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) - * @param operator 操作人用户名,openapi外部调用时需传入 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 集群删除成功 -
400 删除失败,集群可能包含配置 -
403 权限不足 -
404 集群不存在 -
- */ - public void deleteCluster(String env, String appId, String clusterName, String operator) throws ApiException { - deleteClusterWithHttpInfo(env, appId, clusterName, operator); - } - - /** - * 删除集群 (new added) - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param operator 操作人用户名,openapi外部调用时需传入 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 集群删除成功 -
400 删除失败,集群可能包含配置 -
403 权限不足 -
404 集群不存在 -
- */ - public ApiResponse deleteClusterWithHttpInfo(String env, String appId, String clusterName, String operator) throws ApiException { - okhttp3.Call localVarCall = deleteClusterValidateBeforeCall(env, appId, clusterName, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 删除集群 (new added) (asynchronously) - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - * @param env (required) - * @param appId (required) - * @param clusterName (required) - * @param operator 操作人用户名,openapi外部调用时需传入 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 集群删除成功 -
400 删除失败,集群可能包含配置 -
403 权限不足 -
404 集群不存在 -
- */ - public okhttp3.Call deleteClusterAsync(String env, String appId, String clusterName, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteClusterValidateBeforeCall(env, appId, clusterName, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for getCluster - * @param appId (required) - * @param clusterName (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 - - - - -
Status Code Description Response Headers
200 成功获取集群信息 -
404 集群不存在 -
- */ - public okhttp3.Call getClusterCall(String appId, String clusterName, String env, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - 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 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 getCluster(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - 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 getCluster(Async)"); - } - - return getClusterCall(appId, clusterName, env, _callback); - - } - - /** - * 获取指定集群信息 (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - * @param appId (required) - * @param clusterName (required) - * @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 - - - - -
Status Code Description Response Headers
200 成功获取集群信息 -
404 集群不存在 -
- */ - public OpenClusterDTO getCluster(String appId, String clusterName, String env) throws ApiException { - ApiResponse localVarResp = getClusterWithHttpInfo(appId, clusterName, env); - return localVarResp.getData(); - } - - /** - * 获取指定集群信息 (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - * @param appId (required) - * @param clusterName (required) - * @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 - - - - -
Status Code Description Response Headers
200 成功获取集群信息 -
404 集群不存在 -
- */ - 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); - } - - /** - * 获取指定集群信息 (original openapi) (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - * @param appId (required) - * @param clusterName (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 - - - - -
Status Code Description Response Headers
200 成功获取集群信息 -
404 集群不存在 -
- */ - public okhttp3.Call getClusterAsync(String appId, String clusterName, String env, final ApiCallback _callback) throws ApiException { - - 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/EnvironmentManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/EnvironmentManagementApi.java deleted file mode 100644 index b5d54d44..00000000 --- a/java-client/src/main/java/org/openapitools/client/api/EnvironmentManagementApi.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - - -import 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 EnvironmentManagementApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public EnvironmentManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public EnvironmentManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for getEnvs - * @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 getEnvsCall(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"; - - 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 getEnvsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getEnvsCall(_callback); - - } - - /** - * 获取所有环境 - * GET /openapi/v1/envs - * @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 getEnvs() throws ApiException { - ApiResponse> localVarResp = getEnvsWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * 获取所有环境 - * GET /openapi/v1/envs - * @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> getEnvsWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getEnvsValidateBeforeCall(null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取所有环境 (asynchronously) - * GET /openapi/v1/envs - * @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 getEnvsAsync(final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = getEnvsValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/api/InstanceManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/InstanceManagementApi.java deleted file mode 100644 index cf6de433..00000000 --- a/java-client/src/main/java/org/openapitools/client/api/InstanceManagementApi.java +++ /dev/null @@ -1,762 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.OpenInstanceDTO; -import org.openapitools.client.model.OpenInstancePageDTO; - -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 InstanceManagementApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public InstanceManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public InstanceManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for getByNamespace - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param page 页数 (required) - * @param size 页大小 (required) - * @param instanceAppId Instance表中的AppID (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getByNamespaceCall(String env, String appId, String clusterName, String namespaceName, Integer page, Integer size, String instanceAppId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/instances/by-namespace" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (appId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("appId", appId)); - } - - if (clusterName != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("clusterName", clusterName)); - } - - if (namespaceName != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("namespaceName", namespaceName)); - } - - if (instanceAppId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("instanceAppId", instanceAppId)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (size != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getByNamespaceValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, Integer page, Integer size, String instanceAppId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling getByNamespace(Async)"); - } - - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling getByNamespace(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling getByNamespace(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling getByNamespace(Async)"); - } - - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException("Missing the required parameter 'page' when calling getByNamespace(Async)"); - } - - // verify the required parameter 'size' is set - if (size == null) { - throw new ApiException("Missing the required parameter 'size' when calling getByNamespace(Async)"); - } - - return getByNamespaceCall(env, appId, clusterName, namespaceName, page, size, instanceAppId, _callback); - - } - - /** - * 根据namespaceName查询实例(new added) - * - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param page 页数 (required) - * @param size 页大小 (required) - * @param instanceAppId Instance表中的AppID (optional) - * @return OpenInstancePageDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public OpenInstancePageDTO getByNamespace(String env, String appId, String clusterName, String namespaceName, Integer page, Integer size, String instanceAppId) throws ApiException { - ApiResponse localVarResp = getByNamespaceWithHttpInfo(env, appId, clusterName, namespaceName, page, size, instanceAppId); - return localVarResp.getData(); - } - - /** - * 根据namespaceName查询实例(new added) - * - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param page 页数 (required) - * @param size 页大小 (required) - * @param instanceAppId Instance表中的AppID (optional) - * @return ApiResponse<OpenInstancePageDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse getByNamespaceWithHttpInfo(String env, String appId, String clusterName, String namespaceName, Integer page, Integer size, String instanceAppId) throws ApiException { - okhttp3.Call localVarCall = getByNamespaceValidateBeforeCall(env, appId, clusterName, namespaceName, page, size, instanceAppId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 根据namespaceName查询实例(new added) (asynchronously) - * - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param page 页数 (required) - * @param size 页大小 (required) - * @param instanceAppId Instance表中的AppID (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getByNamespaceAsync(String env, String appId, String clusterName, String namespaceName, Integer page, Integer size, String instanceAppId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getByNamespaceValidateBeforeCall(env, appId, clusterName, namespaceName, page, size, instanceAppId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getByRelease - * @param env (required) - * @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 -
- */ - public okhttp3.Call getByReleaseCall(String env, Long releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/instances/by-release" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (releaseId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("releaseId", releaseId)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (size != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getByReleaseValidateBeforeCall(String env, Long releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling getByRelease(Async)"); - } - - // 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 'page' is set - if (page == null) { - throw new ApiException("Missing the required parameter 'page' when calling getByRelease(Async)"); - } - - // verify the required parameter 'size' is set - if (size == null) { - throw new ApiException("Missing the required parameter 'size' when calling getByRelease(Async)"); - } - - return getByReleaseCall(env, releaseId, page, size, _callback); - - } - - /** - * 根据发布版本查询实例(支持分页) (new added) - * GET /openapi/v1/envs/{env}/instances/by-release - * @param env (required) - * @param releaseId (required) - * @param page (required) - * @param size (required) - * @return OpenInstancePageDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public OpenInstancePageDTO getByRelease(String env, Long releaseId, Integer page, Integer size) throws ApiException { - ApiResponse localVarResp = getByReleaseWithHttpInfo(env, releaseId, page, size); - return localVarResp.getData(); - } - - /** - * 根据发布版本查询实例(支持分页) (new added) - * GET /openapi/v1/envs/{env}/instances/by-release - * @param env (required) - * @param releaseId (required) - * @param page (required) - * @param size (required) - * @return ApiResponse<OpenInstancePageDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse getByReleaseWithHttpInfo(String env, Long releaseId, Integer page, Integer size) throws ApiException { - okhttp3.Call localVarCall = getByReleaseValidateBeforeCall(env, releaseId, page, size, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 根据发布版本查询实例(支持分页) (new added) (asynchronously) - * GET /openapi/v1/envs/{env}/instances/by-release - * @param env (required) - * @param releaseId (required) - * @param page (required) - * @param size (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getByReleaseAsync(String env, Long releaseId, Integer page, Integer size, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getByReleaseValidateBeforeCall(env, releaseId, page, size, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getByReleasesAndNamespaceNotIn - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param releaseIds 排除的发布ID列表,用逗号分隔 (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getByReleasesAndNamespaceNotInCall(String env, String appId, String clusterName, String namespaceName, String releaseIds, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (appId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("appId", appId)); - } - - if (clusterName != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("clusterName", clusterName)); - } - - if (namespaceName != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("namespaceName", namespaceName)); - } - - if (releaseIds != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("releaseIds", releaseIds)); - } - - 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 getByReleasesAndNamespaceNotInValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, String releaseIds, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling getByReleasesAndNamespaceNotIn(Async)"); - } - - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling getByReleasesAndNamespaceNotIn(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling getByReleasesAndNamespaceNotIn(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling getByReleasesAndNamespaceNotIn(Async)"); - } - - // verify the required parameter 'releaseIds' is set - if (releaseIds == null) { - throw new ApiException("Missing the required parameter 'releaseIds' when calling getByReleasesAndNamespaceNotIn(Async)"); - } - - return getByReleasesAndNamespaceNotInCall(env, appId, clusterName, namespaceName, releaseIds, _callback); - - } - - /** - * 查询不在指定发布版本中的实例 (new added) - * - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param releaseIds 排除的发布ID列表,用逗号分隔 (required) - * @return List<OpenInstanceDTO> - * @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 getByReleasesAndNamespaceNotIn(String env, String appId, String clusterName, String namespaceName, String releaseIds) throws ApiException { - ApiResponse> localVarResp = getByReleasesAndNamespaceNotInWithHttpInfo(env, appId, clusterName, namespaceName, releaseIds); - return localVarResp.getData(); - } - - /** - * 查询不在指定发布版本中的实例 (new added) - * - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param releaseIds 排除的发布ID列表,用逗号分隔 (required) - * @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 - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse> getByReleasesAndNamespaceNotInWithHttpInfo(String env, String appId, String clusterName, String namespaceName, String releaseIds) throws ApiException { - okhttp3.Call localVarCall = getByReleasesAndNamespaceNotInValidateBeforeCall(env, appId, clusterName, namespaceName, releaseIds, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 查询不在指定发布版本中的实例 (new added) (asynchronously) - * - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param releaseIds 排除的发布ID列表,用逗号分隔 (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getByReleasesAndNamespaceNotInAsync(String env, String appId, String clusterName, String namespaceName, String releaseIds, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = getByReleasesAndNamespaceNotInValidateBeforeCall(env, appId, clusterName, namespaceName, releaseIds, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * 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 - - - -
Status Code Description Response Headers
200 成功返回实例数量 -
- */ - 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[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - 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 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 getInstanceCountByNamespace(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 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling getInstanceCountByNamespace(Async)"); - } - - return getInstanceCountByNamespaceCall(env, appId, clusterName, namespaceName, _callback); - - } - - /** - * 获取命名空间下的实例数量 (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 - - - -
Status Code Description Response Headers
200 成功返回实例数量 -
- */ - public Integer getInstanceCountByNamespace(String env, String appId, String clusterName, String namespaceName) throws ApiException { - ApiResponse localVarResp = getInstanceCountByNamespaceWithHttpInfo(env, appId, clusterName, namespaceName); - return localVarResp.getData(); - } - - /** - * 获取命名空间下的实例数量 (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 - - - -
Status Code Description Response Headers
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(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取命名空间下的实例数量 (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 - - - -
Status Code Description Response Headers
200 成功返回实例数量 -
- */ - public okhttp3.Call getInstanceCountByNamespaceAsync(String env, String appId, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { - - 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/api/ItemManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/ItemManagementApi.java deleted file mode 100644 index cd9e351d..00000000 --- a/java-client/src/main/java/org/openapitools/client/api/ItemManagementApi.java +++ /dev/null @@ -1,2521 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.ExceptionResponse; -import org.openapitools.client.model.OpenItemDTO; -import org.openapitools.client.model.OpenItemDiffDTO; -import org.openapitools.client.model.OpenItemPageDTO; -import org.openapitools.client.model.OpenNamespaceSyncDTO; -import org.openapitools.client.model.OpenNamespaceTextModel; - -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; - private int localHostIndex; - private String localCustomBaseUrl; - - public ItemManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public ItemManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for batchUpdateItemsByText - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceTextModel (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 批量更新配置项成功 -
403 权限不足 -
- */ - public okhttp3.Call batchUpdateItemsByTextCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, String operator, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = openNamespaceTextModel; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call batchUpdateItemsByTextValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, String operator, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling batchUpdateItemsByText(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - 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 batchUpdateItemsByText(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling batchUpdateItemsByText(Async)"); - } - - // verify the required parameter 'openNamespaceTextModel' is set - if (openNamespaceTextModel == null) { - throw new ApiException("Missing the required parameter 'openNamespaceTextModel' when calling batchUpdateItemsByText(Async)"); - } - - return batchUpdateItemsByTextCall(appId, env, clusterName, namespaceName, openNamespaceTextModel, operator, _callback); - - } - - /** - * 通过文本批量修改配置项 (new added) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceTextModel (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 批量更新配置项成功 -
403 权限不足 -
- */ - public void batchUpdateItemsByText(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, String operator) throws ApiException { - batchUpdateItemsByTextWithHttpInfo(appId, env, clusterName, namespaceName, openNamespaceTextModel, operator); - } - - /** - * 通过文本批量修改配置项 (new added) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceTextModel (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 批量更新配置项成功 -
403 权限不足 -
- */ - public ApiResponse batchUpdateItemsByTextWithHttpInfo(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, String operator) throws ApiException { - okhttp3.Call localVarCall = batchUpdateItemsByTextValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceTextModel, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 通过文本批量修改配置项 (new added) (asynchronously) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceTextModel (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 批量更新配置项成功 -
403 权限不足 -
- */ - public okhttp3.Call batchUpdateItemsByTextAsync(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = batchUpdateItemsByTextValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceTextModel, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for compareItems - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param openNamespaceSyncDTO (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功对比命名空间配置差异 -
- */ - public okhttp3.Call compareItemsCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncDTO openNamespaceSyncDTO, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = openNamespaceSyncDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call compareItemsValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncDTO openNamespaceSyncDTO, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling compareItems(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - 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 compareItems(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling compareItems(Async)"); - } - - // verify the required parameter 'openNamespaceSyncDTO' is set - if (openNamespaceSyncDTO == null) { - throw new ApiException("Missing the required parameter 'openNamespaceSyncDTO' when calling compareItems(Async)"); - } - - return compareItemsCall(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, _callback); - - } - - /** - * 对比命名空间配置差异 (new added) - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param openNamespaceSyncDTO (required) - * @return List<OpenItemDiffDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功对比命名空间配置差异 -
- */ - public List compareItems(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncDTO openNamespaceSyncDTO) throws ApiException { - ApiResponse> localVarResp = compareItemsWithHttpInfo(appId, env, clusterName, namespaceName, openNamespaceSyncDTO); - return localVarResp.getData(); - } - - /** - * 对比命名空间配置差异 (new added) - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param openNamespaceSyncDTO (required) - * @return ApiResponse<List<OpenItemDiffDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功对比命名空间配置差异 -
- */ - public ApiResponse> compareItemsWithHttpInfo(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncDTO openNamespaceSyncDTO) throws ApiException { - okhttp3.Call localVarCall = compareItemsValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 对比命名空间配置差异 (new added) (asynchronously) - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param openNamespaceSyncDTO (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功对比命名空间配置差异 -
- */ - public okhttp3.Call compareItemsAsync(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncDTO openNamespaceSyncDTO, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = compareItemsValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createItem - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param openItemDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 配置项创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call createItemCall(String appId, String env, String clusterName, String namespaceName, OpenItemDTO openItemDTO, String operator, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = openItemDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createItemValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, OpenItemDTO openItemDTO, String operator, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling createItem(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - 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 createItem(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling createItem(Async)"); - } - - // verify the required parameter 'openItemDTO' is set - if (openItemDTO == null) { - throw new ApiException("Missing the required parameter 'openItemDTO' when calling createItem(Async)"); - } - - return createItemCall(appId, env, clusterName, namespaceName, openItemDTO, operator, _callback); - - } - - /** - * 创建新的配置项 (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 openItemDTO (required) - * @param operator 操作人用户名 (optional) - * @return OpenItemDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 配置项创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public OpenItemDTO createItem(String appId, String env, String clusterName, String namespaceName, OpenItemDTO openItemDTO, String operator) throws ApiException { - ApiResponse localVarResp = createItemWithHttpInfo(appId, env, clusterName, namespaceName, openItemDTO, operator); - return localVarResp.getData(); - } - - /** - * 创建新的配置项 (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 openItemDTO (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<OpenItemDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 配置项创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public ApiResponse createItemWithHttpInfo(String appId, String env, String clusterName, String namespaceName, OpenItemDTO openItemDTO, String operator) throws ApiException { - okhttp3.Call localVarCall = createItemValidateBeforeCall(appId, env, clusterName, namespaceName, openItemDTO, operator, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 创建新的配置项 (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 openItemDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 配置项创建成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call createItemAsync(String appId, String env, String clusterName, String namespaceName, OpenItemDTO openItemDTO, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createItemValidateBeforeCall(appId, env, clusterName, namespaceName, openItemDTO, operator, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteItem - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param key 配置项键名 (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 配置项删除成功 -
- */ - 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[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - }; - 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 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 deleteItem(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - 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 deleteItem(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - 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)"); - } - - return deleteItemCall(appId, env, clusterName, namespaceName, key, operator, _callback); - - } - - /** - * 删除配置项 (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 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 配置项删除成功 -
- */ - public void deleteItem(String appId, String env, String clusterName, String namespaceName, String key, String operator) throws ApiException { - deleteItemWithHttpInfo(appId, env, clusterName, namespaceName, key, operator); - } - - /** - * 删除配置项 (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 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 配置项删除成功 -
- */ - 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); - return localVarApiClient.execute(localVarCall); - } - - /** - * 删除配置项 (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 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 配置项删除成功 -
- */ - public okhttp3.Call deleteItemAsync(String appId, String env, String clusterName, String namespaceName, String key, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteItemValidateBeforeCall(appId, env, clusterName, namespaceName, key, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for deleteItemByEncodedKey - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (required) - * @param operator (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - 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[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - }; - 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 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 deleteItemByEncodedKey(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - 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 deleteItemByEncodedKey(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - 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 'operator' is set - if (operator == null) { - throw new ApiException("Missing the required parameter 'operator' when calling deleteItemByEncodedKey(Async)"); - } - - return deleteItemByEncodedKeyCall(appId, env, clusterName, namespaceName, key, operator, _callback); - - } - - /** - * 通过编码的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 key (required) - * @param operator (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public void deleteItemByEncodedKey(String appId, String env, String clusterName, String namespaceName, String key, String operator) throws ApiException { - deleteItemByEncodedKeyWithHttpInfo(appId, env, clusterName, namespaceName, key, operator); - } - - /** - * 通过编码的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 key (required) - * @param operator (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - 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); - return localVarApiClient.execute(localVarCall); - } - - /** - * 通过编码的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 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 - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call deleteItemByEncodedKeyAsync(String appId, String env, String clusterName, String namespaceName, String key, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteItemByEncodedKeyValidateBeforeCall(appId, env, clusterName, namespaceName, key, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findBranchItems - * @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 - - - - -
Status Code Description Response Headers
200 成功获取分支下的配置项列表 -
404 分支不存在 -
- */ - public okhttp3.Call findBranchItemsCall(String appId, String env, String clusterName, String namespaceName, String branchName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // 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 findBranchItemsValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String branchName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling findBranchItems(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling findBranchItems(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling findBranchItems(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling findBranchItems(Async)"); - } - - // verify the required parameter 'branchName' is set - if (branchName == null) { - throw new ApiException("Missing the required parameter 'branchName' when calling findBranchItems(Async)"); - } - - return findBranchItemsCall(appId, env, clusterName, namespaceName, branchName, _callback); - - } - - /** - * 获取分支下的配置项 (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 - - - - -
Status Code Description Response Headers
200 成功获取分支下的配置项列表 -
404 分支不存在 -
- */ - public List findBranchItems(String appId, String env, String clusterName, String namespaceName, String branchName) throws ApiException { - ApiResponse> localVarResp = findBranchItemsWithHttpInfo(appId, env, clusterName, namespaceName, branchName); - return localVarResp.getData(); - } - - /** - * 获取分支下的配置项 (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 - - - - -
Status Code Description Response Headers
200 成功获取分支下的配置项列表 -
404 分支不存在 -
- */ - public ApiResponse> findBranchItemsWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String branchName) throws ApiException { - okhttp3.Call localVarCall = findBranchItemsValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取分支下的配置项 (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 - - - - -
Status Code Description Response Headers
200 成功获取分支下的配置项列表 -
404 分支不存在 -
- */ - public okhttp3.Call findBranchItemsAsync(String appId, String env, String clusterName, String namespaceName, String branchName, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = findBranchItemsValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for 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 - - - - -
Status Code Description Response Headers
200 成功获取配置项列表 -
404 命名空间不存在 -
- */ - 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[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (size != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call 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 findItemsByNamespace(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - 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 findItemsByNamespace(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling findItemsByNamespace(Async)"); - } - - // verify the required parameter 'page' is set - if (page == null) { - throw new ApiException("Missing the required parameter 'page' when calling findItemsByNamespace(Async)"); - } - - // verify the required parameter 'size' is set - if (size == null) { - throw new ApiException("Missing the required parameter 'size' when calling findItemsByNamespace(Async)"); - } - - return findItemsByNamespaceCall(appId, env, clusterName, namespaceName, page, size, _callback); - - } - - /** - * 获取命名空间下的配置项列表 (original openapi) - * 获取指定命名空间的配置项列表,支持分页 - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param page 页码,从0开始 (required) - * @param size 每页数量 (required) - * @return OpenItemPageDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 成功获取配置项列表 -
404 命名空间不存在 -
- */ - public OpenItemPageDTO findItemsByNamespace(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size) throws ApiException { - ApiResponse localVarResp = findItemsByNamespaceWithHttpInfo(appId, env, clusterName, namespaceName, page, size); - return localVarResp.getData(); - } - - /** - * 获取命名空间下的配置项列表 (original openapi) - * 获取指定命名空间的配置项列表,支持分页 - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param page 页码,从0开始 (required) - * @param size 每页数量 (required) - * @return ApiResponse<OpenItemPageDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 成功获取配置项列表 -
404 命名空间不存在 -
- */ - 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); - } - - /** - * 获取命名空间下的配置项列表 (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 - - - - -
Status Code Description Response Headers
200 成功获取配置项列表 -
404 命名空间不存在 -
- */ - public okhttp3.Call findItemsByNamespaceAsync(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findItemsByNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * 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 - - - - -
Status Code Description Response Headers
200 成功获取配置项 -
404 配置项不存在 -
- */ - 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[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call 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 getItem(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - 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 getItem(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - 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 getItem(Async)"); - } - - return getItemCall(appId, env, clusterName, namespaceName, key, _callback); - - } - - /** - * 获取单个配置项 (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 - - - - -
Status Code Description Response Headers
200 成功获取配置项 -
404 配置项不存在 -
- */ - 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(); - } - - /** - * 获取单个配置项 (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 - - - - -
Status Code Description Response Headers
200 成功获取配置项 -
404 配置项不存在 -
- */ - 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); - } - - /** - * 获取单个配置项 (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 - - - - -
Status Code Description Response Headers
200 成功获取配置项 -
404 配置项不存在 -
- */ - public okhttp3.Call getItemAsync(String appId, String env, String clusterName, String namespaceName, String key, final ApiCallback _callback) throws ApiException { - - 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 getItemByEncodedKey - * @param appId (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 - - - - -
Status Code Description Response Headers
200 成功获取配置项(支持编码key) -
404 配置项不存在 -
- */ - 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[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call 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 getItemByEncodedKey(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - 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 getItemByEncodedKey(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - 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 getItemByEncodedKey(Async)"); - } - - return getItemByEncodedKeyCall(appId, env, clusterName, namespaceName, key, _callback); - - } - - /** - * 通过查询参数获取配置项(支持编码的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 OpenItemDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 成功获取配置项(支持编码key) -
404 配置项不存在 -
- */ - 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(); - } - - /** - * 通过查询参数获取配置项(支持编码的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 ApiResponse<OpenItemDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 成功获取配置项(支持编码key) -
404 配置项不存在 -
- */ - 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); - } - - /** - * 通过查询参数获取配置项(支持编码的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 配置项键名(需要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 - - - - -
Status Code Description Response Headers
200 成功获取配置项(支持编码key) -
404 配置项不存在 -
- */ - public okhttp3.Call getItemByEncodedKeyAsync(String appId, String env, String clusterName, String namespaceName, String key, final ApiCallback _callback) throws ApiException { - - 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 revertItems - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 配置项更改撤销成功 -
400 请求参数错误 -
403 权限不足 -
- */ - 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[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call 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 revertItems(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - 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 revertItems(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling revertItems(Async)"); - } - - return revertItemsCall(appId, env, clusterName, namespaceName, operator, _callback); - - } - - /** - * 撤销配置项更改 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 配置项更改撤销成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public void revertItems(String appId, String env, String clusterName, String namespaceName, String operator) throws ApiException { - revertItemsWithHttpInfo(appId, env, clusterName, namespaceName, operator); - } - - /** - * 撤销配置项更改 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 配置项更改撤销成功 -
400 请求参数错误 -
403 权限不足 -
- */ - 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); - return localVarApiClient.execute(localVarCall); - } - - /** - * 撤销配置项更改 (new added) (asynchronously) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 配置项更改撤销成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call revertItemsAsync(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = revertItemsValidateBeforeCall(appId, env, clusterName, namespaceName, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for syncItems - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceSyncDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 配置项同步成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call syncItemsCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncDTO openNamespaceSyncDTO, String operator, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = openNamespaceSyncDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .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 = { - "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 syncItemsValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncDTO openNamespaceSyncDTO, String operator, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling syncItems(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - 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 syncItems(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling syncItems(Async)"); - } - - // verify the required parameter 'openNamespaceSyncDTO' is set - if (openNamespaceSyncDTO == null) { - throw new ApiException("Missing the required parameter 'openNamespaceSyncDTO' when calling syncItems(Async)"); - } - - return syncItemsCall(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, operator, _callback); - - } - - /** - * 同步配置项到多个命名空间 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceSyncDTO (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 配置项同步成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public void syncItems(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncDTO openNamespaceSyncDTO, String operator) throws ApiException { - syncItemsWithHttpInfo(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, operator); - } - - /** - * 同步配置项到多个命名空间 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceSyncDTO (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 配置项同步成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public ApiResponse syncItemsWithHttpInfo(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncDTO openNamespaceSyncDTO, String operator) throws ApiException { - okhttp3.Call localVarCall = syncItemsValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 同步配置项到多个命名空间 (new added) (asynchronously) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceSyncDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 配置项同步成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call syncItemsAsync(String appId, String env, String clusterName, String namespaceName, OpenNamespaceSyncDTO openNamespaceSyncDTO, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = syncItemsValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for syntaxCheck - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceTextModel (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 配置文本语法验证通过 -
400 配置文本语法错误 -
- */ - public okhttp3.Call syntaxCheckCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = openNamespaceTextModel; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - 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 syntaxCheckValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling syntaxCheck(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling syntaxCheck(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling syntaxCheck(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling syntaxCheck(Async)"); - } - - // verify the required parameter 'openNamespaceTextModel' is set - if (openNamespaceTextModel == null) { - throw new ApiException("Missing the required parameter 'openNamespaceTextModel' when calling syntaxCheck(Async)"); - } - - return syntaxCheckCall(appId, env, clusterName, namespaceName, openNamespaceTextModel, _callback); - - } - - /** - * 验证配置文本语法 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceTextModel (required) - * @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 配置文本语法错误 -
- */ - public void syntaxCheck(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel) throws ApiException { - syntaxCheckWithHttpInfo(appId, env, clusterName, namespaceName, openNamespaceTextModel); - } - - /** - * 验证配置文本语法 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceTextModel (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 配置文本语法验证通过 -
400 配置文本语法错误 -
- */ - public ApiResponse syntaxCheckWithHttpInfo(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel) throws ApiException { - okhttp3.Call localVarCall = syntaxCheckValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceTextModel, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 验证配置文本语法 (new added) (asynchronously) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceTextModel (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 配置文本语法验证通过 -
400 配置文本语法错误 -
- */ - public okhttp3.Call syntaxCheckAsync(String appId, String env, String clusterName, String namespaceName, OpenNamespaceTextModel openNamespaceTextModel, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = syntaxCheckValidateBeforeCall(appId, env, clusterName, namespaceName, openNamespaceTextModel, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for updateItem - * @param appId (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
- */ - public okhttp3.Call updateItemCall(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, String operator, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = openItemDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "key" + "}", localVarApiClient.escapeString(key.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (createIfNotExists != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("createIfNotExists", createIfNotExists)); - } - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call updateItemValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, 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 updateItem(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - 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 updateItem(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling updateItem(Async)"); - } - - // verify the required parameter 'key' is set - if (key == null) { - throw new ApiException("Missing the required parameter 'key' when calling updateItem(Async)"); - } - - // 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, operator, _callback); - - } - - /** - * 更新配置项 (original openapi) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * @param appId (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
- */ - public void updateItem(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, String operator) throws ApiException { - updateItemWithHttpInfo(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator); - } - - /** - * 更新配置项 (original openapi) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * @param appId (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
- */ - public ApiResponse updateItemWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, String operator) throws ApiException { - okhttp3.Call localVarCall = updateItemValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 更新配置项 (original openapi) (asynchronously) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * @param appId (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param key (required) - * @param createIfNotExists (required) - * @param openItemDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 配置项更新成功 -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
- */ - public okhttp3.Call updateItemAsync(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateItemValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _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 operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 配置项更新成功(编码key) -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
- */ - public okhttp3.Call updateItemByEncodedKeyCall(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, String operator, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // 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)); - } - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "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, String operator, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling updateItemByEncodedKey(Async)"); - } - - // 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, operator, _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) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 配置项更新成功(编码key) -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
- */ - public void updateItemByEncodedKey(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, String operator) throws ApiException { - updateItemByEncodedKeyWithHttpInfo(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator); - } - - /** - * 通过编码的key更新配置项 (original openapi) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param key 配置项键名(需要URL编码) (required) - * @param createIfNotExists 若不存在则创建(true/false) (required) - * @param openItemDTO (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 配置项更新成功(编码key) -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
- */ - public ApiResponse updateItemByEncodedKeyWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, String operator) throws ApiException { - okhttp3.Call localVarCall = updateItemByEncodedKeyValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 通过编码的key更新配置项 (original openapi) (asynchronously) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param key 配置项键名(需要URL编码) (required) - * @param createIfNotExists 若不存在则创建(true/false) (required) - * @param openItemDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 配置项更新成功(编码key) -
400 请求参数错误 -
403 权限不足 -
404 配置项不存在 -
- */ - public okhttp3.Call updateItemByEncodedKeyAsync(String appId, String env, String clusterName, String namespaceName, String key, Boolean createIfNotExists, OpenItemDTO openItemDTO, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateItemByEncodedKeyValidateBeforeCall(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/api/NamespaceBranchManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/NamespaceBranchManagementApi.java deleted file mode 100644 index 68918559..00000000 --- a/java-client/src/main/java/org/openapitools/client/api/NamespaceBranchManagementApi.java +++ /dev/null @@ -1,1298 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.ExceptionResponse; -import org.openapitools.client.model.NamespaceReleaseDTO; -import org.openapitools.client.model.OpenGrayReleaseRuleDTO; -import org.openapitools.client.model.OpenNamespaceDTO; -import org.openapitools.client.model.OpenReleaseDTO; - -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; - private int localHostIndex; - private String localCustomBaseUrl; - - public NamespaceBranchManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public NamespaceBranchManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createBranch - * @param appId app标识 (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 命名空间分支创建成功 -
- */ - 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[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call 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 createBranch(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - 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 createBranch(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling createBranch(Async)"); - } - - return createBranchCall(appId, env, clusterName, namespaceName, operator, _callback); - - } - - /** - * 创建命名空间分支 (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 操作人用户名 (optional) - * @return OpenNamespaceDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 命名空间分支创建成功 -
- */ - public OpenNamespaceDTO createBranch(String appId, String env, String clusterName, String namespaceName, String operator) throws ApiException { - ApiResponse localVarResp = createBranchWithHttpInfo(appId, env, clusterName, namespaceName, operator); - return localVarResp.getData(); - } - - /** - * 创建命名空间分支 (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 操作人用户名 (optional) - * @return ApiResponse<OpenNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 命名空间分支创建成功 -
- */ - 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); - } - - /** - * 创建命名空间分支 (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 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 命名空间分支创建成功 -
- */ - public okhttp3.Call createBranchAsync(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { - - 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 deleteBranch - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 分支删除成功 -
- */ - 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[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - }; - 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 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 deleteBranch(Async)"); - } - - // verify the required parameter 'appId' is set - if (appId == null) { - 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 deleteBranch(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - 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 deleteBranch(Async)"); - } - - 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 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 分支删除成功 -
- */ - public void deleteBranch(String env, String appId, String clusterName, String namespaceName, String branchName, String operator) throws ApiException { - deleteBranchWithHttpInfo(env, appId, clusterName, namespaceName, branchName, operator); - } - - /** - * 删除命名空间分支 (original openapi) - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 分支删除成功 -
- */ - 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); - return localVarApiClient.execute(localVarCall); - } - - /** - * 删除命名空间分支 (original openapi) (asynchronously) - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 分支删除成功 -
- */ - public okhttp3.Call deleteBranchAsync(String env, String appId, String clusterName, String namespaceName, String branchName, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteBranchValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findBranch - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param extendInfo (optional, default to false) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 成功获取分支信息 -
404 分支不存在 -
- */ - public okhttp3.Call findBranchCall(String appId, String env, String clusterName, String namespaceName, Boolean extendInfo, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (extendInfo != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("extendInfo", extendInfo)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findBranchValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, Boolean extendInfo, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling findBranch(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - 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 findBranch(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling findBranch(Async)"); - } - - return findBranchCall(appId, env, clusterName, namespaceName, extendInfo, _callback); - - } - - /** - * 获取命名空间分支信息 (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) - * @param extendInfo (optional, default to false) - * @return OpenNamespaceDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 成功获取分支信息 -
404 分支不存在 -
- */ - public OpenNamespaceDTO findBranch(String appId, String env, String clusterName, String namespaceName, Boolean extendInfo) throws ApiException { - ApiResponse localVarResp = findBranchWithHttpInfo(appId, env, clusterName, namespaceName, extendInfo); - return localVarResp.getData(); - } - - /** - * 获取命名空间分支信息 (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) - * @param extendInfo (optional, default to false) - * @return ApiResponse<OpenNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - -
Status Code Description Response Headers
200 成功获取分支信息 -
404 分支不存在 -
- */ - public ApiResponse findBranchWithHttpInfo(String appId, String env, String clusterName, String namespaceName, Boolean extendInfo) throws ApiException { - okhttp3.Call localVarCall = findBranchValidateBeforeCall(appId, env, clusterName, namespaceName, extendInfo, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取命名空间分支信息 (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 extendInfo (optional, default to false) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - -
Status Code Description Response Headers
200 成功获取分支信息 -
404 分支不存在 -
- */ - public okhttp3.Call findBranchAsync(String appId, String env, String clusterName, String namespaceName, Boolean extendInfo, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findBranchValidateBeforeCall(appId, env, clusterName, namespaceName, extendInfo, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * 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 - - - -
Status Code Description Response Headers
200 成功获取灰度发布规则 -
- */ - 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[] { }; - - // 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}/rules" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call 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 getBranchGrayRules(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - 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 getBranchGrayRules(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - 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 getBranchGrayRules(Async)"); - } - - return getBranchGrayRulesCall(appId, env, clusterName, namespaceName, branchName, _callback); - - } - - /** - * 获取分支灰度发布规则 (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 - - - -
Status Code Description Response Headers
200 成功获取灰度发布规则 -
- */ - 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(); - } - - /** - * 获取分支灰度发布规则 (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 - - - -
Status Code Description Response Headers
200 成功获取灰度发布规则 -
- */ - 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); - } - - /** - * 获取分支灰度发布规则 (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 - - - -
Status Code Description Response Headers
200 成功获取灰度发布规则 -
- */ - public okhttp3.Call getBranchGrayRulesAsync(String appId, String env, String clusterName, String namespaceName, String branchName, final ApiCallback _callback) throws ApiException { - - 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 merge - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param deleteBranch 合并后是否删除分支(true/false) (required) - * @param namespaceReleaseDTO (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
- */ - public okhttp3.Call mergeCall(String appId, String env, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = namespaceReleaseDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (deleteBranch != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("deleteBranch", deleteBranch)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call mergeValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling merge(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling merge(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling merge(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling merge(Async)"); - } - - // verify the required parameter 'branchName' is set - if (branchName == null) { - throw new ApiException("Missing the required parameter 'branchName' when calling merge(Async)"); - } - - // verify the required parameter 'deleteBranch' is set - if (deleteBranch == null) { - throw new ApiException("Missing the required parameter 'deleteBranch' when calling merge(Async)"); - } - - // verify the required parameter 'namespaceReleaseDTO' is set - if (namespaceReleaseDTO == null) { - throw new ApiException("Missing the required parameter 'namespaceReleaseDTO' when calling merge(Async)"); - } - - return mergeCall(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, _callback); - - } - - /** - * 合并分支 (original openapi) - * 合并灰度分支并可选择删除分支 - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param deleteBranch 合并后是否删除分支(true/false) (required) - * @param namespaceReleaseDTO (required) - * @return OpenReleaseDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
- */ - public OpenReleaseDTO merge(String appId, String env, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - ApiResponse localVarResp = mergeWithHttpInfo(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); - return localVarResp.getData(); - } - - /** - * 合并分支 (original openapi) - * 合并灰度分支并可选择删除分支 - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param deleteBranch 合并后是否删除分支(true/false) (required) - * @param namespaceReleaseDTO (required) - * @return ApiResponse<OpenReleaseDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
- */ - public ApiResponse mergeWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO) throws ApiException { - okhttp3.Call localVarCall = mergeValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 合并分支 (original openapi) (asynchronously) - * 合并灰度分支并可选择删除分支 - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param deleteBranch 合并后是否删除分支(true/false) (required) - * @param namespaceReleaseDTO (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 分支合并成功 -
400 合并参数错误 -
403 权限不足 -
- */ - public okhttp3.Call mergeAsync(String appId, String env, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = mergeValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for mergeBranch - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param deleteBranch 合并后是否删除分支(true/false) (required) - * @param namespaceReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 分支合并成功 -
- */ - public okhttp3.Call mergeBranchCall(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO, String operator, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = namespaceReleaseDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (deleteBranch != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("deleteBranch", deleteBranch)); - } - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call mergeBranchValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO, String operator, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling mergeBranch(Async)"); - } - - // verify the required parameter 'appId' is set - if (appId == null) { - 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 mergeBranch(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - 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 mergeBranch(Async)"); - } - - // verify the required parameter 'deleteBranch' is set - if (deleteBranch == null) { - throw new ApiException("Missing the required parameter 'deleteBranch' when calling mergeBranch(Async)"); - } - - // verify the required parameter 'namespaceReleaseDTO' is set - if (namespaceReleaseDTO == null) { - throw new ApiException("Missing the required parameter 'namespaceReleaseDTO' when calling mergeBranch(Async)"); - } - - return mergeBranchCall(env, appId, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, operator, _callback); - - } - - /** - * 合并分支到主分支 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param deleteBranch 合并后是否删除分支(true/false) (required) - * @param namespaceReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @return OpenReleaseDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 分支合并成功 -
- */ - public OpenReleaseDTO mergeBranch(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO, String operator) throws ApiException { - ApiResponse localVarResp = mergeBranchWithHttpInfo(env, appId, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, operator); - return localVarResp.getData(); - } - - /** - * 合并分支到主分支 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param deleteBranch 合并后是否删除分支(true/false) (required) - * @param namespaceReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<OpenReleaseDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 分支合并成功 -
- */ - public ApiResponse mergeBranchWithHttpInfo(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO, String operator) throws ApiException { - okhttp3.Call localVarCall = mergeBranchValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, operator, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 合并分支到主分支 (new added) (asynchronously) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param deleteBranch 合并后是否删除分支(true/false) (required) - * @param namespaceReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 分支合并成功 -
- */ - public okhttp3.Call mergeBranchAsync(String env, String appId, String clusterName, String namespaceName, String branchName, Boolean deleteBranch, NamespaceReleaseDTO namespaceReleaseDTO, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = mergeBranchValidateBeforeCall(env, appId, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, operator, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for updateBranchRules - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param openGrayReleaseRuleDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 灰度规则更新成功 -
- */ - public okhttp3.Call updateBranchRulesCall(String appId, String env, String clusterName, String namespaceName, String branchName, OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO, 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 = openGrayReleaseRuleDTO; - - // create path and map variables - 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())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - }; - 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 updateBranchRulesValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String branchName, OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO, 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 updateBranchRules(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - 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 updateBranchRules(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - 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 updateBranchRules(Async)"); - } - - // 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, openGrayReleaseRuleDTO, operator, _callback); - - } - - /** - * 更新分支灰度发布规则 (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 openGrayReleaseRuleDTO (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 灰度规则更新成功 -
- */ - public void updateBranchRules(String appId, String env, String clusterName, String namespaceName, String branchName, OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO, String operator) throws ApiException { - updateBranchRulesWithHttpInfo(appId, env, clusterName, namespaceName, branchName, openGrayReleaseRuleDTO, operator); - } - - /** - * 更新分支灰度发布规则 (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 openGrayReleaseRuleDTO (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 灰度规则更新成功 -
- */ - public ApiResponse updateBranchRulesWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String branchName, OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO, String operator) throws ApiException { - okhttp3.Call localVarCall = updateBranchRulesValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, openGrayReleaseRuleDTO, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 更新分支灰度发布规则 (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 openGrayReleaseRuleDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 灰度规则更新成功 -
- */ - public okhttp3.Call updateBranchRulesAsync(String appId, String env, String clusterName, String namespaceName, String branchName, OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = updateBranchRulesValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, openGrayReleaseRuleDTO, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/api/NamespaceLockManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/NamespaceLockManagementApi.java deleted file mode 100644 index a433e17a..00000000 --- a/java-client/src/main/java/org/openapitools/client/api/NamespaceLockManagementApi.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.OpenNamespaceLockDTO; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.ws.rs.core.GenericType; - -public class NamespaceLockManagementApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public NamespaceLockManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public NamespaceLockManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for getNamespaceLock - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getNamespaceLockCall(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getNamespaceLockValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling getNamespaceLock(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling getNamespaceLock(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling getNamespaceLock(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling getNamespaceLock(Async)"); - } - - return getNamespaceLockCall(appId, env, clusterName, namespaceName, _callback); - - } - - /** - * 获取Namespace的锁状态 (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return OpenNamespaceLockDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public OpenNamespaceLockDTO getNamespaceLock(String appId, String env, String clusterName, String namespaceName) throws ApiException { - ApiResponse localVarResp = getNamespaceLockWithHttpInfo(appId, env, clusterName, namespaceName); - return localVarResp.getData(); - } - - /** - * 获取Namespace的锁状态 (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return ApiResponse<OpenNamespaceLockDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse getNamespaceLockWithHttpInfo(String appId, String env, String clusterName, String namespaceName) throws ApiException { - okhttp3.Call localVarCall = getNamespaceLockValidateBeforeCall(appId, env, clusterName, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取Namespace的锁状态 (original openapi) (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getNamespaceLockAsync(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getNamespaceLockValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/api/NamespaceManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/NamespaceManagementApi.java deleted file mode 100644 index e3a85c51..00000000 --- a/java-client/src/main/java/org/openapitools/client/api/NamespaceManagementApi.java +++ /dev/null @@ -1,1423 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.OpenCreateNamespaceDTO; -import org.openapitools.client.model.OpenNamespaceDTO; -import org.openapitools.client.model.OpenNamespaceUsageDTO; - -import java.lang.reflect.Type; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.ws.rs.core.GenericType; - -public class NamespaceManagementApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public NamespaceManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public NamespaceManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for createMissingNamespaces - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 缺失的命名空间创建成功 -
- */ - public okhttp3.Call createMissingNamespacesCall(String appId, String env, String clusterName, String operator, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // 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}/missing-namespaces" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createMissingNamespacesValidateBeforeCall(String appId, String env, String clusterName, String operator, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling createMissingNamespaces(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling createMissingNamespaces(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling createMissingNamespaces(Async)"); - } - - return createMissingNamespacesCall(appId, env, clusterName, operator, _callback); - - } - - /** - * 创建缺失的Namespace (new added) - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 缺失的命名空间创建成功 -
- */ - public void createMissingNamespaces(String appId, String env, String clusterName, String operator) throws ApiException { - createMissingNamespacesWithHttpInfo(appId, env, clusterName, operator); - } - - /** - * 创建缺失的Namespace (new added) - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 缺失的命名空间创建成功 -
- */ - public ApiResponse createMissingNamespacesWithHttpInfo(String appId, String env, String clusterName, String operator) throws ApiException { - okhttp3.Call localVarCall = createMissingNamespacesValidateBeforeCall(appId, env, clusterName, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 创建缺失的Namespace (new added) (asynchronously) - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 缺失的命名空间创建成功 -
- */ - public okhttp3.Call createMissingNamespacesAsync(String appId, String env, String clusterName, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createMissingNamespacesValidateBeforeCall(appId, env, clusterName, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for createNamespaces - * @param openCreateNamespaceDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Namespace创建成功 -
- */ - public okhttp3.Call createNamespacesCall(List openCreateNamespaceDTO, 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 = openCreateNamespaceDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/namespaces"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "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 createNamespacesValidateBeforeCall(List openCreateNamespaceDTO, String operator, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'openCreateNamespaceDTO' is set - if (openCreateNamespaceDTO == null) { - throw new ApiException("Missing the required parameter 'openCreateNamespaceDTO' when calling createNamespaces(Async)"); - } - - return createNamespacesCall(openCreateNamespaceDTO, operator, _callback); - - } - - /** - * 创建Namespace (new added) - * POST /openapi/v1/apps/{appId}/namespaces - * @param openCreateNamespaceDTO (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Namespace创建成功 -
- */ - public void createNamespaces(List openCreateNamespaceDTO, String operator) throws ApiException { - createNamespacesWithHttpInfo(openCreateNamespaceDTO, operator); - } - - /** - * 创建Namespace (new added) - * POST /openapi/v1/apps/{appId}/namespaces - * @param openCreateNamespaceDTO (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 Namespace创建成功 -
- */ - public ApiResponse createNamespacesWithHttpInfo(List openCreateNamespaceDTO, String operator) throws ApiException { - okhttp3.Call localVarCall = createNamespacesValidateBeforeCall(openCreateNamespaceDTO, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 创建Namespace (new added) (asynchronously) - * POST /openapi/v1/apps/{appId}/namespaces - * @param openCreateNamespaceDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 Namespace创建成功 -
- */ - public okhttp3.Call createNamespacesAsync(List openCreateNamespaceDTO, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createNamespacesValidateBeforeCall(openCreateNamespaceDTO, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for deleteNamespace - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 解除关联成功 -
- */ - public okhttp3.Call deleteNamespaceCall(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // 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}" - .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 = { - }; - 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 deleteNamespaceValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling deleteNamespace(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling deleteNamespace(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling deleteNamespace(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling deleteNamespace(Async)"); - } - - return deleteNamespaceCall(appId, env, clusterName, namespaceName, operator, _callback); - - } - - /** - * 删除指定的Namespace (new added) - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 解除关联成功 -
- */ - public void deleteNamespace(String appId, String env, String clusterName, String namespaceName, String operator) throws ApiException { - deleteNamespaceWithHttpInfo(appId, env, clusterName, namespaceName, operator); - } - - /** - * 删除指定的Namespace (new added) - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 解除关联成功 -
- */ - public ApiResponse deleteNamespaceWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String operator) throws ApiException { - okhttp3.Call localVarCall = deleteNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 删除指定的Namespace (new added) (asynchronously) - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 解除关联成功 -
- */ - public okhttp3.Call deleteNamespaceAsync(String appId, String env, String clusterName, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for findMissingNamespaces - * @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 - - - -
Status Code Description Response Headers
200 缺失的命名空间名称列表 -
- */ - public okhttp3.Call findMissingNamespacesCall(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}/missing-namespaces" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - 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 findMissingNamespacesValidateBeforeCall(String appId, String env, String clusterName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling findMissingNamespaces(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling findMissingNamespaces(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling findMissingNamespaces(Async)"); - } - - return findMissingNamespacesCall(appId, env, clusterName, _callback); - - } - - /** - * 查找缺失的Namespace (new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces - * @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 findMissingNamespaces(String appId, String env, String clusterName) throws ApiException { - ApiResponse> localVarResp = findMissingNamespacesWithHttpInfo(appId, env, clusterName); - return localVarResp.getData(); - } - - /** - * 查找缺失的Namespace (new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces - * @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> findMissingNamespacesWithHttpInfo(String appId, String env, String clusterName) throws ApiException { - okhttp3.Call localVarCall = findMissingNamespacesValidateBeforeCall(appId, env, clusterName, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 查找缺失的Namespace (new added) (asynchronously) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces - * @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 findMissingNamespacesAsync(String appId, String env, String clusterName, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = findMissingNamespacesValidateBeforeCall(appId, env, clusterName, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findNamespace - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param fillItemDetail (required) - * @param extendInfo (optional, default to false) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call findNamespaceCall(String appId, String env, String clusterName, String namespaceName, Boolean fillItemDetail, Boolean extendInfo, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // 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)); - } - - if (extendInfo != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("extendInfo", extendInfo)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findNamespaceValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, Boolean fillItemDetail, Boolean extendInfo, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling findNamespace(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling findNamespace(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling findNamespace(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling findNamespace(Async)"); - } - - // verify the required parameter 'fillItemDetail' is set - if (fillItemDetail == null) { - throw new ApiException("Missing the required parameter 'fillItemDetail' when calling findNamespace(Async)"); - } - - return findNamespaceCall(appId, env, clusterName, namespaceName, fillItemDetail, extendInfo, _callback); - - } - - /** - * 获取指定的Namespace (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param fillItemDetail (required) - * @param extendInfo (optional, default to false) - * @return OpenNamespaceDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public OpenNamespaceDTO findNamespace(String appId, String env, String clusterName, String namespaceName, Boolean fillItemDetail, Boolean extendInfo) throws ApiException { - ApiResponse localVarResp = findNamespaceWithHttpInfo(appId, env, clusterName, namespaceName, fillItemDetail, extendInfo); - return localVarResp.getData(); - } - - /** - * 获取指定的Namespace (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param fillItemDetail (required) - * @param extendInfo (optional, default to false) - * @return ApiResponse<OpenNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse findNamespaceWithHttpInfo(String appId, String env, String clusterName, String namespaceName, Boolean fillItemDetail, Boolean extendInfo) throws ApiException { - okhttp3.Call localVarCall = findNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, fillItemDetail, extendInfo, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取指定的Namespace (original openapi) (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param fillItemDetail (required) - * @param extendInfo (optional, default to false) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call findNamespaceAsync(String appId, String env, String clusterName, String namespaceName, Boolean fillItemDetail, Boolean extendInfo, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, fillItemDetail, extendInfo, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findNamespaceUsage - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 NamespaceUsage查询成功 -
- */ - public okhttp3.Call findNamespaceUsageCall(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // 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}/usage" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - 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 findNamespaceUsageValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling findNamespaceUsage(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling findNamespaceUsage(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling findNamespaceUsage(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling findNamespaceUsage(Async)"); - } - - return findNamespaceUsageCall(appId, env, clusterName, namespaceName, _callback); - - } - - /** - * 查询namespace使用情况(new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @return List<OpenNamespaceUsageDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 NamespaceUsage查询成功 -
- */ - public List findNamespaceUsage(String appId, String env, String clusterName, String namespaceName) throws ApiException { - ApiResponse> localVarResp = findNamespaceUsageWithHttpInfo(appId, env, clusterName, namespaceName); - return localVarResp.getData(); - } - - /** - * 查询namespace使用情况(new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @return ApiResponse<List<OpenNamespaceUsageDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 NamespaceUsage查询成功 -
- */ - public ApiResponse> findNamespaceUsageWithHttpInfo(String appId, String env, String clusterName, String namespaceName) throws ApiException { - okhttp3.Call localVarCall = findNamespaceUsageValidateBeforeCall(appId, env, clusterName, namespaceName, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 查询namespace使用情况(new added) (asynchronously) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @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 NamespaceUsage查询成功 -
- */ - public okhttp3.Call findNamespaceUsageAsync(String appId, String env, String clusterName, String namespaceName, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = findNamespaceUsageValidateBeforeCall(appId, env, clusterName, namespaceName, _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 extendInfo (optional, default to false) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call findNamespacesCall(String appId, String env, String clusterName, Boolean fillItemDetail, Boolean extendInfo, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (fillItemDetail != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("fillItemDetail", fillItemDetail)); - } - - if (extendInfo != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("extendInfo", extendInfo)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findNamespacesValidateBeforeCall(String appId, String env, String clusterName, Boolean fillItemDetail, Boolean extendInfo, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling findNamespaces(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling findNamespaces(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling findNamespaces(Async)"); - } - - // verify the required parameter 'fillItemDetail' is set - if (fillItemDetail == null) { - throw new ApiException("Missing the required parameter 'fillItemDetail' when calling findNamespaces(Async)"); - } - - return findNamespacesCall(appId, env, clusterName, fillItemDetail, extendInfo, _callback); - - } - - /** - * 获取指定集群下的所有Namespace (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param fillItemDetail (required) - * @param extendInfo (optional, default to false) - * @return List<OpenNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public List findNamespaces(String appId, String env, String clusterName, Boolean fillItemDetail, Boolean extendInfo) throws ApiException { - ApiResponse> localVarResp = findNamespacesWithHttpInfo(appId, env, clusterName, fillItemDetail, extendInfo); - return localVarResp.getData(); - } - - /** - * 获取指定集群下的所有Namespace (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param fillItemDetail (required) - * @param extendInfo (optional, default to false) - * @return ApiResponse<List<OpenNamespaceDTO>> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse> findNamespacesWithHttpInfo(String appId, String env, String clusterName, Boolean fillItemDetail, Boolean extendInfo) throws ApiException { - okhttp3.Call localVarCall = findNamespacesValidateBeforeCall(appId, env, clusterName, fillItemDetail, extendInfo, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取指定集群下的所有Namespace (original openapi) (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param fillItemDetail (required) - * @param extendInfo (optional, default to false) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call findNamespacesAsync(String appId, String env, String clusterName, Boolean fillItemDetail, Boolean extendInfo, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = findNamespacesValidateBeforeCall(appId, env, clusterName, fillItemDetail, extendInfo, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findPublicNamespaceForAssociatedNamespace - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 关联Namespace名称 (required) - * @param extendInfo (optional, default to false) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取关联的公共Namespace详情 -
- */ - public okhttp3.Call findPublicNamespaceForAssociatedNamespaceCall(String env, String appId, String clusterName, String namespaceName, Boolean extendInfo, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // 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}/associated-public-namespace" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (extendInfo != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("extendInfo", extendInfo)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findPublicNamespaceForAssociatedNamespaceValidateBeforeCall(String env, String appId, String clusterName, String namespaceName, Boolean extendInfo, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling findPublicNamespaceForAssociatedNamespace(Async)"); - } - - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling findPublicNamespaceForAssociatedNamespace(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling findPublicNamespaceForAssociatedNamespace(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling findPublicNamespaceForAssociatedNamespace(Async)"); - } - - return findPublicNamespaceForAssociatedNamespaceCall(env, appId, clusterName, namespaceName, extendInfo, _callback); - - } - - /** - * 查询关联Namespace对应的公共Namespace详情 (new added) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 关联Namespace名称 (required) - * @param extendInfo (optional, default to false) - * @return OpenNamespaceDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取关联的公共Namespace详情 -
- */ - public OpenNamespaceDTO findPublicNamespaceForAssociatedNamespace(String env, String appId, String clusterName, String namespaceName, Boolean extendInfo) throws ApiException { - ApiResponse localVarResp = findPublicNamespaceForAssociatedNamespaceWithHttpInfo(env, appId, clusterName, namespaceName, extendInfo); - return localVarResp.getData(); - } - - /** - * 查询关联Namespace对应的公共Namespace详情 (new added) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 关联Namespace名称 (required) - * @param extendInfo (optional, default to false) - * @return ApiResponse<OpenNamespaceDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取关联的公共Namespace详情 -
- */ - public ApiResponse findPublicNamespaceForAssociatedNamespaceWithHttpInfo(String env, String appId, String clusterName, String namespaceName, Boolean extendInfo) throws ApiException { - okhttp3.Call localVarCall = findPublicNamespaceForAssociatedNamespaceValidateBeforeCall(env, appId, clusterName, namespaceName, extendInfo, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 查询关联Namespace对应的公共Namespace详情 (new added) (asynchronously) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 关联Namespace名称 (required) - * @param extendInfo (optional, default to false) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取关联的公共Namespace详情 -
- */ - public okhttp3.Call findPublicNamespaceForAssociatedNamespaceAsync(String env, String appId, String clusterName, String namespaceName, Boolean extendInfo, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = findPublicNamespaceForAssociatedNamespaceValidateBeforeCall(env, appId, clusterName, namespaceName, extendInfo, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * 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 - - - -
Status Code Description Response Headers
200 成功获取发布状态映射 -
- */ - public okhttp3.Call getNamespacesReleaseStatusCall(String appId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/namespaces/releases/status" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call 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 getNamespacesReleaseStatus(Async)"); - } - - return getNamespacesReleaseStatusCall(appId, _callback); - - } - - /** - * 获取应用下所有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 - - - -
Status Code Description Response Headers
200 成功获取发布状态映射 -
- */ - public Map> getNamespacesReleaseStatus(String appId) throws ApiException { - ApiResponse>> localVarResp = getNamespacesReleaseStatusWithHttpInfo(appId); - return localVarResp.getData(); - } - - /** - * 获取应用下所有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 - - - -
Status Code Description Response Headers
200 成功获取发布状态映射 -
- */ - public ApiResponse>> getNamespacesReleaseStatusWithHttpInfo(String appId) throws ApiException { - okhttp3.Call localVarCall = getNamespacesReleaseStatusValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken>>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取应用下所有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 - - - -
Status Code Description Response Headers
200 成功获取发布状态映射 -
- */ - public okhttp3.Call getNamespacesReleaseStatusAsync(String appId, final ApiCallback>> _callback) throws ApiException { - - okhttp3.Call localVarCall = getNamespacesReleaseStatusValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken>>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/api/OrganizationManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/OrganizationManagementApi.java deleted file mode 100644 index d9b7a72a..00000000 --- a/java-client/src/main/java/org/openapitools/client/api/OrganizationManagementApi.java +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.ExceptionResponse; -import org.openapitools.client.model.OpenOrganizationDto; - -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; - private int localHostIndex; - private String localCustomBaseUrl; - - public OrganizationManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public OrganizationManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for 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 - - - - -
Status Code Description Response Headers
200 成功获取组织列表 -
401 未授权访问 -
- */ - public okhttp3.Call getOrganizationCall(final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/organizations"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call 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 - - - - -
Status Code Description Response Headers
200 成功获取组织列表 -
401 未授权访问 -
- */ - 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 - - - - -
Status Code Description Response Headers
200 成功获取组织列表 -
401 未授权访问 -
- */ - public ApiResponse> getOrganizationWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getOrganizationValidateBeforeCall(null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取所有组织信息 (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 - - - - -
Status Code Description Response Headers
200 成功获取组织列表 -
401 未授权访问 -
- */ - public okhttp3.Call getOrganizationAsync(final ApiCallback> _callback) throws ApiException { - - 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/PermissionManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/PermissionManagementApi.java deleted file mode 100644 index b444bb8c..00000000 --- a/java-client/src/main/java/org/openapitools/client/api/PermissionManagementApi.java +++ /dev/null @@ -1,3840 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.OpenAppRoleUserDTO; -import org.openapitools.client.model.OpenClusterNamespaceRoleUserDTO; -import org.openapitools.client.model.OpenEnvNamespaceRoleUserDTO; -import org.openapitools.client.model.OpenNamespaceRoleUserDTO; -import org.openapitools.client.model.OpenPermissionConditionDTO; - -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 PermissionManagementApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public PermissionManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public PermissionManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for addCreateApplicationRoleToUsers - * @param operator 操作人用户名 (optional) - * @param requestBody (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call addCreateApplicationRoleToUsersCall(String operator, List requestBody, 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 = requestBody; - - // create path and map variables - String localVarPath = "/openapi/v1/system/roles/create-application"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "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 addCreateApplicationRoleToUsersValidateBeforeCall(String operator, List requestBody, final ApiCallback _callback) throws ApiException { - return addCreateApplicationRoleToUsersCall(operator, requestBody, _callback); - - } - - /** - * 分配建应用角色 (new added) - * - * @param operator 操作人用户名 (optional) - * @param requestBody (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public void addCreateApplicationRoleToUsers(String operator, List requestBody) throws ApiException { - addCreateApplicationRoleToUsersWithHttpInfo(operator, requestBody); - } - - /** - * 分配建应用角色 (new added) - * - * @param operator 操作人用户名 (optional) - * @param requestBody (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse addCreateApplicationRoleToUsersWithHttpInfo(String operator, List requestBody) throws ApiException { - okhttp3.Call localVarCall = addCreateApplicationRoleToUsersValidateBeforeCall(operator, requestBody, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 分配建应用角色 (new added) (asynchronously) - * - * @param operator 操作人用户名 (optional) - * @param requestBody (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call addCreateApplicationRoleToUsersAsync(String operator, List requestBody, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = addCreateApplicationRoleToUsersValidateBeforeCall(operator, requestBody, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for addManageAppMasterRoleToUser - * @param appId (required) - * @param userId the user which role assign to (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call addManageAppMasterRoleToUserCall(String appId, String userId, 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}/roles/master" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call addManageAppMasterRoleToUserValidateBeforeCall(String appId, String userId, 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 addManageAppMasterRoleToUser(Async)"); - } - - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling addManageAppMasterRoleToUser(Async)"); - } - - return addManageAppMasterRoleToUserCall(appId, userId, operator, _callback); - - } - - /** - * 分配AppMaster (new added) - * - * @param appId (required) - * @param userId the user which role assign to (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public void addManageAppMasterRoleToUser(String appId, String userId, String operator) throws ApiException { - addManageAppMasterRoleToUserWithHttpInfo(appId, userId, operator); - } - - /** - * 分配AppMaster (new added) - * - * @param appId (required) - * @param userId the user which role assign to (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse addManageAppMasterRoleToUserWithHttpInfo(String appId, String userId, String operator) throws ApiException { - okhttp3.Call localVarCall = addManageAppMasterRoleToUserValidateBeforeCall(appId, userId, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 分配AppMaster (new added) (asynchronously) - * - * @param appId (required) - * @param userId the user which role assign to (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call addManageAppMasterRoleToUserAsync(String appId, String userId, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = addManageAppMasterRoleToUserValidateBeforeCall(appId, userId, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for assignAppRoleToUser - * @param appId (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @param body (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call assignAppRoleToUserCall(String appId, String roleType, String userId, String operator, String body, 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 = body; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/roles/{roleType}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "roleType" + "}", localVarApiClient.escapeString(roleType.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)); - } - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - final String[] localVarAccepts = { - }; - 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 assignAppRoleToUserValidateBeforeCall(String appId, String roleType, String userId, String operator, String body, 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 assignAppRoleToUser(Async)"); - } - - // verify the required parameter 'roleType' is set - if (roleType == null) { - throw new ApiException("Missing the required parameter 'roleType' when calling assignAppRoleToUser(Async)"); - } - - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling assignAppRoleToUser(Async)"); - } - - return assignAppRoleToUserCall(appId, roleType, userId, operator, body, _callback); - - } - - /** - * 分配应用角色 (new added) - * - * @param appId (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @param body (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public void assignAppRoleToUser(String appId, String roleType, String userId, String operator, String body) throws ApiException { - assignAppRoleToUserWithHttpInfo(appId, roleType, userId, operator, body); - } - - /** - * 分配应用角色 (new added) - * - * @param appId (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @param body (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse assignAppRoleToUserWithHttpInfo(String appId, String roleType, String userId, String operator, String body) throws ApiException { - okhttp3.Call localVarCall = assignAppRoleToUserValidateBeforeCall(appId, roleType, userId, operator, body, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 分配应用角色 (new added) (asynchronously) - * - * @param appId (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @param body (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call assignAppRoleToUserAsync(String appId, String roleType, String userId, String operator, String body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = assignAppRoleToUserValidateBeforeCall(appId, roleType, userId, operator, body, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for assignClusterNamespaceRoleToUser - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param roleType (required) - * @param userId the user which role assigned to (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call assignClusterNamespaceRoleToUserCall(String appId, String env, String clusterName, String roleType, String userId, 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}/roles/{roleType}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "roleType" + "}", localVarApiClient.escapeString(roleType.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)); - } - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call assignClusterNamespaceRoleToUserValidateBeforeCall(String appId, String env, String clusterName, String roleType, String userId, 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 assignClusterNamespaceRoleToUser(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling assignClusterNamespaceRoleToUser(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling assignClusterNamespaceRoleToUser(Async)"); - } - - // verify the required parameter 'roleType' is set - if (roleType == null) { - throw new ApiException("Missing the required parameter 'roleType' when calling assignClusterNamespaceRoleToUser(Async)"); - } - - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling assignClusterNamespaceRoleToUser(Async)"); - } - - return assignClusterNamespaceRoleToUserCall(appId, env, clusterName, roleType, userId, operator, _callback); - - } - - /** - * 分配集群Namespace角色 (new added) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param roleType (required) - * @param userId the user which role assigned to (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public void assignClusterNamespaceRoleToUser(String appId, String env, String clusterName, String roleType, String userId, String operator) throws ApiException { - assignClusterNamespaceRoleToUserWithHttpInfo(appId, env, clusterName, roleType, userId, operator); - } - - /** - * 分配集群Namespace角色 (new added) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param roleType (required) - * @param userId the user which role assigned to (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse assignClusterNamespaceRoleToUserWithHttpInfo(String appId, String env, String clusterName, String roleType, String userId, String operator) throws ApiException { - okhttp3.Call localVarCall = assignClusterNamespaceRoleToUserValidateBeforeCall(appId, env, clusterName, roleType, userId, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 分配集群Namespace角色 (new added) (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param roleType (required) - * @param userId the user which role assigned to (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call assignClusterNamespaceRoleToUserAsync(String appId, String env, String clusterName, String roleType, String userId, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = assignClusterNamespaceRoleToUserValidateBeforeCall(appId, env, clusterName, roleType, userId, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for assignNamespaceEnvRoleToUser - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role assigned to (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call assignNamespaceEnvRoleToUserCall(String appId, String env, String namespaceName, String roleType, String userId, 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}/namespaces/{namespaceName}/roles/{roleType}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "roleType" + "}", localVarApiClient.escapeString(roleType.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)); - } - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call assignNamespaceEnvRoleToUserValidateBeforeCall(String appId, String env, String namespaceName, String roleType, String userId, 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 assignNamespaceEnvRoleToUser(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling assignNamespaceEnvRoleToUser(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling assignNamespaceEnvRoleToUser(Async)"); - } - - // verify the required parameter 'roleType' is set - if (roleType == null) { - throw new ApiException("Missing the required parameter 'roleType' when calling assignNamespaceEnvRoleToUser(Async)"); - } - - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling assignNamespaceEnvRoleToUser(Async)"); - } - - return assignNamespaceEnvRoleToUserCall(appId, env, namespaceName, roleType, userId, operator, _callback); - - } - - /** - * 分配环境Namespace角色 (new added) - * - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role assigned to (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public void assignNamespaceEnvRoleToUser(String appId, String env, String namespaceName, String roleType, String userId, String operator) throws ApiException { - assignNamespaceEnvRoleToUserWithHttpInfo(appId, env, namespaceName, roleType, userId, operator); - } - - /** - * 分配环境Namespace角色 (new added) - * - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role assigned to (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse assignNamespaceEnvRoleToUserWithHttpInfo(String appId, String env, String namespaceName, String roleType, String userId, String operator) throws ApiException { - okhttp3.Call localVarCall = assignNamespaceEnvRoleToUserValidateBeforeCall(appId, env, namespaceName, roleType, userId, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 分配环境Namespace角色 (new added) (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role assigned to (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call assignNamespaceEnvRoleToUserAsync(String appId, String env, String namespaceName, String roleType, String userId, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = assignNamespaceEnvRoleToUserValidateBeforeCall(appId, env, namespaceName, roleType, userId, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for assignNamespaceRoleToUser - * @param appId (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role assigned to (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call assignNamespaceRoleToUserCall(String appId, String namespaceName, String roleType, String userId, 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}/namespaces/{namespaceName}/roles/{roleType}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "roleType" + "}", localVarApiClient.escapeString(roleType.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)); - } - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call assignNamespaceRoleToUserValidateBeforeCall(String appId, String namespaceName, String roleType, String userId, 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 assignNamespaceRoleToUser(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling assignNamespaceRoleToUser(Async)"); - } - - // verify the required parameter 'roleType' is set - if (roleType == null) { - throw new ApiException("Missing the required parameter 'roleType' when calling assignNamespaceRoleToUser(Async)"); - } - - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling assignNamespaceRoleToUser(Async)"); - } - - return assignNamespaceRoleToUserCall(appId, namespaceName, roleType, userId, operator, _callback); - - } - - /** - * 分配Namespace角色 (new added) - * - * @param appId (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role assigned to (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public void assignNamespaceRoleToUser(String appId, String namespaceName, String roleType, String userId, String operator) throws ApiException { - assignNamespaceRoleToUserWithHttpInfo(appId, namespaceName, roleType, userId, operator); - } - - /** - * 分配Namespace角色 (new added) - * - * @param appId (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role assigned to (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse assignNamespaceRoleToUserWithHttpInfo(String appId, String namespaceName, String roleType, String userId, String operator) throws ApiException { - okhttp3.Call localVarCall = assignNamespaceRoleToUserValidateBeforeCall(appId, namespaceName, roleType, userId, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 分配Namespace角色 (new added) (asynchronously) - * - * @param appId (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role assigned to (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call assignNamespaceRoleToUserAsync(String appId, String namespaceName, String roleType, String userId, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = assignNamespaceRoleToUserValidateBeforeCall(appId, namespaceName, roleType, userId, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for deleteCreateApplicationRoleFromUser - * @param userId (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call deleteCreateApplicationRoleFromUserCall(String userId, 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/system/roles/create-application"; - - 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)); - } - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteCreateApplicationRoleFromUserValidateBeforeCall(String userId, String operator, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling deleteCreateApplicationRoleFromUser(Async)"); - } - - return deleteCreateApplicationRoleFromUserCall(userId, operator, _callback); - - } - - /** - * 移除建应用角色 (new added) - * - * @param userId (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public void deleteCreateApplicationRoleFromUser(String userId, String operator) throws ApiException { - deleteCreateApplicationRoleFromUserWithHttpInfo(userId, operator); - } - - /** - * 移除建应用角色 (new added) - * - * @param userId (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse deleteCreateApplicationRoleFromUserWithHttpInfo(String userId, String operator) throws ApiException { - okhttp3.Call localVarCall = deleteCreateApplicationRoleFromUserValidateBeforeCall(userId, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 移除建应用角色 (new added) (asynchronously) - * - * @param userId (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call deleteCreateApplicationRoleFromUserAsync(String userId, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteCreateApplicationRoleFromUserValidateBeforeCall(userId, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for getAppRoles - * @param appId (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getAppRolesCall(String appId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/role-users" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getAppRolesValidateBeforeCall(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 getAppRoles(Async)"); - } - - return getAppRolesCall(appId, _callback); - - } - - /** - * 获取应用角色用户 (new added) - * - * @param appId (required) - * @return OpenAppRoleUserDTO - * @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 OpenAppRoleUserDTO getAppRoles(String appId) throws ApiException { - ApiResponse localVarResp = getAppRolesWithHttpInfo(appId); - return localVarResp.getData(); - } - - /** - * 获取应用角色用户 (new added) - * - * @param appId (required) - * @return ApiResponse<OpenAppRoleUserDTO> - * @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 getAppRolesWithHttpInfo(String appId) throws ApiException { - okhttp3.Call localVarCall = getAppRolesValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取应用角色用户 (new added) (asynchronously) - * - * @param appId (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getAppRolesAsync(String appId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getAppRolesValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getClusterNamespaceRoles - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getClusterNamespaceRolesCall(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/role-users" - .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 getClusterNamespaceRolesValidateBeforeCall(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 getClusterNamespaceRoles(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling getClusterNamespaceRoles(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling getClusterNamespaceRoles(Async)"); - } - - return getClusterNamespaceRolesCall(appId, env, clusterName, _callback); - - } - - /** - * 获取集群Namespace用户 (new added) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @return OpenClusterNamespaceRoleUserDTO - * @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 OpenClusterNamespaceRoleUserDTO getClusterNamespaceRoles(String appId, String env, String clusterName) throws ApiException { - ApiResponse localVarResp = getClusterNamespaceRolesWithHttpInfo(appId, env, clusterName); - return localVarResp.getData(); - } - - /** - * 获取集群Namespace用户 (new added) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @return ApiResponse<OpenClusterNamespaceRoleUserDTO> - * @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 getClusterNamespaceRolesWithHttpInfo(String appId, String env, String clusterName) throws ApiException { - okhttp3.Call localVarCall = getClusterNamespaceRolesValidateBeforeCall(appId, env, clusterName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取集群Namespace用户 (new added) (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getClusterNamespaceRolesAsync(String appId, String env, String clusterName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getClusterNamespaceRolesValidateBeforeCall(appId, env, clusterName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getCreateApplicationRoleUsers - * @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 getCreateApplicationRoleUsersCall(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/system/roles/create-application/role-users"; - - 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 getCreateApplicationRoleUsersValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getCreateApplicationRoleUsersCall(_callback); - - } - - /** - * 获取建应用用户 (new added) - * - * @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 getCreateApplicationRoleUsers() throws ApiException { - ApiResponse> localVarResp = getCreateApplicationRoleUsersWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * 获取建应用用户 (new added) - * - * @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> getCreateApplicationRoleUsersWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getCreateApplicationRoleUsersValidateBeforeCall(null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取建应用用户 (new added) (asynchronously) - * - * @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 getCreateApplicationRoleUsersAsync(final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = getCreateApplicationRoleUsersValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getNamespaceEnvRoleUsers - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getNamespaceEnvRoleUsersCall(String appId, String env, String namespaceName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/role-users" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.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 getNamespaceEnvRoleUsersValidateBeforeCall(String appId, String env, 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 getNamespaceEnvRoleUsers(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling getNamespaceEnvRoleUsers(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling getNamespaceEnvRoleUsers(Async)"); - } - - return getNamespaceEnvRoleUsersCall(appId, env, namespaceName, _callback); - - } - - /** - * 获取环境Namespace用户 (new added) - * - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @return OpenEnvNamespaceRoleUserDTO - * @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 OpenEnvNamespaceRoleUserDTO getNamespaceEnvRoleUsers(String appId, String env, String namespaceName) throws ApiException { - ApiResponse localVarResp = getNamespaceEnvRoleUsersWithHttpInfo(appId, env, namespaceName); - return localVarResp.getData(); - } - - /** - * 获取环境Namespace用户 (new added) - * - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @return ApiResponse<OpenEnvNamespaceRoleUserDTO> - * @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 getNamespaceEnvRoleUsersWithHttpInfo(String appId, String env, String namespaceName) throws ApiException { - okhttp3.Call localVarCall = getNamespaceEnvRoleUsersValidateBeforeCall(appId, env, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取环境Namespace用户 (new added) (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getNamespaceEnvRoleUsersAsync(String appId, String env, String namespaceName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getNamespaceEnvRoleUsersValidateBeforeCall(appId, env, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getNamespaceRoles - * @param appId (required) - * @param namespaceName (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getNamespaceRolesCall(String appId, String namespaceName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/namespaces/{namespaceName}/role-users" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getNamespaceRolesValidateBeforeCall(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 getNamespaceRoles(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling getNamespaceRoles(Async)"); - } - - return getNamespaceRolesCall(appId, namespaceName, _callback); - - } - - /** - * 获取Namespace用户 (new added) - * - * @param appId (required) - * @param namespaceName (required) - * @return OpenNamespaceRoleUserDTO - * @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 OpenNamespaceRoleUserDTO getNamespaceRoles(String appId, String namespaceName) throws ApiException { - ApiResponse localVarResp = getNamespaceRolesWithHttpInfo(appId, namespaceName); - return localVarResp.getData(); - } - - /** - * 获取Namespace用户 (new added) - * - * @param appId (required) - * @param namespaceName (required) - * @return ApiResponse<OpenNamespaceRoleUserDTO> - * @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 getNamespaceRolesWithHttpInfo(String appId, String namespaceName) throws ApiException { - okhttp3.Call localVarCall = getNamespaceRolesValidateBeforeCall(appId, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取Namespace用户 (new added) (asynchronously) - * - * @param appId (required) - * @param namespaceName (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call getNamespaceRolesAsync(String appId, String namespaceName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getNamespaceRolesValidateBeforeCall(appId, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for hasAppPermission - * @param appId (required) - * @param permissionType (required) - * @param userId (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 hasAppPermissionCall(String appId, String permissionType, String userId, 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}/permissions/{permissionType}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "permissionType" + "}", localVarApiClient.escapeString(permissionType.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - 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 hasAppPermissionValidateBeforeCall(String appId, String permissionType, String userId, 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 hasAppPermission(Async)"); - } - - // verify the required parameter 'permissionType' is set - if (permissionType == null) { - throw new ApiException("Missing the required parameter 'permissionType' when calling hasAppPermission(Async)"); - } - - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling hasAppPermission(Async)"); - } - - return hasAppPermissionCall(appId, permissionType, userId, _callback); - - } - - /** - * 校验应用权限 (new added) - * - * @param appId (required) - * @param permissionType (required) - * @param userId (required) - * @return OpenPermissionConditionDTO - * @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 OpenPermissionConditionDTO hasAppPermission(String appId, String permissionType, String userId) throws ApiException { - ApiResponse localVarResp = hasAppPermissionWithHttpInfo(appId, permissionType, userId); - return localVarResp.getData(); - } - - /** - * 校验应用权限 (new added) - * - * @param appId (required) - * @param permissionType (required) - * @param userId (required) - * @return ApiResponse<OpenPermissionConditionDTO> - * @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 hasAppPermissionWithHttpInfo(String appId, String permissionType, String userId) throws ApiException { - okhttp3.Call localVarCall = hasAppPermissionValidateBeforeCall(appId, permissionType, userId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 校验应用权限 (new added) (asynchronously) - * - * @param appId (required) - * @param permissionType (required) - * @param userId (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 hasAppPermissionAsync(String appId, String permissionType, String userId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = hasAppPermissionValidateBeforeCall(appId, permissionType, userId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for hasClusterNamespacePermission - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param permissionType (required) - * @param userId (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 hasClusterNamespacePermissionCall(String appId, String env, String clusterName, String permissionType, String userId, 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/permissions/{permissionType}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "permissionType" + "}", localVarApiClient.escapeString(permissionType.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - 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 hasClusterNamespacePermissionValidateBeforeCall(String appId, String env, String clusterName, String permissionType, String userId, 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 hasClusterNamespacePermission(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling hasClusterNamespacePermission(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling hasClusterNamespacePermission(Async)"); - } - - // verify the required parameter 'permissionType' is set - if (permissionType == null) { - throw new ApiException("Missing the required parameter 'permissionType' when calling hasClusterNamespacePermission(Async)"); - } - - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling hasClusterNamespacePermission(Async)"); - } - - return hasClusterNamespacePermissionCall(appId, env, clusterName, permissionType, userId, _callback); - - } - - /** - * 校验集群Namespace权限 (new added) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param permissionType (required) - * @param userId (required) - * @return OpenPermissionConditionDTO - * @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 OpenPermissionConditionDTO hasClusterNamespacePermission(String appId, String env, String clusterName, String permissionType, String userId) throws ApiException { - ApiResponse localVarResp = hasClusterNamespacePermissionWithHttpInfo(appId, env, clusterName, permissionType, userId); - return localVarResp.getData(); - } - - /** - * 校验集群Namespace权限 (new added) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param permissionType (required) - * @param userId (required) - * @return ApiResponse<OpenPermissionConditionDTO> - * @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 hasClusterNamespacePermissionWithHttpInfo(String appId, String env, String clusterName, String permissionType, String userId) throws ApiException { - okhttp3.Call localVarCall = hasClusterNamespacePermissionValidateBeforeCall(appId, env, clusterName, permissionType, userId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 校验集群Namespace权限 (new added) (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param permissionType (required) - * @param userId (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 hasClusterNamespacePermissionAsync(String appId, String env, String clusterName, String permissionType, String userId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = hasClusterNamespacePermissionValidateBeforeCall(appId, env, clusterName, permissionType, userId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for hasCreateApplicationPermission - * @param userId (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 hasCreateApplicationPermissionCall(String userId, 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/system/roles/create-application"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - 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 hasCreateApplicationPermissionValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling hasCreateApplicationPermission(Async)"); - } - - return hasCreateApplicationPermissionCall(userId, _callback); - - } - - /** - * 校验建应用权限 (new added) - * - * @param userId (required) - * @return Map<String, Boolean> - * @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 Map hasCreateApplicationPermission(String userId) throws ApiException { - ApiResponse> localVarResp = hasCreateApplicationPermissionWithHttpInfo(userId); - return localVarResp.getData(); - } - - /** - * 校验建应用权限 (new added) - * - * @param userId (required) - * @return ApiResponse<Map<String, Boolean>> - * @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> hasCreateApplicationPermissionWithHttpInfo(String userId) throws ApiException { - okhttp3.Call localVarCall = hasCreateApplicationPermissionValidateBeforeCall(userId, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 校验建应用权限 (new added) (asynchronously) - * - * @param userId (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 hasCreateApplicationPermissionAsync(String userId, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = hasCreateApplicationPermissionValidateBeforeCall(userId, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for hasEnvNamespacePermission - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @param permissionType (required) - * @param userId (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 hasEnvNamespacePermissionCall(String appId, String env, String namespaceName, String permissionType, String userId, 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}/namespaces/{namespaceName}/permissions/{permissionType}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "permissionType" + "}", localVarApiClient.escapeString(permissionType.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - 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 hasEnvNamespacePermissionValidateBeforeCall(String appId, String env, String namespaceName, String permissionType, String userId, 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 hasEnvNamespacePermission(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling hasEnvNamespacePermission(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling hasEnvNamespacePermission(Async)"); - } - - // verify the required parameter 'permissionType' is set - if (permissionType == null) { - throw new ApiException("Missing the required parameter 'permissionType' when calling hasEnvNamespacePermission(Async)"); - } - - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling hasEnvNamespacePermission(Async)"); - } - - return hasEnvNamespacePermissionCall(appId, env, namespaceName, permissionType, userId, _callback); - - } - - /** - * 校验环境Namespace权限 (new added) - * - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @param permissionType (required) - * @param userId (required) - * @return OpenPermissionConditionDTO - * @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 OpenPermissionConditionDTO hasEnvNamespacePermission(String appId, String env, String namespaceName, String permissionType, String userId) throws ApiException { - ApiResponse localVarResp = hasEnvNamespacePermissionWithHttpInfo(appId, env, namespaceName, permissionType, userId); - return localVarResp.getData(); - } - - /** - * 校验环境Namespace权限 (new added) - * - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @param permissionType (required) - * @param userId (required) - * @return ApiResponse<OpenPermissionConditionDTO> - * @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 hasEnvNamespacePermissionWithHttpInfo(String appId, String env, String namespaceName, String permissionType, String userId) throws ApiException { - okhttp3.Call localVarCall = hasEnvNamespacePermissionValidateBeforeCall(appId, env, namespaceName, permissionType, userId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 校验环境Namespace权限 (new added) (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @param permissionType (required) - * @param userId (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 hasEnvNamespacePermissionAsync(String appId, String env, String namespaceName, String permissionType, String userId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = hasEnvNamespacePermissionValidateBeforeCall(appId, env, namespaceName, permissionType, userId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for hasNamespacePermission - * @param appId (required) - * @param namespaceName (required) - * @param permissionType (required) - * @param userId (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 hasNamespacePermissionCall(String appId, String namespaceName, String permissionType, String userId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/namespaces/{namespaceName}/permissions/{permissionType}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "permissionType" + "}", localVarApiClient.escapeString(permissionType.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - 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 hasNamespacePermissionValidateBeforeCall(String appId, String namespaceName, String permissionType, String userId, 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 hasNamespacePermission(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling hasNamespacePermission(Async)"); - } - - // verify the required parameter 'permissionType' is set - if (permissionType == null) { - throw new ApiException("Missing the required parameter 'permissionType' when calling hasNamespacePermission(Async)"); - } - - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling hasNamespacePermission(Async)"); - } - - return hasNamespacePermissionCall(appId, namespaceName, permissionType, userId, _callback); - - } - - /** - * 校验Namespace权限 (new added) - * - * @param appId (required) - * @param namespaceName (required) - * @param permissionType (required) - * @param userId (required) - * @return OpenPermissionConditionDTO - * @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 OpenPermissionConditionDTO hasNamespacePermission(String appId, String namespaceName, String permissionType, String userId) throws ApiException { - ApiResponse localVarResp = hasNamespacePermissionWithHttpInfo(appId, namespaceName, permissionType, userId); - return localVarResp.getData(); - } - - /** - * 校验Namespace权限 (new added) - * - * @param appId (required) - * @param namespaceName (required) - * @param permissionType (required) - * @param userId (required) - * @return ApiResponse<OpenPermissionConditionDTO> - * @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 hasNamespacePermissionWithHttpInfo(String appId, String namespaceName, String permissionType, String userId) throws ApiException { - okhttp3.Call localVarCall = hasNamespacePermissionValidateBeforeCall(appId, namespaceName, permissionType, userId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 校验Namespace权限 (new added) (asynchronously) - * - * @param appId (required) - * @param namespaceName (required) - * @param permissionType (required) - * @param userId (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 hasNamespacePermissionAsync(String appId, String namespaceName, String permissionType, String userId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = hasNamespacePermissionValidateBeforeCall(appId, namespaceName, permissionType, userId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for hasRootPermission - * @param userId (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 hasRootPermissionCall(String userId, 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/permissions/root"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - 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 hasRootPermissionValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling hasRootPermission(Async)"); - } - - return hasRootPermissionCall(userId, _callback); - - } - - /** - * 校验Root权限 (new added) - * - * @param userId (required) - * @return OpenPermissionConditionDTO - * @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 OpenPermissionConditionDTO hasRootPermission(String userId) throws ApiException { - ApiResponse localVarResp = hasRootPermissionWithHttpInfo(userId); - return localVarResp.getData(); - } - - /** - * 校验Root权限 (new added) - * - * @param userId (required) - * @return ApiResponse<OpenPermissionConditionDTO> - * @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 hasRootPermissionWithHttpInfo(String userId) throws ApiException { - okhttp3.Call localVarCall = hasRootPermissionValidateBeforeCall(userId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 校验Root权限 (new added) (asynchronously) - * - * @param userId (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 hasRootPermissionAsync(String userId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = hasRootPermissionValidateBeforeCall(userId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for initAppPermission - * @param appId (required) - * @param namespaceName (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 初始化成功 -
- */ - public okhttp3.Call initAppPermissionCall(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}/namespaces/{namespaceName}/permission-init" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call initAppPermissionValidateBeforeCall(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 initAppPermission(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling initAppPermission(Async)"); - } - - return initAppPermissionCall(appId, namespaceName, operator, _callback); - - } - - /** - * 初始化应用权限 (new added) - * - * @param appId (required) - * @param namespaceName (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 初始化成功 -
- */ - public void initAppPermission(String appId, String namespaceName, String operator) throws ApiException { - initAppPermissionWithHttpInfo(appId, namespaceName, operator); - } - - /** - * 初始化应用权限 (new added) - * - * @param appId (required) - * @param namespaceName (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 初始化成功 -
- */ - public ApiResponse initAppPermissionWithHttpInfo(String appId, String namespaceName, String operator) throws ApiException { - okhttp3.Call localVarCall = initAppPermissionValidateBeforeCall(appId, namespaceName, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 初始化应用权限 (new added) (asynchronously) - * - * @param appId (required) - * @param namespaceName (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 初始化成功 -
- */ - public okhttp3.Call initAppPermissionAsync(String appId, String namespaceName, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = initAppPermissionValidateBeforeCall(appId, namespaceName, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for initClusterNamespacePermission - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call initClusterNamespacePermissionCall(String appId, String env, String clusterName, 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/permission-init" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call initClusterNamespacePermissionValidateBeforeCall(String appId, String env, String clusterName, String operator, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'appId' is set - if (appId == null) { - throw new ApiException("Missing the required parameter 'appId' when calling initClusterNamespacePermission(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling initClusterNamespacePermission(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling initClusterNamespacePermission(Async)"); - } - - return initClusterNamespacePermissionCall(appId, env, clusterName, operator, _callback); - - } - - /** - * 初始化集群Namespace权限 (new added) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public void initClusterNamespacePermission(String appId, String env, String clusterName, String operator) throws ApiException { - initClusterNamespacePermissionWithHttpInfo(appId, env, clusterName, operator); - } - - /** - * 初始化集群Namespace权限 (new added) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse initClusterNamespacePermissionWithHttpInfo(String appId, String env, String clusterName, String operator) throws ApiException { - okhttp3.Call localVarCall = initClusterNamespacePermissionValidateBeforeCall(appId, env, clusterName, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 初始化集群Namespace权限 (new added) (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call initClusterNamespacePermissionAsync(String appId, String env, String clusterName, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = initClusterNamespacePermissionValidateBeforeCall(appId, env, clusterName, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for isManageAppMasterPermissionEnabled - * @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 isManageAppMasterPermissionEnabledCall(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/system/role/manage-app-master"; - - 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 isManageAppMasterPermissionEnabledValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return isManageAppMasterPermissionEnabledCall(_callback); - - } - - /** - * 校验AppMaster开关 (new added) - * - * @return Map<String, Boolean> - * @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 Map isManageAppMasterPermissionEnabled() throws ApiException { - ApiResponse> localVarResp = isManageAppMasterPermissionEnabledWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * 校验AppMaster开关 (new added) - * - * @return ApiResponse<Map<String, Boolean>> - * @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> isManageAppMasterPermissionEnabledWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = isManageAppMasterPermissionEnabledValidateBeforeCall(null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 校验AppMaster开关 (new added) (asynchronously) - * - * @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 isManageAppMasterPermissionEnabledAsync(final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = isManageAppMasterPermissionEnabledValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for removeAppRoleFromUser - * @param appId (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call removeAppRoleFromUserCall(String appId, String roleType, String userId, 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}/roles/{roleType}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "roleType" + "}", localVarApiClient.escapeString(roleType.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)); - } - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call removeAppRoleFromUserValidateBeforeCall(String appId, String roleType, String userId, 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 removeAppRoleFromUser(Async)"); - } - - // verify the required parameter 'roleType' is set - if (roleType == null) { - throw new ApiException("Missing the required parameter 'roleType' when calling removeAppRoleFromUser(Async)"); - } - - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling removeAppRoleFromUser(Async)"); - } - - return removeAppRoleFromUserCall(appId, roleType, userId, operator, _callback); - - } - - /** - * 移除应用角色 (new added) - * - * @param appId (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public void removeAppRoleFromUser(String appId, String roleType, String userId, String operator) throws ApiException { - removeAppRoleFromUserWithHttpInfo(appId, roleType, userId, operator); - } - - /** - * 移除应用角色 (new added) - * - * @param appId (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse removeAppRoleFromUserWithHttpInfo(String appId, String roleType, String userId, String operator) throws ApiException { - okhttp3.Call localVarCall = removeAppRoleFromUserValidateBeforeCall(appId, roleType, userId, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 移除应用角色 (new added) (asynchronously) - * - * @param appId (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call removeAppRoleFromUserAsync(String appId, String roleType, String userId, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = removeAppRoleFromUserValidateBeforeCall(appId, roleType, userId, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for removeClusterNamespaceRoleFromUser - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call removeClusterNamespaceRoleFromUserCall(String appId, String env, String clusterName, String roleType, String userId, 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}/roles/{roleType}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "roleType" + "}", localVarApiClient.escapeString(roleType.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)); - } - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call removeClusterNamespaceRoleFromUserValidateBeforeCall(String appId, String env, String clusterName, String roleType, String userId, 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 removeClusterNamespaceRoleFromUser(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling removeClusterNamespaceRoleFromUser(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling removeClusterNamespaceRoleFromUser(Async)"); - } - - // verify the required parameter 'roleType' is set - if (roleType == null) { - throw new ApiException("Missing the required parameter 'roleType' when calling removeClusterNamespaceRoleFromUser(Async)"); - } - - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling removeClusterNamespaceRoleFromUser(Async)"); - } - - return removeClusterNamespaceRoleFromUserCall(appId, env, clusterName, roleType, userId, operator, _callback); - - } - - /** - * 移除集群Namespace角色 (new added) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public void removeClusterNamespaceRoleFromUser(String appId, String env, String clusterName, String roleType, String userId, String operator) throws ApiException { - removeClusterNamespaceRoleFromUserWithHttpInfo(appId, env, clusterName, roleType, userId, operator); - } - - /** - * 移除集群Namespace角色 (new added) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse removeClusterNamespaceRoleFromUserWithHttpInfo(String appId, String env, String clusterName, String roleType, String userId, String operator) throws ApiException { - okhttp3.Call localVarCall = removeClusterNamespaceRoleFromUserValidateBeforeCall(appId, env, clusterName, roleType, userId, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 移除集群Namespace角色 (new added) (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call removeClusterNamespaceRoleFromUserAsync(String appId, String env, String clusterName, String roleType, String userId, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = removeClusterNamespaceRoleFromUserValidateBeforeCall(appId, env, clusterName, roleType, userId, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for removeManageAppMasterRoleFromUser - * @param appId (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call removeManageAppMasterRoleFromUserCall(String appId, String userId, 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}/roles/master" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call removeManageAppMasterRoleFromUserValidateBeforeCall(String appId, String userId, 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 removeManageAppMasterRoleFromUser(Async)"); - } - - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling removeManageAppMasterRoleFromUser(Async)"); - } - - return removeManageAppMasterRoleFromUserCall(appId, userId, operator, _callback); - - } - - /** - * 移除AppMaster (new added) - * - * @param appId (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public void removeManageAppMasterRoleFromUser(String appId, String userId, String operator) throws ApiException { - removeManageAppMasterRoleFromUserWithHttpInfo(appId, userId, operator); - } - - /** - * 移除AppMaster (new added) - * - * @param appId (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse removeManageAppMasterRoleFromUserWithHttpInfo(String appId, String userId, String operator) throws ApiException { - okhttp3.Call localVarCall = removeManageAppMasterRoleFromUserValidateBeforeCall(appId, userId, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 移除AppMaster (new added) (asynchronously) - * - * @param appId (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call removeManageAppMasterRoleFromUserAsync(String appId, String userId, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = removeManageAppMasterRoleFromUserValidateBeforeCall(appId, userId, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for removeNamespaceEnvRoleFromUser - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call removeNamespaceEnvRoleFromUserCall(String appId, String env, String namespaceName, String roleType, String userId, 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}/namespaces/{namespaceName}/roles/{roleType}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "roleType" + "}", localVarApiClient.escapeString(roleType.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)); - } - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call removeNamespaceEnvRoleFromUserValidateBeforeCall(String appId, String env, String namespaceName, String roleType, String userId, 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 removeNamespaceEnvRoleFromUser(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling removeNamespaceEnvRoleFromUser(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling removeNamespaceEnvRoleFromUser(Async)"); - } - - // verify the required parameter 'roleType' is set - if (roleType == null) { - throw new ApiException("Missing the required parameter 'roleType' when calling removeNamespaceEnvRoleFromUser(Async)"); - } - - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling removeNamespaceEnvRoleFromUser(Async)"); - } - - return removeNamespaceEnvRoleFromUserCall(appId, env, namespaceName, roleType, userId, operator, _callback); - - } - - /** - * 移除环境Namespace角色 (new added) - * - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public void removeNamespaceEnvRoleFromUser(String appId, String env, String namespaceName, String roleType, String userId, String operator) throws ApiException { - removeNamespaceEnvRoleFromUserWithHttpInfo(appId, env, namespaceName, roleType, userId, operator); - } - - /** - * 移除环境Namespace角色 (new added) - * - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse removeNamespaceEnvRoleFromUserWithHttpInfo(String appId, String env, String namespaceName, String roleType, String userId, String operator) throws ApiException { - okhttp3.Call localVarCall = removeNamespaceEnvRoleFromUserValidateBeforeCall(appId, env, namespaceName, roleType, userId, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 移除环境Namespace角色 (new added) (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call removeNamespaceEnvRoleFromUserAsync(String appId, String env, String namespaceName, String roleType, String userId, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = removeNamespaceEnvRoleFromUserValidateBeforeCall(appId, env, namespaceName, roleType, userId, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for removeNamespaceRoleFromUser - * @param appId (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call removeNamespaceRoleFromUserCall(String appId, String namespaceName, String roleType, String userId, 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}/namespaces/{namespaceName}/roles/{roleType}" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "roleType" + "}", localVarApiClient.escapeString(roleType.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)); - } - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call removeNamespaceRoleFromUserValidateBeforeCall(String appId, String namespaceName, String roleType, String userId, 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 removeNamespaceRoleFromUser(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling removeNamespaceRoleFromUser(Async)"); - } - - // verify the required parameter 'roleType' is set - if (roleType == null) { - throw new ApiException("Missing the required parameter 'roleType' when calling removeNamespaceRoleFromUser(Async)"); - } - - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling removeNamespaceRoleFromUser(Async)"); - } - - return removeNamespaceRoleFromUserCall(appId, namespaceName, roleType, userId, operator, _callback); - - } - - /** - * 移除Namespace角色 (new added) - * - * @param appId (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public void removeNamespaceRoleFromUser(String appId, String namespaceName, String roleType, String userId, String operator) throws ApiException { - removeNamespaceRoleFromUserWithHttpInfo(appId, namespaceName, roleType, userId, operator); - } - - /** - * 移除Namespace角色 (new added) - * - * @param appId (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse removeNamespaceRoleFromUserWithHttpInfo(String appId, String namespaceName, String roleType, String userId, String operator) throws ApiException { - okhttp3.Call localVarCall = removeNamespaceRoleFromUserValidateBeforeCall(appId, namespaceName, roleType, userId, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 移除Namespace角色 (new added) (asynchronously) - * - * @param appId (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call removeNamespaceRoleFromUserAsync(String appId, String namespaceName, String roleType, String userId, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = removeNamespaceRoleFromUserValidateBeforeCall(appId, namespaceName, roleType, userId, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/api/PortalManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/PortalManagementApi.java deleted file mode 100644 index f6707979..00000000 --- a/java-client/src/main/java/org/openapitools/client/api/PortalManagementApi.java +++ /dev/null @@ -1,4945 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import java.io.File; - -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 PortalManagementApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public PortalManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public PortalManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for addFavorite - * @param body (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 addFavoriteCall(Object body, 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 = body; - - // create path and map variables - String localVarPath = "/openapi/v1/favorites"; - - 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 addFavoriteValidateBeforeCall(Object body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling addFavorite(Async)"); - } - - return addFavoriteCall(body, _callback); - - } - - /** - * 添加收藏(new added) - * POST /openapi/v1/favorites - * @param body (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 addFavorite(Object body) throws ApiException { - ApiResponse localVarResp = addFavoriteWithHttpInfo(body); - return localVarResp.getData(); - } - - /** - * 添加收藏(new added) - * POST /openapi/v1/favorites - * @param body (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 addFavoriteWithHttpInfo(Object body) throws ApiException { - okhttp3.Call localVarCall = addFavoriteValidateBeforeCall(body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 添加收藏(new added) (asynchronously) - * POST /openapi/v1/favorites - * @param body (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 addFavoriteAsync(Object body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = addFavoriteValidateBeforeCall(body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for assignRoleToConsumer - * @param token (required) - * @param type (required) - * @param body (required) - * @param envs (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功授权 -
- */ - public okhttp3.Call assignRoleToConsumerCall(String token, String type, Object body, String envs, 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 = body; - - // create path and map variables - String localVarPath = "/openapi/v1/consumers/{token}/assign-role" - .replace("{" + "token" + "}", localVarApiClient.escapeString(token.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (type != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type)); - } - - if (envs != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("envs", envs)); - } - - 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 assignRoleToConsumerValidateBeforeCall(String token, String type, Object body, String envs, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'token' is set - if (token == null) { - throw new ApiException("Missing the required parameter 'token' when calling assignRoleToConsumer(Async)"); - } - - // verify the required parameter 'type' is set - if (type == null) { - throw new ApiException("Missing the required parameter 'type' when calling assignRoleToConsumer(Async)"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling assignRoleToConsumer(Async)"); - } - - return assignRoleToConsumerCall(token, type, body, envs, _callback); - - } - - /** - * 给消费者授权(new added) - * POST /openapi/v1/consumers/{token}/assign-role - * @param token (required) - * @param type (required) - * @param body (required) - * @param envs (optional) - * @return List<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 List assignRoleToConsumer(String token, String type, Object body, String envs) throws ApiException { - ApiResponse> localVarResp = assignRoleToConsumerWithHttpInfo(token, type, body, envs); - return localVarResp.getData(); - } - - /** - * 给消费者授权(new added) - * POST /openapi/v1/consumers/{token}/assign-role - * @param token (required) - * @param type (required) - * @param body (required) - * @param envs (optional) - * @return ApiResponse<List<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> assignRoleToConsumerWithHttpInfo(String token, String type, Object body, String envs) throws ApiException { - okhttp3.Call localVarCall = assignRoleToConsumerValidateBeforeCall(token, type, body, envs, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 给消费者授权(new added) (asynchronously) - * POST /openapi/v1/consumers/{token}/assign-role - * @param token (required) - * @param type (required) - * @param body (required) - * @param envs (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功授权 -
- */ - public okhttp3.Call assignRoleToConsumerAsync(String token, String type, Object body, String envs, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = assignRoleToConsumerValidateBeforeCall(token, type, body, envs, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for checkExportAppConfig - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 可导出 -
- */ - public okhttp3.Call checkExportAppConfigCall(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}/export" - .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 = { - }; - 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, "HEAD", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call checkExportAppConfigValidateBeforeCall(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 checkExportAppConfig(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling checkExportAppConfig(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling checkExportAppConfig(Async)"); - } - - return checkExportAppConfigCall(appId, env, clusterName, _callback); - - } - - /** - * 检查应用配置导出权限(new added) - * HEAD /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 可导出 -
- */ - public void checkExportAppConfig(String appId, String env, String clusterName) throws ApiException { - checkExportAppConfigWithHttpInfo(appId, env, clusterName); - } - - /** - * 检查应用配置导出权限(new added) - * HEAD /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 可导出 -
- */ - public ApiResponse checkExportAppConfigWithHttpInfo(String appId, String env, String clusterName) throws ApiException { - okhttp3.Call localVarCall = checkExportAppConfigValidateBeforeCall(appId, env, clusterName, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 检查应用配置导出权限(new added) (asynchronously) - * HEAD /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 可导出 -
- */ - public okhttp3.Call checkExportAppConfigAsync(String appId, String env, String clusterName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = checkExportAppConfigValidateBeforeCall(appId, env, clusterName, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for checkSystemHealth - * @param instanceId (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 checkSystemHealthCall(String instanceId, 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/system-info/health"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (instanceId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("instanceId", instanceId)); - } - - 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 checkSystemHealthValidateBeforeCall(String instanceId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'instanceId' is set - if (instanceId == null) { - throw new ApiException("Missing the required parameter 'instanceId' when calling checkSystemHealth(Async)"); - } - - return checkSystemHealthCall(instanceId, _callback); - - } - - /** - * 检查系统实例健康状态(new added) - * GET /openapi/v1/system-info/health - * @param instanceId (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 checkSystemHealth(String instanceId) throws ApiException { - ApiResponse localVarResp = checkSystemHealthWithHttpInfo(instanceId); - return localVarResp.getData(); - } - - /** - * 检查系统实例健康状态(new added) - * GET /openapi/v1/system-info/health - * @param instanceId (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 checkSystemHealthWithHttpInfo(String instanceId) throws ApiException { - okhttp3.Call localVarCall = checkSystemHealthValidateBeforeCall(instanceId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 检查系统实例健康状态(new added) (asynchronously) - * GET /openapi/v1/system-info/health - * @param instanceId (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 checkSystemHealthAsync(String instanceId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = checkSystemHealthValidateBeforeCall(instanceId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createConsumer - * @param body (required) - * @param expires (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功创建消费者 -
- */ - public okhttp3.Call createConsumerCall(Object body, String expires, 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 = body; - - // create path and map variables - String localVarPath = "/openapi/v1/consumers"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (expires != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("expires", expires)); - } - - 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 createConsumerValidateBeforeCall(Object body, String expires, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling createConsumer(Async)"); - } - - return createConsumerCall(body, expires, _callback); - - } - - /** - * 创建开放平台消费者(new added) - * POST /openapi/v1/consumers - * @param body (required) - * @param expires (optional) - * @return Object - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功创建消费者 -
- */ - public Object createConsumer(Object body, String expires) throws ApiException { - ApiResponse localVarResp = createConsumerWithHttpInfo(body, expires); - return localVarResp.getData(); - } - - /** - * 创建开放平台消费者(new added) - * POST /openapi/v1/consumers - * @param body (required) - * @param expires (optional) - * @return ApiResponse<Object> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功创建消费者 -
- */ - public ApiResponse createConsumerWithHttpInfo(Object body, String expires) throws ApiException { - okhttp3.Call localVarCall = createConsumerValidateBeforeCall(body, expires, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 创建开放平台消费者(new added) (asynchronously) - * POST /openapi/v1/consumers - * @param body (required) - * @param expires (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功创建消费者 -
- */ - public okhttp3.Call createConsumerAsync(Object body, String expires, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createConsumerValidateBeforeCall(body, expires, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createOrUpdateConfigDBConfig - * @param env (required) - * @param body (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 createOrUpdateConfigDBConfigCall(String env, Object body, 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 = body; - - // create path and map variables - String localVarPath = "/openapi/v1/server/envs/{env}/config-db/config" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createOrUpdateConfigDBConfigValidateBeforeCall(String env, Object body, 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 createOrUpdateConfigDBConfig(Async)"); - } - - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling createOrUpdateConfigDBConfig(Async)"); - } - - return createOrUpdateConfigDBConfigCall(env, body, _callback); - - } - - /** - * 创建或更新Config DB配置(new added) - * POST /openapi/v1/server/envs/{env}/config-db/config - * @param env (required) - * @param body (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 createOrUpdateConfigDBConfig(String env, Object body) throws ApiException { - ApiResponse localVarResp = createOrUpdateConfigDBConfigWithHttpInfo(env, body); - return localVarResp.getData(); - } - - /** - * 创建或更新Config DB配置(new added) - * POST /openapi/v1/server/envs/{env}/config-db/config - * @param env (required) - * @param body (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 createOrUpdateConfigDBConfigWithHttpInfo(String env, Object body) throws ApiException { - okhttp3.Call localVarCall = createOrUpdateConfigDBConfigValidateBeforeCall(env, body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 创建或更新Config DB配置(new added) (asynchronously) - * POST /openapi/v1/server/envs/{env}/config-db/config - * @param env (required) - * @param body (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 createOrUpdateConfigDBConfigAsync(String env, Object body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createOrUpdateConfigDBConfigValidateBeforeCall(env, body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createOrUpdatePortalDBConfig - * @param body (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 createOrUpdatePortalDBConfigCall(Object body, 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 = body; - - // create path and map variables - String localVarPath = "/openapi/v1/server/portal-db/config"; - - 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 createOrUpdatePortalDBConfigValidateBeforeCall(Object body, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'body' is set - if (body == null) { - throw new ApiException("Missing the required parameter 'body' when calling createOrUpdatePortalDBConfig(Async)"); - } - - return createOrUpdatePortalDBConfigCall(body, _callback); - - } - - /** - * 创建或更新Portal DB配置(new added) - * POST /openapi/v1/server/portal-db/config - * @param body (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 createOrUpdatePortalDBConfig(Object body) throws ApiException { - ApiResponse localVarResp = createOrUpdatePortalDBConfigWithHttpInfo(body); - return localVarResp.getData(); - } - - /** - * 创建或更新Portal DB配置(new added) - * POST /openapi/v1/server/portal-db/config - * @param body (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 createOrUpdatePortalDBConfigWithHttpInfo(Object body) throws ApiException { - okhttp3.Call localVarCall = createOrUpdatePortalDBConfigValidateBeforeCall(body, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 创建或更新Portal DB配置(new added) (asynchronously) - * POST /openapi/v1/server/portal-db/config - * @param body (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 createOrUpdatePortalDBConfigAsync(Object body, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createOrUpdatePortalDBConfigValidateBeforeCall(body, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for deleteConfigDBConfig - * @param env (required) - * @param key (required) - * @param cluster (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 deleteConfigDBConfigCall(String env, String key, String cluster, 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/server/envs/{env}/config-db/config" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (key != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("key", key)); - } - - if (cluster != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("cluster", cluster)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteConfigDBConfigValidateBeforeCall(String env, String key, String cluster, 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 deleteConfigDBConfig(Async)"); - } - - // verify the required parameter 'key' is set - if (key == null) { - throw new ApiException("Missing the required parameter 'key' when calling deleteConfigDBConfig(Async)"); - } - - // verify the required parameter 'cluster' is set - if (cluster == null) { - throw new ApiException("Missing the required parameter 'cluster' when calling deleteConfigDBConfig(Async)"); - } - - return deleteConfigDBConfigCall(env, key, cluster, _callback); - - } - - /** - * 删除Config DB配置(new added) - * DELETE /openapi/v1/server/envs/{env}/config-db/config - * @param env (required) - * @param key (required) - * @param cluster (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功删除配置 -
- */ - public void deleteConfigDBConfig(String env, String key, String cluster) throws ApiException { - deleteConfigDBConfigWithHttpInfo(env, key, cluster); - } - - /** - * 删除Config DB配置(new added) - * DELETE /openapi/v1/server/envs/{env}/config-db/config - * @param env (required) - * @param key (required) - * @param cluster (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功删除配置 -
- */ - public ApiResponse deleteConfigDBConfigWithHttpInfo(String env, String key, String cluster) throws ApiException { - okhttp3.Call localVarCall = deleteConfigDBConfigValidateBeforeCall(env, key, cluster, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 删除Config DB配置(new added) (asynchronously) - * DELETE /openapi/v1/server/envs/{env}/config-db/config - * @param env (required) - * @param key (required) - * @param cluster (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 deleteConfigDBConfigAsync(String env, String key, String cluster, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteConfigDBConfigValidateBeforeCall(env, key, cluster, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for deleteConsumer - * @param appId (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功删除消费者 -
- */ - public okhttp3.Call deleteConsumerCall(String appId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/consumers/by-appId"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (appId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("appId", appId)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteConsumerValidateBeforeCall(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 deleteConsumer(Async)"); - } - - return deleteConsumerCall(appId, _callback); - - } - - /** - * 按应用ID删除消费者(new added) - * DELETE /openapi/v1/consumers/by-appId - * @param appId (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功删除消费者 -
- */ - public void deleteConsumer(String appId) throws ApiException { - deleteConsumerWithHttpInfo(appId); - } - - /** - * 按应用ID删除消费者(new added) - * DELETE /openapi/v1/consumers/by-appId - * @param appId (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功删除消费者 -
- */ - public ApiResponse deleteConsumerWithHttpInfo(String appId) throws ApiException { - okhttp3.Call localVarCall = deleteConsumerValidateBeforeCall(appId, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 按应用ID删除消费者(new added) (asynchronously) - * DELETE /openapi/v1/consumers/by-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 - - - -
Status Code Description Response Headers
200 成功删除消费者 -
- */ - public okhttp3.Call deleteConsumerAsync(String appId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteConsumerValidateBeforeCall(appId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for deleteFavorite - * @param favoriteId (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 deleteFavoriteCall(Long favoriteId, 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/favorites/{favoriteId}" - .replace("{" + "favoriteId" + "}", localVarApiClient.escapeString(favoriteId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deleteFavoriteValidateBeforeCall(Long favoriteId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'favoriteId' is set - if (favoriteId == null) { - throw new ApiException("Missing the required parameter 'favoriteId' when calling deleteFavorite(Async)"); - } - - return deleteFavoriteCall(favoriteId, _callback); - - } - - /** - * 删除收藏(new added) - * DELETE /openapi/v1/favorites/{favoriteId} - * @param favoriteId (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功删除收藏 -
- */ - public void deleteFavorite(Long favoriteId) throws ApiException { - deleteFavoriteWithHttpInfo(favoriteId); - } - - /** - * 删除收藏(new added) - * DELETE /openapi/v1/favorites/{favoriteId} - * @param favoriteId (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功删除收藏 -
- */ - public ApiResponse deleteFavoriteWithHttpInfo(Long favoriteId) throws ApiException { - okhttp3.Call localVarCall = deleteFavoriteValidateBeforeCall(favoriteId, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 删除收藏(new added) (asynchronously) - * DELETE /openapi/v1/favorites/{favoriteId} - * @param favoriteId (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 deleteFavoriteAsync(Long favoriteId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deleteFavoriteValidateBeforeCall(favoriteId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for deletePortalDBConfig - * @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 - - - -
Status Code Description Response Headers
200 成功删除配置 -
- */ - public okhttp3.Call deletePortalDBConfigCall(String key, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/server/portal-db/config"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (key != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("key", key)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call deletePortalDBConfigValidateBeforeCall(String key, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'key' is set - if (key == null) { - throw new ApiException("Missing the required parameter 'key' when calling deletePortalDBConfig(Async)"); - } - - return deletePortalDBConfigCall(key, _callback); - - } - - /** - * 删除Portal DB配置(new added) - * DELETE /openapi/v1/server/portal-db/config - * @param key (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功删除配置 -
- */ - public void deletePortalDBConfig(String key) throws ApiException { - deletePortalDBConfigWithHttpInfo(key); - } - - /** - * 删除Portal DB配置(new added) - * DELETE /openapi/v1/server/portal-db/config - * @param key (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功删除配置 -
- */ - public ApiResponse deletePortalDBConfigWithHttpInfo(String key) throws ApiException { - okhttp3.Call localVarCall = deletePortalDBConfigValidateBeforeCall(key, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 删除Portal DB配置(new added) (asynchronously) - * DELETE /openapi/v1/server/portal-db/config - * @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 - - - -
Status Code Description Response Headers
200 成功删除配置 -
- */ - public okhttp3.Call deletePortalDBConfigAsync(String key, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = deletePortalDBConfigValidateBeforeCall(key, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for exportAllConfigs - * @param envs (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 exportAllConfigsCall(String envs, 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/configs/export"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (envs != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("envs", envs)); - } - - final String[] localVarAccepts = { - "application/octet-stream" - }; - 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 exportAllConfigsValidateBeforeCall(String envs, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'envs' is set - if (envs == null) { - throw new ApiException("Missing the required parameter 'envs' when calling exportAllConfigs(Async)"); - } - - return exportAllConfigsCall(envs, _callback); - - } - - /** - * 导出所有配置(new added) - * GET /openapi/v1/configs/export - * @param envs (required) - * @return File - * @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 File exportAllConfigs(String envs) throws ApiException { - ApiResponse localVarResp = exportAllConfigsWithHttpInfo(envs); - return localVarResp.getData(); - } - - /** - * 导出所有配置(new added) - * GET /openapi/v1/configs/export - * @param envs (required) - * @return ApiResponse<File> - * @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 exportAllConfigsWithHttpInfo(String envs) throws ApiException { - okhttp3.Call localVarCall = exportAllConfigsValidateBeforeCall(envs, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 导出所有配置(new added) (asynchronously) - * GET /openapi/v1/configs/export - * @param envs (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 exportAllConfigsAsync(String envs, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = exportAllConfigsValidateBeforeCall(envs, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for exportAppConfig - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功导出应用配置 -
- */ - public okhttp3.Call exportAppConfigCall(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}/export" - .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/octet-stream" - }; - 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 exportAppConfigValidateBeforeCall(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 exportAppConfig(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling exportAppConfig(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling exportAppConfig(Async)"); - } - - return exportAppConfigCall(appId, env, clusterName, _callback); - - } - - /** - * 导出应用配置(new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @return File - * @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 File exportAppConfig(String appId, String env, String clusterName) throws ApiException { - ApiResponse localVarResp = exportAppConfigWithHttpInfo(appId, env, clusterName); - return localVarResp.getData(); - } - - /** - * 导出应用配置(new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @return ApiResponse<File> - * @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 exportAppConfigWithHttpInfo(String appId, String env, String clusterName) throws ApiException { - okhttp3.Call localVarCall = exportAppConfigValidateBeforeCall(appId, env, clusterName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 导出应用配置(new added) (asynchronously) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功导出应用配置 -
- */ - public okhttp3.Call exportAppConfigAsync(String appId, String env, String clusterName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = exportAppConfigValidateBeforeCall(appId, env, clusterName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for exportNamespaceItems - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功导出命名空间配置项 -
- */ - public okhttp3.Call exportNamespaceItemsCall(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export" - .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/octet-stream" - }; - 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 exportNamespaceItemsValidateBeforeCall(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 exportNamespaceItems(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling exportNamespaceItems(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling exportNamespaceItems(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling exportNamespaceItems(Async)"); - } - - return exportNamespaceItemsCall(appId, env, clusterName, namespaceName, _callback); - - } - - /** - * 导出命名空间配置项(new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return File - * @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 File exportNamespaceItems(String appId, String env, String clusterName, String namespaceName) throws ApiException { - ApiResponse localVarResp = exportNamespaceItemsWithHttpInfo(appId, env, clusterName, namespaceName); - return localVarResp.getData(); - } - - /** - * 导出命名空间配置项(new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return ApiResponse<File> - * @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 exportNamespaceItemsWithHttpInfo(String appId, String env, String clusterName, String namespaceName) throws ApiException { - okhttp3.Call localVarCall = exportNamespaceItemsValidateBeforeCall(appId, env, clusterName, namespaceName, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 导出命名空间配置项(new added) (asynchronously) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功导出命名空间配置项 -
- */ - public okhttp3.Call exportNamespaceItemsAsync(String appId, String env, String clusterName, String namespaceName, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = exportNamespaceItemsValidateBeforeCall(appId, env, clusterName, namespaceName, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findAllConfigDBConfig - * @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 - - - -
Status Code Description Response Headers
200 成功获取配置列表 -
- */ - public okhttp3.Call findAllConfigDBConfigCall(String env, 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/server/envs/{env}/config-db/config/find-all-config" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - 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 findAllConfigDBConfigValidateBeforeCall(String env, 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 findAllConfigDBConfig(Async)"); - } - - return findAllConfigDBConfigCall(env, _callback); - - } - - /** - * 查询指定环境全部Config DB配置(new added) - * GET /openapi/v1/server/envs/{env}/config-db/config/find-all-config - * @param env (required) - * @return List<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 List findAllConfigDBConfig(String env) throws ApiException { - ApiResponse> localVarResp = findAllConfigDBConfigWithHttpInfo(env); - return localVarResp.getData(); - } - - /** - * 查询指定环境全部Config DB配置(new added) - * GET /openapi/v1/server/envs/{env}/config-db/config/find-all-config - * @param env (required) - * @return ApiResponse<List<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> findAllConfigDBConfigWithHttpInfo(String env) throws ApiException { - okhttp3.Call localVarCall = findAllConfigDBConfigValidateBeforeCall(env, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 查询指定环境全部Config DB配置(new added) (asynchronously) - * GET /openapi/v1/server/envs/{env}/config-db/config/find-all-config - * @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 - - - -
Status Code Description Response Headers
200 成功获取配置列表 -
- */ - public okhttp3.Call findAllConfigDBConfigAsync(String env, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = findAllConfigDBConfigValidateBeforeCall(env, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findAllPortalDBConfig - * @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 findAllPortalDBConfigCall(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/server/portal-db/config/find-all-config"; - - 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 findAllPortalDBConfigValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return findAllPortalDBConfigCall(_callback); - - } - - /** - * 查询全部Portal DB配置(new added) - * GET /openapi/v1/server/portal-db/config/find-all-config - * @return List<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 List findAllPortalDBConfig() throws ApiException { - ApiResponse> localVarResp = findAllPortalDBConfigWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * 查询全部Portal DB配置(new added) - * GET /openapi/v1/server/portal-db/config/find-all-config - * @return ApiResponse<List<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> findAllPortalDBConfigWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = findAllPortalDBConfigValidateBeforeCall(null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 查询全部Portal DB配置(new added) (asynchronously) - * GET /openapi/v1/server/portal-db/config/find-all-config - * @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 findAllPortalDBConfigAsync(final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = findAllPortalDBConfigValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findAuditDataInfluencesByField - * @param entityName (required) - * @param entityId (required) - * @param fieldName (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @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 findAuditDataInfluencesByFieldCall(String entityName, String entityId, String fieldName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apollo/audit/logs/dataInfluences/field"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (entityName != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("entityName", entityName)); - } - - if (entityId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("entityId", entityId)); - } - - if (fieldName != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("fieldName", fieldName)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (size != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findAuditDataInfluencesByFieldValidateBeforeCall(String entityName, String entityId, String fieldName, Integer page, Integer size, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'entityName' is set - if (entityName == null) { - throw new ApiException("Missing the required parameter 'entityName' when calling findAuditDataInfluencesByField(Async)"); - } - - // verify the required parameter 'entityId' is set - if (entityId == null) { - throw new ApiException("Missing the required parameter 'entityId' when calling findAuditDataInfluencesByField(Async)"); - } - - // verify the required parameter 'fieldName' is set - if (fieldName == null) { - throw new ApiException("Missing the required parameter 'fieldName' when calling findAuditDataInfluencesByField(Async)"); - } - - return findAuditDataInfluencesByFieldCall(entityName, entityId, fieldName, page, size, _callback); - - } - - /** - * 查询审计数据影响(new added) - * GET /openapi/v1/apollo/audit/logs/dataInfluences/field - * @param entityName (required) - * @param entityId (required) - * @param fieldName (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return List<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 List findAuditDataInfluencesByField(String entityName, String entityId, String fieldName, Integer page, Integer size) throws ApiException { - ApiResponse> localVarResp = findAuditDataInfluencesByFieldWithHttpInfo(entityName, entityId, fieldName, page, size); - return localVarResp.getData(); - } - - /** - * 查询审计数据影响(new added) - * GET /openapi/v1/apollo/audit/logs/dataInfluences/field - * @param entityName (required) - * @param entityId (required) - * @param fieldName (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return ApiResponse<List<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> findAuditDataInfluencesByFieldWithHttpInfo(String entityName, String entityId, String fieldName, Integer page, Integer size) throws ApiException { - okhttp3.Call localVarCall = findAuditDataInfluencesByFieldValidateBeforeCall(entityName, entityId, fieldName, page, size, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 查询审计数据影响(new added) (asynchronously) - * GET /openapi/v1/apollo/audit/logs/dataInfluences/field - * @param entityName (required) - * @param entityId (required) - * @param fieldName (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @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 findAuditDataInfluencesByFieldAsync(String entityName, String entityId, String fieldName, Integer page, Integer size, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = findAuditDataInfluencesByFieldValidateBeforeCall(entityName, entityId, fieldName, page, size, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findAuditLogs - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @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 findAuditLogsCall(Integer page, Integer size, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apollo/audit/logs"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (size != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findAuditLogsValidateBeforeCall(Integer page, Integer size, final ApiCallback _callback) throws ApiException { - return findAuditLogsCall(page, size, _callback); - - } - - /** - * 查询审计日志(new added) - * GET /openapi/v1/apollo/audit/logs - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return List<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 List findAuditLogs(Integer page, Integer size) throws ApiException { - ApiResponse> localVarResp = findAuditLogsWithHttpInfo(page, size); - return localVarResp.getData(); - } - - /** - * 查询审计日志(new added) - * GET /openapi/v1/apollo/audit/logs - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return ApiResponse<List<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> findAuditLogsWithHttpInfo(Integer page, Integer size) throws ApiException { - okhttp3.Call localVarCall = findAuditLogsValidateBeforeCall(page, size, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 查询审计日志(new added) (asynchronously) - * GET /openapi/v1/apollo/audit/logs - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @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 findAuditLogsAsync(Integer page, Integer size, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = findAuditLogsValidateBeforeCall(page, size, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findAuditLogsByOpName - * @param opName (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @param startDate (optional) - * @param endDate (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取审计日志 -
- */ - public okhttp3.Call findAuditLogsByOpNameCall(String opName, Integer page, Integer size, String startDate, String endDate, 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/apollo/audit/logs/opName"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (opName != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("opName", opName)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (size != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); - } - - if (startDate != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("startDate", startDate)); - } - - if (endDate != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("endDate", endDate)); - } - - 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 findAuditLogsByOpNameValidateBeforeCall(String opName, Integer page, Integer size, String startDate, String endDate, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'opName' is set - if (opName == null) { - throw new ApiException("Missing the required parameter 'opName' when calling findAuditLogsByOpName(Async)"); - } - - return findAuditLogsByOpNameCall(opName, page, size, startDate, endDate, _callback); - - } - - /** - * 按操作名查询审计日志(new added) - * GET /openapi/v1/apollo/audit/logs/opName - * @param opName (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @param startDate (optional) - * @param endDate (optional) - * @return List<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 List findAuditLogsByOpName(String opName, Integer page, Integer size, String startDate, String endDate) throws ApiException { - ApiResponse> localVarResp = findAuditLogsByOpNameWithHttpInfo(opName, page, size, startDate, endDate); - return localVarResp.getData(); - } - - /** - * 按操作名查询审计日志(new added) - * GET /openapi/v1/apollo/audit/logs/opName - * @param opName (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @param startDate (optional) - * @param endDate (optional) - * @return ApiResponse<List<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> findAuditLogsByOpNameWithHttpInfo(String opName, Integer page, Integer size, String startDate, String endDate) throws ApiException { - okhttp3.Call localVarCall = findAuditLogsByOpNameValidateBeforeCall(opName, page, size, startDate, endDate, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 按操作名查询审计日志(new added) (asynchronously) - * GET /openapi/v1/apollo/audit/logs/opName - * @param opName (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @param startDate (optional) - * @param endDate (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取审计日志 -
- */ - public okhttp3.Call findAuditLogsByOpNameAsync(String opName, Integer page, Integer size, String startDate, String endDate, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = findAuditLogsByOpNameValidateBeforeCall(opName, page, size, startDate, endDate, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findAuditTraceDetails - * @param traceId (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 findAuditTraceDetailsCall(String traceId, 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/apollo/audit/trace"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (traceId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("traceId", traceId)); - } - - 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 findAuditTraceDetailsValidateBeforeCall(String traceId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'traceId' is set - if (traceId == null) { - throw new ApiException("Missing the required parameter 'traceId' when calling findAuditTraceDetails(Async)"); - } - - return findAuditTraceDetailsCall(traceId, _callback); - - } - - /** - * 查询审计链路详情(new added) - * GET /openapi/v1/apollo/audit/trace - * @param traceId (required) - * @return List<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 List findAuditTraceDetails(String traceId) throws ApiException { - ApiResponse> localVarResp = findAuditTraceDetailsWithHttpInfo(traceId); - return localVarResp.getData(); - } - - /** - * 查询审计链路详情(new added) - * GET /openapi/v1/apollo/audit/trace - * @param traceId (required) - * @return ApiResponse<List<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> findAuditTraceDetailsWithHttpInfo(String traceId) throws ApiException { - okhttp3.Call localVarCall = findAuditTraceDetailsValidateBeforeCall(traceId, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 查询审计链路详情(new added) (asynchronously) - * GET /openapi/v1/apollo/audit/trace - * @param traceId (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 findAuditTraceDetailsAsync(String traceId, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = findAuditTraceDetailsValidateBeforeCall(traceId, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findCommits - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (optional) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @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 findCommitsCall(String appId, String env, String clusterName, String namespaceName, String key, Integer page, Integer size, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits" - .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 (key != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("key", key)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (size != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findCommitsValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String key, 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 findCommits(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling findCommits(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling findCommits(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling findCommits(Async)"); - } - - return findCommitsCall(appId, env, clusterName, namespaceName, key, page, size, _callback); - - } - - /** - * 查询命名空间提交记录(new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (optional) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return List<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 List findCommits(String appId, String env, String clusterName, String namespaceName, String key, Integer page, Integer size) throws ApiException { - ApiResponse> localVarResp = findCommitsWithHttpInfo(appId, env, clusterName, namespaceName, key, page, size); - return localVarResp.getData(); - } - - /** - * 查询命名空间提交记录(new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (optional) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return ApiResponse<List<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> findCommitsWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String key, Integer page, Integer size) throws ApiException { - okhttp3.Call localVarCall = findCommitsValidateBeforeCall(appId, env, clusterName, namespaceName, key, page, size, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 查询命名空间提交记录(new added) (asynchronously) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (optional) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @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 findCommitsAsync(String appId, String env, String clusterName, String namespaceName, String key, Integer page, Integer size, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = findCommitsValidateBeforeCall(appId, env, clusterName, namespaceName, key, page, size, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findFavorites - * @param userId (optional) - * @param appId (optional) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @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 findFavoritesCall(String userId, String appId, Integer page, Integer size, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/favorites"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (userId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("userId", userId)); - } - - if (appId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("appId", appId)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (size != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findFavoritesValidateBeforeCall(String userId, String appId, Integer page, Integer size, final ApiCallback _callback) throws ApiException { - return findFavoritesCall(userId, appId, page, size, _callback); - - } - - /** - * 查询收藏(new added) - * GET /openapi/v1/favorites - * @param userId (optional) - * @param appId (optional) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return List<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 List findFavorites(String userId, String appId, Integer page, Integer size) throws ApiException { - ApiResponse> localVarResp = findFavoritesWithHttpInfo(userId, appId, page, size); - return localVarResp.getData(); - } - - /** - * 查询收藏(new added) - * GET /openapi/v1/favorites - * @param userId (optional) - * @param appId (optional) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return ApiResponse<List<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> findFavoritesWithHttpInfo(String userId, String appId, Integer page, Integer size) throws ApiException { - okhttp3.Call localVarCall = findFavoritesValidateBeforeCall(userId, appId, page, size, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 查询收藏(new added) (asynchronously) - * GET /openapi/v1/favorites - * @param userId (optional) - * @param appId (optional) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @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 findFavoritesAsync(String userId, String appId, Integer page, Integer size, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = findFavoritesValidateBeforeCall(userId, appId, page, size, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for findReleaseHistoriesByNamespace - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @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 findReleaseHistoriesByNamespaceCall(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[] { }; - - // 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}/releases/histories" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (size != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call findReleaseHistoriesByNamespaceValidateBeforeCall(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 findReleaseHistoriesByNamespace(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling findReleaseHistoriesByNamespace(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling findReleaseHistoriesByNamespace(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling findReleaseHistoriesByNamespace(Async)"); - } - - return findReleaseHistoriesByNamespaceCall(appId, env, clusterName, namespaceName, page, size, _callback); - - } - - /** - * 查询命名空间发布历史(new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return List<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 List findReleaseHistoriesByNamespace(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size) throws ApiException { - ApiResponse> localVarResp = findReleaseHistoriesByNamespaceWithHttpInfo(appId, env, clusterName, namespaceName, page, size); - return localVarResp.getData(); - } - - /** - * 查询命名空间发布历史(new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return ApiResponse<List<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> findReleaseHistoriesByNamespaceWithHttpInfo(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size) throws ApiException { - okhttp3.Call localVarCall = findReleaseHistoriesByNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 查询命名空间发布历史(new added) (asynchronously) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @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 findReleaseHistoriesByNamespaceAsync(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = findReleaseHistoriesByNamespaceValidateBeforeCall(appId, env, clusterName, namespaceName, page, size, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getAuditProperties - * @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 getAuditPropertiesCall(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/apollo/audit/properties"; - - 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 getAuditPropertiesValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getAuditPropertiesCall(_callback); - - } - - /** - * 获取审计配置(new added) - * GET /openapi/v1/apollo/audit/properties - * @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 getAuditProperties() throws ApiException { - ApiResponse localVarResp = getAuditPropertiesWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * 获取审计配置(new added) - * GET /openapi/v1/apollo/audit/properties - * @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 getAuditPropertiesWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getAuditPropertiesValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取审计配置(new added) (asynchronously) - * GET /openapi/v1/apollo/audit/properties - * @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 getAuditPropertiesAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getAuditPropertiesValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getConsumerList - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @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 getConsumerListCall(Integer page, Integer size, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/consumers"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (size != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getConsumerListValidateBeforeCall(Integer page, Integer size, final ApiCallback _callback) throws ApiException { - return getConsumerListCall(page, size, _callback); - - } - - /** - * 查询开放平台消费者列表(new added) - * GET /openapi/v1/consumers - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return List<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 List getConsumerList(Integer page, Integer size) throws ApiException { - ApiResponse> localVarResp = getConsumerListWithHttpInfo(page, size); - return localVarResp.getData(); - } - - /** - * 查询开放平台消费者列表(new added) - * GET /openapi/v1/consumers - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return ApiResponse<List<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> getConsumerListWithHttpInfo(Integer page, Integer size) throws ApiException { - okhttp3.Call localVarCall = getConsumerListValidateBeforeCall(page, size, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 查询开放平台消费者列表(new added) (asynchronously) - * GET /openapi/v1/consumers - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @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 getConsumerListAsync(Integer page, Integer size, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = getConsumerListValidateBeforeCall(page, size, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getConsumerTokenByAppId - * @param appId (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 成功获取消费者Token -
- */ - public okhttp3.Call getConsumerTokenByAppIdCall(String appId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/consumer-tokens/by-appId"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (appId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("appId", appId)); - } - - 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 getConsumerTokenByAppIdValidateBeforeCall(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 getConsumerTokenByAppId(Async)"); - } - - return getConsumerTokenByAppIdCall(appId, _callback); - - } - - /** - * 按应用ID查询消费者Token(new added) - * GET /openapi/v1/consumer-tokens/by-appId - * @param appId (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 成功获取消费者Token -
- */ - public Object getConsumerTokenByAppId(String appId) throws ApiException { - ApiResponse localVarResp = getConsumerTokenByAppIdWithHttpInfo(appId); - return localVarResp.getData(); - } - - /** - * 按应用ID查询消费者Token(new added) - * GET /openapi/v1/consumer-tokens/by-appId - * @param appId (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 成功获取消费者Token -
- */ - public ApiResponse getConsumerTokenByAppIdWithHttpInfo(String appId) throws ApiException { - okhttp3.Call localVarCall = getConsumerTokenByAppIdValidateBeforeCall(appId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 按应用ID查询消费者Token(new added) (asynchronously) - * GET /openapi/v1/consumer-tokens/by-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 - - - -
Status Code Description Response Headers
200 成功获取消费者Token -
- */ - public okhttp3.Call getConsumerTokenByAppIdAsync(String appId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getConsumerTokenByAppIdValidateBeforeCall(appId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getPageSettings - * @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 getPageSettingsCall(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/page-settings"; - - 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 getPageSettingsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getPageSettingsCall(_callback); - - } - - /** - * 获取Portal页面配置(new added) - * GET /openapi/v1/page-settings - * @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 getPageSettings() throws ApiException { - ApiResponse localVarResp = getPageSettingsWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * 获取Portal页面配置(new added) - * GET /openapi/v1/page-settings - * @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 getPageSettingsWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getPageSettingsValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取Portal页面配置(new added) (asynchronously) - * GET /openapi/v1/page-settings - * @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 getPageSettingsAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getPageSettingsValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getSystemInfo - * @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 getSystemInfoCall(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/system-info"; - - 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 getSystemInfoValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getSystemInfoCall(_callback); - - } - - /** - * 获取系统信息(new added) - * GET /openapi/v1/system-info - * @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 getSystemInfo() throws ApiException { - ApiResponse localVarResp = getSystemInfoWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * 获取系统信息(new added) - * GET /openapi/v1/system-info - * @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 getSystemInfoWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getSystemInfoValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取系统信息(new added) (asynchronously) - * GET /openapi/v1/system-info - * @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 getSystemInfoAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getSystemInfoValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for importAllConfigs - * @param envs (required) - * @param conflictAction (optional, default to ignore) - * @param _file (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 导入成功 -
- */ - public okhttp3.Call importAllConfigsCall(String envs, String conflictAction, File _file, 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/configs/import"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (_file != null) { - localVarFormParams.put("file", _file); - } - - if (envs != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("envs", envs)); - } - - if (conflictAction != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("conflictAction", conflictAction)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "multipart/form-data" - }; - 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 importAllConfigsValidateBeforeCall(String envs, String conflictAction, File _file, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'envs' is set - if (envs == null) { - throw new ApiException("Missing the required parameter 'envs' when calling importAllConfigs(Async)"); - } - - return importAllConfigsCall(envs, conflictAction, _file, _callback); - - } - - /** - * 导入所有配置(new added) - * POST /openapi/v1/configs/import - * @param envs (required) - * @param conflictAction (optional, default to ignore) - * @param _file (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 导入成功 -
- */ - public void importAllConfigs(String envs, String conflictAction, File _file) throws ApiException { - importAllConfigsWithHttpInfo(envs, conflictAction, _file); - } - - /** - * 导入所有配置(new added) - * POST /openapi/v1/configs/import - * @param envs (required) - * @param conflictAction (optional, default to ignore) - * @param _file (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 导入成功 -
- */ - public ApiResponse importAllConfigsWithHttpInfo(String envs, String conflictAction, File _file) throws ApiException { - okhttp3.Call localVarCall = importAllConfigsValidateBeforeCall(envs, conflictAction, _file, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 导入所有配置(new added) (asynchronously) - * POST /openapi/v1/configs/import - * @param envs (required) - * @param conflictAction (optional, default to ignore) - * @param _file (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 导入成功 -
- */ - public okhttp3.Call importAllConfigsAsync(String envs, String conflictAction, File _file, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = importAllConfigsValidateBeforeCall(envs, conflictAction, _file, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for importAppConfig - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param conflictAction (optional, default to ignore) - * @param _file (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 导入成功 -
- */ - public okhttp3.Call importAppConfigCall(String appId, String env, String clusterName, String conflictAction, File _file, 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}/import" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (_file != null) { - localVarFormParams.put("file", _file); - } - - if (conflictAction != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("conflictAction", conflictAction)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "multipart/form-data" - }; - 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 importAppConfigValidateBeforeCall(String appId, String env, String clusterName, String conflictAction, File _file, 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 importAppConfig(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling importAppConfig(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling importAppConfig(Async)"); - } - - return importAppConfigCall(appId, env, clusterName, conflictAction, _file, _callback); - - } - - /** - * 导入应用配置(new added) - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param conflictAction (optional, default to ignore) - * @param _file (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 导入成功 -
- */ - public void importAppConfig(String appId, String env, String clusterName, String conflictAction, File _file) throws ApiException { - importAppConfigWithHttpInfo(appId, env, clusterName, conflictAction, _file); - } - - /** - * 导入应用配置(new added) - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param conflictAction (optional, default to ignore) - * @param _file (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 导入成功 -
- */ - public ApiResponse importAppConfigWithHttpInfo(String appId, String env, String clusterName, String conflictAction, File _file) throws ApiException { - okhttp3.Call localVarCall = importAppConfigValidateBeforeCall(appId, env, clusterName, conflictAction, _file, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 导入应用配置(new added) (asynchronously) - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param conflictAction (optional, default to ignore) - * @param _file (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 导入成功 -
- */ - public okhttp3.Call importAppConfigAsync(String appId, String env, String clusterName, String conflictAction, File _file, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = importAppConfigValidateBeforeCall(appId, env, clusterName, conflictAction, _file, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for importConfig - * @param envs (required) - * @param conflictAction (optional, default to ignore) - * @param _file (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 导入成功 -
- */ - public okhttp3.Call importConfigCall(String envs, String conflictAction, File _file, 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/import"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (_file != null) { - localVarFormParams.put("file", _file); - } - - if (envs != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("envs", envs)); - } - - if (conflictAction != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("conflictAction", conflictAction)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "multipart/form-data" - }; - 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 importConfigValidateBeforeCall(String envs, String conflictAction, File _file, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'envs' is set - if (envs == null) { - throw new ApiException("Missing the required parameter 'envs' when calling importConfig(Async)"); - } - - return importConfigCall(envs, conflictAction, _file, _callback); - - } - - /** - * 导入配置兼容入口(new added) - * POST /openapi/v1/import - * @param envs (required) - * @param conflictAction (optional, default to ignore) - * @param _file (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 导入成功 -
- */ - public void importConfig(String envs, String conflictAction, File _file) throws ApiException { - importConfigWithHttpInfo(envs, conflictAction, _file); - } - - /** - * 导入配置兼容入口(new added) - * POST /openapi/v1/import - * @param envs (required) - * @param conflictAction (optional, default to ignore) - * @param _file (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 导入成功 -
- */ - public ApiResponse importConfigWithHttpInfo(String envs, String conflictAction, File _file) throws ApiException { - okhttp3.Call localVarCall = importConfigValidateBeforeCall(envs, conflictAction, _file, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 导入配置兼容入口(new added) (asynchronously) - * POST /openapi/v1/import - * @param envs (required) - * @param conflictAction (optional, default to ignore) - * @param _file (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 导入成功 -
- */ - public okhttp3.Call importConfigAsync(String envs, String conflictAction, File _file, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = importConfigValidateBeforeCall(envs, conflictAction, _file, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for importNamespaceItems - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param _file (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 导入成功 -
- */ - public okhttp3.Call importNamespaceItemsCall(String appId, String env, String clusterName, String namespaceName, File _file, 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}/items/import" - .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 (_file != null) { - localVarFormParams.put("file", _file); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "multipart/form-data" - }; - 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 importNamespaceItemsValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, File _file, 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 importNamespaceItems(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling importNamespaceItems(Async)"); - } - - // verify the required parameter 'clusterName' is set - if (clusterName == null) { - throw new ApiException("Missing the required parameter 'clusterName' when calling importNamespaceItems(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling importNamespaceItems(Async)"); - } - - return importNamespaceItemsCall(appId, env, clusterName, namespaceName, _file, _callback); - - } - - /** - * 导入命名空间配置项(new added) - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param _file (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 导入成功 -
- */ - public void importNamespaceItems(String appId, String env, String clusterName, String namespaceName, File _file) throws ApiException { - importNamespaceItemsWithHttpInfo(appId, env, clusterName, namespaceName, _file); - } - - /** - * 导入命名空间配置项(new added) - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param _file (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 导入成功 -
- */ - public ApiResponse importNamespaceItemsWithHttpInfo(String appId, String env, String clusterName, String namespaceName, File _file) throws ApiException { - okhttp3.Call localVarCall = importNamespaceItemsValidateBeforeCall(appId, env, clusterName, namespaceName, _file, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 导入命名空间配置项(new added) (asynchronously) - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param _file (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 导入成功 -
- */ - public okhttp3.Call importNamespaceItemsAsync(String appId, String env, String clusterName, String namespaceName, File _file, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = importNamespaceItemsValidateBeforeCall(appId, env, clusterName, namespaceName, _file, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - /** - * Build call for searchAppsByAppIdOrName - * @param query (optional) - * @param page (optional, default to 0) - * @param size (optional, default to 20) - * @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 searchAppsByAppIdOrNameCall(String query, Integer page, Integer size, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apps/search/by-appid-or-name"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (query != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("query", query)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (size != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call searchAppsByAppIdOrNameValidateBeforeCall(String query, Integer page, Integer size, final ApiCallback _callback) throws ApiException { - return searchAppsByAppIdOrNameCall(query, page, size, _callback); - - } - - /** - * 按应用ID或名称搜索应用(new added) - * GET /openapi/v1/apps/search/by-appid-or-name - * @param query (optional) - * @param page (optional, default to 0) - * @param size (optional, default to 20) - * @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 searchAppsByAppIdOrName(String query, Integer page, Integer size) throws ApiException { - ApiResponse localVarResp = searchAppsByAppIdOrNameWithHttpInfo(query, page, size); - return localVarResp.getData(); - } - - /** - * 按应用ID或名称搜索应用(new added) - * GET /openapi/v1/apps/search/by-appid-or-name - * @param query (optional) - * @param page (optional, default to 0) - * @param size (optional, default to 20) - * @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 searchAppsByAppIdOrNameWithHttpInfo(String query, Integer page, Integer size) throws ApiException { - okhttp3.Call localVarCall = searchAppsByAppIdOrNameValidateBeforeCall(query, page, size, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 按应用ID或名称搜索应用(new added) (asynchronously) - * GET /openapi/v1/apps/search/by-appid-or-name - * @param query (optional) - * @param page (optional, default to 0) - * @param size (optional, default to 20) - * @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 searchAppsByAppIdOrNameAsync(String query, Integer page, Integer size, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = searchAppsByAppIdOrNameValidateBeforeCall(query, page, size, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for searchAuditLogs - * @param query (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @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 searchAuditLogsCall(String query, Integer page, Integer size, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/apollo/audit/logs/by-name-or-type-or-operator"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (query != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("query", query)); - } - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (size != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call searchAuditLogsValidateBeforeCall(String query, Integer page, Integer size, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'query' is set - if (query == null) { - throw new ApiException("Missing the required parameter 'query' when calling searchAuditLogs(Async)"); - } - - return searchAuditLogsCall(query, page, size, _callback); - - } - - /** - * 搜索审计日志(new added) - * GET /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator - * @param query (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return List<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 List searchAuditLogs(String query, Integer page, Integer size) throws ApiException { - ApiResponse> localVarResp = searchAuditLogsWithHttpInfo(query, page, size); - return localVarResp.getData(); - } - - /** - * 搜索审计日志(new added) - * GET /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator - * @param query (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return ApiResponse<List<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> searchAuditLogsWithHttpInfo(String query, Integer page, Integer size) throws ApiException { - okhttp3.Call localVarCall = searchAuditLogsValidateBeforeCall(query, page, size, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 搜索审计日志(new added) (asynchronously) - * GET /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator - * @param query (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @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 searchAuditLogsAsync(String query, Integer page, Integer size, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = searchAuditLogsValidateBeforeCall(query, page, size, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for searchItemInfoByKeyOrValue - * @param key (optional, default to ) - * @param value (optional, default to ) - * @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 searchItemInfoByKeyOrValueCall(String key, String value, 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/global-search/item-info/by-key-or-value"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (key != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("key", key)); - } - - if (value != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("value", value)); - } - - 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 searchItemInfoByKeyOrValueValidateBeforeCall(String key, String value, final ApiCallback _callback) throws ApiException { - return searchItemInfoByKeyOrValueCall(key, value, _callback); - - } - - /** - * 按Key或Value全局搜索配置(new added) - * GET /openapi/v1/global-search/item-info/by-key-or-value - * @param key (optional, default to ) - * @param value (optional, default to ) - * @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 searchItemInfoByKeyOrValue(String key, String value) throws ApiException { - ApiResponse localVarResp = searchItemInfoByKeyOrValueWithHttpInfo(key, value); - return localVarResp.getData(); - } - - /** - * 按Key或Value全局搜索配置(new added) - * GET /openapi/v1/global-search/item-info/by-key-or-value - * @param key (optional, default to ) - * @param value (optional, default to ) - * @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 searchItemInfoByKeyOrValueWithHttpInfo(String key, String value) throws ApiException { - okhttp3.Call localVarCall = searchItemInfoByKeyOrValueValidateBeforeCall(key, value, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 按Key或Value全局搜索配置(new added) (asynchronously) - * GET /openapi/v1/global-search/item-info/by-key-or-value - * @param key (optional, default to ) - * @param value (optional, default to ) - * @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 searchItemInfoByKeyOrValueAsync(String key, String value, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = searchItemInfoByKeyOrValueValidateBeforeCall(key, value, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for topFavorite - * @param favoriteId (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 topFavoriteCall(Long favoriteId, 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/favorites/{favoriteId}" - .replace("{" + "favoriteId" + "}", localVarApiClient.escapeString(favoriteId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call topFavoriteValidateBeforeCall(Long favoriteId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'favoriteId' is set - if (favoriteId == null) { - throw new ApiException("Missing the required parameter 'favoriteId' when calling topFavorite(Async)"); - } - - return topFavoriteCall(favoriteId, _callback); - - } - - /** - * 收藏置顶(new added) - * PUT /openapi/v1/favorites/{favoriteId} - * @param favoriteId (required) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功置顶收藏 -
- */ - public void topFavorite(Long favoriteId) throws ApiException { - topFavoriteWithHttpInfo(favoriteId); - } - - /** - * 收藏置顶(new added) - * PUT /openapi/v1/favorites/{favoriteId} - * @param favoriteId (required) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 成功置顶收藏 -
- */ - public ApiResponse topFavoriteWithHttpInfo(Long favoriteId) throws ApiException { - okhttp3.Call localVarCall = topFavoriteValidateBeforeCall(favoriteId, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 收藏置顶(new added) (asynchronously) - * PUT /openapi/v1/favorites/{favoriteId} - * @param favoriteId (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 topFavoriteAsync(Long favoriteId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = topFavoriteValidateBeforeCall(favoriteId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/api/ReleaseManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/ReleaseManagementApi.java deleted file mode 100644 index 2a1ef8c2..00000000 --- a/java-client/src/main/java/org/openapitools/client/api/ReleaseManagementApi.java +++ /dev/null @@ -1,1382 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.ExceptionResponse; -import org.openapitools.client.model.NamespaceGrayDelReleaseDTO; -import org.openapitools.client.model.NamespaceReleaseDTO; -import org.openapitools.client.model.OpenReleaseDTO; -import org.openapitools.client.model.OpenReleaseDiffDTO; - -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; - private int localHostIndex; - private String localCustomBaseUrl; - - public ReleaseManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public ReleaseManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for compareRelease - * @param env Environment (required) - * @param baseReleaseId The base release ID (required) - * @param toCompareReleaseId The release ID to compare against (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 Successful comparison -
- */ - public okhttp3.Call compareReleaseCall(String env, Long baseReleaseId, Long toCompareReleaseId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/releases/comparison" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (baseReleaseId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("baseReleaseId", baseReleaseId)); - } - - if (toCompareReleaseId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("toCompareReleaseId", toCompareReleaseId)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call compareReleaseValidateBeforeCall(String env, Long baseReleaseId, Long toCompareReleaseId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'env' is set - if (env == null) { - throw new ApiException("Missing the required parameter 'env' when calling compareRelease(Async)"); - } - - // verify the required parameter 'baseReleaseId' is set - if (baseReleaseId == null) { - throw new ApiException("Missing the required parameter 'baseReleaseId' when calling compareRelease(Async)"); - } - - // verify the required parameter 'toCompareReleaseId' is set - if (toCompareReleaseId == null) { - throw new ApiException("Missing the required parameter 'toCompareReleaseId' when calling compareRelease(Async)"); - } - - return compareReleaseCall(env, baseReleaseId, toCompareReleaseId, _callback); - - } - - /** - * Compare two releases - * Get the configuration differences between two releases. - * @param env Environment (required) - * @param baseReleaseId The base release ID (required) - * @param toCompareReleaseId The release ID to compare against (required) - * @return OpenReleaseDiffDTO - * @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 Successful comparison -
- */ - public OpenReleaseDiffDTO compareRelease(String env, Long baseReleaseId, Long toCompareReleaseId) throws ApiException { - ApiResponse localVarResp = compareReleaseWithHttpInfo(env, baseReleaseId, toCompareReleaseId); - return localVarResp.getData(); - } - - /** - * Compare two releases - * Get the configuration differences between two releases. - * @param env Environment (required) - * @param baseReleaseId The base release ID (required) - * @param toCompareReleaseId The release ID to compare against (required) - * @return ApiResponse<OpenReleaseDiffDTO> - * @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 Successful comparison -
- */ - public ApiResponse compareReleaseWithHttpInfo(String env, Long baseReleaseId, Long toCompareReleaseId) throws ApiException { - okhttp3.Call localVarCall = compareReleaseValidateBeforeCall(env, baseReleaseId, toCompareReleaseId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Compare two releases (asynchronously) - * Get the configuration differences between two releases. - * @param env Environment (required) - * @param baseReleaseId The base release ID (required) - * @param toCompareReleaseId The release ID to compare against (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 Successful comparison -
- */ - public okhttp3.Call compareReleaseAsync(String env, Long baseReleaseId, Long toCompareReleaseId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = compareReleaseValidateBeforeCall(env, baseReleaseId, toCompareReleaseId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createGrayDelRelease - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceGrayDelReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call createGrayDelReleaseCall(String appId, String env, String clusterName, String namespaceName, String branchName, NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO, 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 = namespaceGrayDelReleaseDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createGrayDelReleaseValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String branchName, NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO, 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 createGrayDelRelease(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - 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 createGrayDelRelease(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling createGrayDelRelease(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 'namespaceGrayDelReleaseDTO' is set - if (namespaceGrayDelReleaseDTO == null) { - throw new ApiException("Missing the required parameter 'namespaceGrayDelReleaseDTO' when calling createGrayDelRelease(Async)"); - } - - return createGrayDelReleaseCall(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO, operator, _callback); - - } - - /** - * 创建灰度删除发布 (original openapi) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceGrayDelReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @return OpenReleaseDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public OpenReleaseDTO createGrayDelRelease(String appId, String env, String clusterName, String namespaceName, String branchName, NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO, String operator) throws ApiException { - ApiResponse localVarResp = createGrayDelReleaseWithHttpInfo(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO, operator); - return localVarResp.getData(); - } - - /** - * 创建灰度删除发布 (original openapi) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceGrayDelReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<OpenReleaseDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public ApiResponse createGrayDelReleaseWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String branchName, NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO, String operator) throws ApiException { - okhttp3.Call localVarCall = createGrayDelReleaseValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO, operator, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 创建灰度删除发布 (original openapi) (asynchronously) - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceGrayDelReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 -
- */ - public okhttp3.Call createGrayDelReleaseAsync(String appId, String env, String clusterName, String namespaceName, String branchName, NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createGrayDelReleaseValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO, operator, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createGrayRelease - * @param appId app标识 (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param namespaceReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 灰度发布创建成功 -
- */ - public okhttp3.Call createGrayReleaseCall(String appId, String env, String clusterName, String namespaceName, String branchName, NamespaceReleaseDTO namespaceReleaseDTO, 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 = namespaceReleaseDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())) - .replace("{" + "branchName" + "}", localVarApiClient.escapeString(branchName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createGrayReleaseValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, String branchName, NamespaceReleaseDTO namespaceReleaseDTO, 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 createGrayRelease(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - 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 createGrayRelease(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling createGrayRelease(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 'namespaceReleaseDTO' is set - if (namespaceReleaseDTO == null) { - throw new ApiException("Missing the required parameter 'namespaceReleaseDTO' when calling createGrayRelease(Async)"); - } - - return createGrayReleaseCall(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO, operator, _callback); - - } - - /** - * 创建灰度发布 (original openapi) - * 创建灰度发布 - * @param appId app标识 (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param namespaceReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @return OpenReleaseDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 灰度发布创建成功 -
- */ - public OpenReleaseDTO createGrayRelease(String appId, String env, String clusterName, String namespaceName, String branchName, NamespaceReleaseDTO namespaceReleaseDTO, String operator) throws ApiException { - ApiResponse localVarResp = createGrayReleaseWithHttpInfo(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO, operator); - return localVarResp.getData(); - } - - /** - * 创建灰度发布 (original openapi) - * 创建灰度发布 - * @param appId app标识 (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param namespaceReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<OpenReleaseDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 灰度发布创建成功 -
- */ - public ApiResponse createGrayReleaseWithHttpInfo(String appId, String env, String clusterName, String namespaceName, String branchName, NamespaceReleaseDTO namespaceReleaseDTO, String operator) throws ApiException { - okhttp3.Call localVarCall = createGrayReleaseValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO, operator, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 创建灰度发布 (original openapi) (asynchronously) - * 创建灰度发布 - * @param appId app标识 (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param namespaceReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - -
Status Code Description Response Headers
200 灰度发布创建成功 -
- */ - public okhttp3.Call createGrayReleaseAsync(String appId, String env, String clusterName, String namespaceName, String branchName, NamespaceReleaseDTO namespaceReleaseDTO, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createGrayReleaseValidateBeforeCall(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO, operator, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for createRelease - * @param appId app标识 (required) - * @param env 环境标识 (required) - * @param clusterName (required) - * @param namespaceName 命名空间名称 (required) - * @param namespaceReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 发布创建成功 -
400 发布参数错误 -
403 权限不足 -
- */ - public okhttp3.Call createReleaseCall(String appId, String env, String clusterName, String namespaceName, NamespaceReleaseDTO namespaceReleaseDTO, 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 = namespaceReleaseDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createReleaseValidateBeforeCall(String appId, String env, String clusterName, String namespaceName, NamespaceReleaseDTO namespaceReleaseDTO, 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 createRelease(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - 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 createRelease(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - 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 createReleaseCall(appId, env, clusterName, namespaceName, namespaceReleaseDTO, operator, _callback); - - } - - /** - * 创建发布 (original openapi) - * 创建发布 - * @param appId app标识 (required) - * @param env 环境标识 (required) - * @param clusterName (required) - * @param namespaceName 命名空间名称 (required) - * @param namespaceReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @return OpenReleaseDTO - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 发布创建成功 -
400 发布参数错误 -
403 权限不足 -
- */ - public OpenReleaseDTO createRelease(String appId, String env, String clusterName, String namespaceName, NamespaceReleaseDTO namespaceReleaseDTO, String operator) throws ApiException { - ApiResponse localVarResp = createReleaseWithHttpInfo(appId, env, clusterName, namespaceName, namespaceReleaseDTO, operator); - return localVarResp.getData(); - } - - /** - * 创建发布 (original openapi) - * 创建发布 - * @param appId app标识 (required) - * @param env 环境标识 (required) - * @param clusterName (required) - * @param namespaceName 命名空间名称 (required) - * @param namespaceReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @return ApiResponse<OpenReleaseDTO> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 发布创建成功 -
400 发布参数错误 -
403 权限不足 -
- */ - public ApiResponse createReleaseWithHttpInfo(String appId, String env, String clusterName, String namespaceName, NamespaceReleaseDTO namespaceReleaseDTO, String operator) throws ApiException { - okhttp3.Call localVarCall = createReleaseValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceReleaseDTO, operator, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 创建发布 (original openapi) (asynchronously) - * 创建发布 - * @param appId app标识 (required) - * @param env 环境标识 (required) - * @param clusterName (required) - * @param namespaceName 命名空间名称 (required) - * @param namespaceReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 发布创建成功 -
400 发布参数错误 -
403 权限不足 -
- */ - public okhttp3.Call createReleaseAsync(String appId, String env, String clusterName, String namespaceName, NamespaceReleaseDTO namespaceReleaseDTO, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createReleaseValidateBeforeCall(appId, env, clusterName, namespaceName, namespaceReleaseDTO, operator, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * 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 - - - -
Status Code Description Response Headers
200 成功获取活跃发布列表 -
- */ - 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[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active" - .replace("{" + "appId" + "}", localVarApiClient.escapeString(appId.toString())) - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "clusterName" + "}", localVarApiClient.escapeString(clusterName.toString())) - .replace("{" + "namespaceName" + "}", localVarApiClient.escapeString(namespaceName.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (page != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); - } - - if (size != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("size", size)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call 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 findActiveReleases(Async)"); - } - - // verify the required parameter 'env' is set - if (env == null) { - 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 findActiveReleases(Async)"); - } - - // verify the required parameter 'namespaceName' is set - if (namespaceName == null) { - throw new ApiException("Missing the required parameter 'namespaceName' when calling findActiveReleases(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 findActiveReleasesCall(appId, env, clusterName, namespaceName, page, size, _callback); - - } - - /** - * 获取活跃发布(分页) (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 - - - -
Status Code Description Response Headers
200 成功获取活跃发布列表 -
- */ - 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(); - } - - /** - * 获取活跃发布(分页) (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 - - - -
Status Code Description Response Headers
200 成功获取活跃发布列表 -
- */ - 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); - } - - /** - * 获取活跃发布(分页) (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 - - - -
Status Code Description Response Headers
200 成功获取活跃发布列表 -
- */ - public okhttp3.Call findActiveReleasesAsync(String appId, String env, String clusterName, String namespaceName, Integer page, Integer size, final ApiCallback> _callback) throws ApiException { - - 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 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 - - - -
Status Code Description Response Headers
200 成功获取发布详情 -
- */ - public okhttp3.Call getReleaseByIdCall(String env, Long releaseId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/releases/{releaseId}" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "releaseId" + "}", localVarApiClient.escapeString(releaseId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getReleaseByIdValidateBeforeCall(String env, Long 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 getReleaseById(Async)"); - } - - // verify the required parameter 'releaseId' is set - if (releaseId == null) { - throw new ApiException("Missing the required parameter 'releaseId' when calling getReleaseById(Async)"); - } - - return getReleaseByIdCall(env, releaseId, _callback); - - } - - /** - * 获取发布详情 (new added) - * GET /openapi/v1/envs/{env}/releases/{releaseId} - * @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 - - - -
Status Code Description Response Headers
200 成功获取发布详情 -
- */ - public OpenReleaseDTO getReleaseById(String env, Long 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 发布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 - - - -
Status Code Description Response Headers
200 成功获取发布详情 -
- */ - public ApiResponse getReleaseByIdWithHttpInfo(String env, Long releaseId) throws ApiException { - okhttp3.Call localVarCall = getReleaseByIdValidateBeforeCall(env, releaseId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取发布详情 (new added) (asynchronously) - * GET /openapi/v1/envs/{env}/releases/{releaseId} - * @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 - - - -
Status Code Description Response Headers
200 成功获取发布详情 -
- */ - public okhttp3.Call getReleaseByIdAsync(String env, Long releaseId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getReleaseByIdValidateBeforeCall(env, releaseId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * 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 - - - - -
Status Code Description Response Headers
200 成功获取最新活跃发布 -
404 未找到活跃发布 -
- */ - 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 rollback - * @param env 环境标识 (required) - * @param releaseId 发布ID (required) - * @param operator 操作人用户名 (optional) - * @param toReleaseId 要回滚到的目标发布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 - - - -
Status Code Description Response Headers
200 发布回滚成功 -
- */ - public okhttp3.Call rollbackCall(String env, Long releaseId, String operator, Long toReleaseId, final ApiCallback _callback) throws ApiException { - String basePath = null; - // Operation Servers - String[] localBasePaths = new String[] { }; - - // Determine Base Path to Use - if (localCustomBaseUrl != null){ - basePath = localCustomBaseUrl; - } else if ( localBasePaths.length > 0 ) { - basePath = localBasePaths[localHostIndex]; - } else { - basePath = null; - } - - Object localVarPostBody = null; - - // create path and map variables - String localVarPath = "/openapi/v1/envs/{env}/releases/{releaseId}/rollback" - .replace("{" + "env" + "}", localVarApiClient.escapeString(env.toString())) - .replace("{" + "releaseId" + "}", localVarApiClient.escapeString(releaseId.toString())); - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - if (toReleaseId != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("toReleaseId", toReleaseId)); - } - - final String[] localVarAccepts = { - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call rollbackValidateBeforeCall(String env, Long releaseId, String operator, Long toReleaseId, 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 rollback(Async)"); - } - - // verify the required parameter 'releaseId' is set - if (releaseId == null) { - throw new ApiException("Missing the required parameter 'releaseId' when calling rollback(Async)"); - } - - return rollbackCall(env, releaseId, operator, toReleaseId, _callback); - - } - - /** - * 回滚发布 (original openapi) - * 回滚到指定的发布版本 - * @param env 环境标识 (required) - * @param releaseId 发布ID (required) - * @param operator 操作人用户名 (optional) - * @param toReleaseId 要回滚到的目标发布ID;不传时回滚到上一版本 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 发布回滚成功 -
- */ - public void rollback(String env, Long releaseId, String operator, Long toReleaseId) throws ApiException { - rollbackWithHttpInfo(env, releaseId, operator, toReleaseId); - } - - /** - * 回滚发布 (original openapi) - * 回滚到指定的发布版本 - * @param env 环境标识 (required) - * @param releaseId 发布ID (required) - * @param operator 操作人用户名 (optional) - * @param toReleaseId 要回滚到的目标发布ID;不传时回滚到上一版本 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - -
Status Code Description Response Headers
200 发布回滚成功 -
- */ - public ApiResponse rollbackWithHttpInfo(String env, Long releaseId, String operator, Long toReleaseId) throws ApiException { - okhttp3.Call localVarCall = rollbackValidateBeforeCall(env, releaseId, operator, toReleaseId, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 回滚发布 (original openapi) (asynchronously) - * 回滚到指定的发布版本 - * @param env 环境标识 (required) - * @param releaseId 发布ID (required) - * @param operator 操作人用户名 (optional) - * @param toReleaseId 要回滚到的目标发布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 - - - -
Status Code Description Response Headers
200 发布回滚成功 -
- */ - public okhttp3.Call rollbackAsync(String env, Long releaseId, String operator, Long toReleaseId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = rollbackValidateBeforeCall(env, releaseId, operator, toReleaseId, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/api/UserManagementApi.java b/java-client/src/main/java/org/openapitools/client/api/UserManagementApi.java deleted file mode 100644 index bd478fda..00000000 --- a/java-client/src/main/java/org/openapitools/client/api/UserManagementApi.java +++ /dev/null @@ -1,834 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiCallback; -import org.openapitools.client.ApiClient; -import org.openapitools.client.ApiException; -import org.openapitools.client.ApiResponse; -import org.openapitools.client.Configuration; -import org.openapitools.client.Pair; -import org.openapitools.client.ProgressRequestBody; -import org.openapitools.client.ProgressResponseBody; - -import com.google.gson.reflect.TypeToken; - -import java.io.IOException; - - -import org.openapitools.client.model.ExceptionResponse; -import org.openapitools.client.model.OpenUserDTO; -import org.openapitools.client.model.OpenUserInfoDTO; - -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 UserManagementApi { - private ApiClient localVarApiClient; - private int localHostIndex; - private String localCustomBaseUrl; - - public UserManagementApi() { - this(Configuration.getDefaultApiClient()); - } - - public UserManagementApi(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public ApiClient getApiClient() { - return localVarApiClient; - } - - public void setApiClient(ApiClient apiClient) { - this.localVarApiClient = apiClient; - } - - public int getHostIndex() { - return localHostIndex; - } - - public void setHostIndex(int hostIndex) { - this.localHostIndex = hostIndex; - } - - public String getCustomBaseUrl() { - return localCustomBaseUrl; - } - - public void setCustomBaseUrl(String customBaseUrl) { - this.localCustomBaseUrl = customBaseUrl; - } - - /** - * Build call for changeUserEnabled - * @param openUserDTO (required) - * @param operator 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 用户状态修改成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call changeUserEnabledCall(OpenUserDTO openUserDTO, 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 = openUserDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/users/enabled"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - /** - * Build call for changeUserEnabled. - * This overload preserves the Java client API for callers that do not need the optional operator query parameter. - */ - public okhttp3.Call changeUserEnabledCall(OpenUserDTO openUserDTO, final ApiCallback _callback) throws ApiException { - return changeUserEnabledCall(openUserDTO, null, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call changeUserEnabledValidateBeforeCall(OpenUserDTO openUserDTO, String operator, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'openUserDTO' is set - if (openUserDTO == null) { - throw new ApiException("Missing the required parameter 'openUserDTO' when calling changeUserEnabled(Async)"); - } - - return changeUserEnabledCall(openUserDTO, operator, _callback); - - } - - /** - * 修改用户启用状态(new added) - * PUT /openapi/v1/users/enabled,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - * @param openUserDTO (required) - * @param operator 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 用户状态修改成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public void changeUserEnabled(OpenUserDTO openUserDTO, String operator) throws ApiException { - changeUserEnabledWithHttpInfo(openUserDTO, operator); - } - - /** - * 修改用户启用状态(new added) - * This overload preserves the Java client API for callers that do not need the optional operator query parameter. - */ - public void changeUserEnabled(OpenUserDTO openUserDTO) throws ApiException { - changeUserEnabled(openUserDTO, null); - } - - /** - * 修改用户启用状态(new added) - * PUT /openapi/v1/users/enabled,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - * @param openUserDTO (required) - * @param operator 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 用户状态修改成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public ApiResponse changeUserEnabledWithHttpInfo(OpenUserDTO openUserDTO, String operator) throws ApiException { - okhttp3.Call localVarCall = changeUserEnabledValidateBeforeCall(openUserDTO, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 修改用户启用状态(new added) - * This overload preserves the Java client API for callers that do not need the optional operator query parameter. - */ - public ApiResponse changeUserEnabledWithHttpInfo(OpenUserDTO openUserDTO) throws ApiException { - return changeUserEnabledWithHttpInfo(openUserDTO, null); - } - - /** - * 修改用户启用状态(new added) (asynchronously) - * PUT /openapi/v1/users/enabled,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - * @param openUserDTO (required) - * @param operator 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 用户状态修改成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call changeUserEnabledAsync(OpenUserDTO openUserDTO, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = changeUserEnabledValidateBeforeCall(openUserDTO, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - - /** - * 修改用户启用状态(new added) (asynchronously) - * This overload preserves the Java client API for callers that do not need the optional operator query parameter. - */ - public okhttp3.Call changeUserEnabledAsync(OpenUserDTO openUserDTO, final ApiCallback _callback) throws ApiException { - return changeUserEnabledAsync(openUserDTO, null, _callback); - } - - /** - * Build call for createOrUpdateUser - * @param openUserDTO (required) - * @param isCreate true 表示创建用户,false 表示更新用户 (optional, default to false) - * @param operator 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数 (optional) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 用户创建或更新成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call createOrUpdateUserCall(OpenUserDTO openUserDTO, Boolean isCreate, 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 = openUserDTO; - - // create path and map variables - String localVarPath = "/openapi/v1/users"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (isCreate != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("isCreate", isCreate)); - } - - if (operator != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("operator", operator)); - } - - final String[] localVarAccepts = { - "application/json" - }; - final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); - if (localVarAccept != null) { - localVarHeaderParams.put("Accept", localVarAccept); - } - - final String[] localVarContentTypes = { - "application/json" - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "ApiKeyAuth" }; - return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - /** - * Build call for createOrUpdateUser. - * This overload preserves the Java client API for callers that do not need the optional operator query parameter. - */ - public okhttp3.Call createOrUpdateUserCall(OpenUserDTO openUserDTO, Boolean isCreate, final ApiCallback _callback) throws ApiException { - return createOrUpdateUserCall(openUserDTO, isCreate, null, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call createOrUpdateUserValidateBeforeCall(OpenUserDTO openUserDTO, Boolean isCreate, String operator, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'openUserDTO' is set - if (openUserDTO == null) { - throw new ApiException("Missing the required parameter 'openUserDTO' when calling createOrUpdateUser(Async)"); - } - - return createOrUpdateUserCall(openUserDTO, isCreate, operator, _callback); - - } - - /** - * 创建或更新用户(new added) - * POST /openapi/v1/users,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - * @param openUserDTO (required) - * @param isCreate true 表示创建用户,false 表示更新用户 (optional, default to false) - * @param operator 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数 (optional) - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 用户创建或更新成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public void createOrUpdateUser(OpenUserDTO openUserDTO, Boolean isCreate, String operator) throws ApiException { - createOrUpdateUserWithHttpInfo(openUserDTO, isCreate, operator); - } - - /** - * 创建或更新用户(new added) - * This overload preserves the Java client API for callers that do not need the optional operator query parameter. - */ - public void createOrUpdateUser(OpenUserDTO openUserDTO, Boolean isCreate) throws ApiException { - createOrUpdateUser(openUserDTO, isCreate, null); - } - - /** - * 创建或更新用户(new added) - * POST /openapi/v1/users,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - * @param openUserDTO (required) - * @param isCreate true 表示创建用户,false 表示更新用户 (optional, default to false) - * @param operator 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数 (optional) - * @return ApiResponse<Void> - * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body - * @http.response.details - - - - - -
Status Code Description Response Headers
200 用户创建或更新成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public ApiResponse createOrUpdateUserWithHttpInfo(OpenUserDTO openUserDTO, Boolean isCreate, String operator) throws ApiException { - okhttp3.Call localVarCall = createOrUpdateUserValidateBeforeCall(openUserDTO, isCreate, operator, null); - return localVarApiClient.execute(localVarCall); - } - - /** - * 创建或更新用户(new added) - * This overload preserves the Java client API for callers that do not need the optional operator query parameter. - */ - public ApiResponse createOrUpdateUserWithHttpInfo(OpenUserDTO openUserDTO, Boolean isCreate) throws ApiException { - return createOrUpdateUserWithHttpInfo(openUserDTO, isCreate, null); - } - - /** - * 创建或更新用户(new added) (asynchronously) - * POST /openapi/v1/users,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - * @param openUserDTO (required) - * @param isCreate true 表示创建用户,false 表示更新用户 (optional, default to false) - * @param operator 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数 (optional) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - -
Status Code Description Response Headers
200 用户创建或更新成功 -
400 请求参数错误 -
403 权限不足 -
- */ - public okhttp3.Call createOrUpdateUserAsync(OpenUserDTO openUserDTO, Boolean isCreate, String operator, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = createOrUpdateUserValidateBeforeCall(openUserDTO, isCreate, operator, _callback); - localVarApiClient.executeAsync(localVarCall, _callback); - return localVarCall; - } - - /** - * 创建或更新用户(new added) (asynchronously) - * This overload preserves the Java client API for callers that do not need the optional operator query parameter. - */ - public okhttp3.Call createOrUpdateUserAsync(OpenUserDTO openUserDTO, Boolean isCreate, final ApiCallback _callback) throws ApiException { - return createOrUpdateUserAsync(openUserDTO, isCreate, null, _callback); - } - /** - * Build call for getCurrentUser - * @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 成功获取当前用户 -
401 未登录或未授权访问 -
403 仅支持Portal用户登录态访问 -
- */ - public okhttp3.Call getCurrentUserCall(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/user"; - - 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 getCurrentUserValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getCurrentUserCall(_callback); - - } - - /** - * 获取当前Portal用户(new added) - * GET /openapi/v1/user - * @return OpenUserInfoDTO - * @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 成功获取当前用户 -
401 未登录或未授权访问 -
403 仅支持Portal用户登录态访问 -
- */ - public OpenUserInfoDTO getCurrentUser() throws ApiException { - ApiResponse localVarResp = getCurrentUserWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * 获取当前Portal用户(new added) - * GET /openapi/v1/user - * @return ApiResponse<OpenUserInfoDTO> - * @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 成功获取当前用户 -
401 未登录或未授权访问 -
403 仅支持Portal用户登录态访问 -
- */ - public ApiResponse getCurrentUserWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getCurrentUserValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取当前Portal用户(new added) (asynchronously) - * GET /openapi/v1/user - * @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 成功获取当前用户 -
401 未登录或未授权访问 -
403 仅支持Portal用户登录态访问 -
- */ - public okhttp3.Call getCurrentUserAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getCurrentUserValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for getUserByUserId - * @param userId 用户ID (required) - * @param _callback Callback for upload/download progress - * @return Call to execute - * @throws ApiException If fail to serialize the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 成功获取用户 -
400 请求参数错误或用户不存在 -
401 未登录或未认证 -
403 权限不足 -
- */ - public okhttp3.Call getUserByUserIdCall(String userId, 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/users/{userId}" - .replace("{" + "userId" + "}", localVarApiClient.escapeString(userId.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 getUserByUserIdValidateBeforeCall(String userId, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'userId' is set - if (userId == null) { - throw new ApiException("Missing the required parameter 'userId' when calling getUserByUserId(Async)"); - } - - return getUserByUserIdCall(userId, _callback); - - } - - /** - * 获取指定用户(new added) - * GET /openapi/v1/users/{userId},支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - * @param userId 用户ID (required) - * @return OpenUserInfoDTO - * @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 请求参数错误或用户不存在 -
401 未登录或未认证 -
403 权限不足 -
- */ - public OpenUserInfoDTO getUserByUserId(String userId) throws ApiException { - ApiResponse localVarResp = getUserByUserIdWithHttpInfo(userId); - return localVarResp.getData(); - } - - /** - * 获取指定用户(new added) - * GET /openapi/v1/users/{userId},支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - * @param userId 用户ID (required) - * @return ApiResponse<OpenUserInfoDTO> - * @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 请求参数错误或用户不存在 -
401 未登录或未认证 -
403 权限不足 -
- */ - public ApiResponse getUserByUserIdWithHttpInfo(String userId) throws ApiException { - okhttp3.Call localVarCall = getUserByUserIdValidateBeforeCall(userId, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 获取指定用户(new added) (asynchronously) - * GET /openapi/v1/users/{userId},支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - * @param userId 用户ID (required) - * @param _callback The callback to be executed when the API call finishes - * @return The request call - * @throws ApiException If fail to process the API call, e.g. serializing the request body object - * @http.response.details - - - - - - -
Status Code Description Response Headers
200 成功获取用户 -
400 请求参数错误或用户不存在 -
401 未登录或未认证 -
403 权限不足 -
- */ - public okhttp3.Call getUserByUserIdAsync(String userId, final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getUserByUserIdValidateBeforeCall(userId, _callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } - /** - * Build call for searchUsers - * @param keyword 用户名、显示名或邮箱关键字 (required) - * @param includeInactiveUsers 是否包含禁用用户 (optional, default to false) - * @param offset 偏移量 (optional, default to 0) - * @param limit 返回数量 (optional, default to 10) - * @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 成功获取用户列表 -
401 未登录或未授权访问 -
403 权限不足 -
- */ - public okhttp3.Call searchUsersCall(String keyword, Boolean includeInactiveUsers, Integer offset, Integer limit, 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/users"; - - List localVarQueryParams = new ArrayList(); - List localVarCollectionQueryParams = new ArrayList(); - Map localVarHeaderParams = new HashMap(); - Map localVarCookieParams = new HashMap(); - Map localVarFormParams = new HashMap(); - - if (keyword != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("keyword", keyword)); - } - - if (includeInactiveUsers != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("includeInactiveUsers", includeInactiveUsers)); - } - - if (offset != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset)); - } - - if (limit != null) { - localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); - } - - 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 searchUsersValidateBeforeCall(String keyword, Boolean includeInactiveUsers, Integer offset, Integer limit, final ApiCallback _callback) throws ApiException { - // verify the required parameter 'keyword' is set - if (keyword == null) { - throw new ApiException("Missing the required parameter 'keyword' when calling searchUsers(Async)"); - } - - return searchUsersCall(keyword, includeInactiveUsers, offset, limit, _callback); - - } - - /** - * 搜索用户(new added) - * GET /openapi/v1/users,支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - * @param keyword 用户名、显示名或邮箱关键字 (required) - * @param includeInactiveUsers 是否包含禁用用户 (optional, default to false) - * @param offset 偏移量 (optional, default to 0) - * @param limit 返回数量 (optional, default to 10) - * @return List<OpenUserInfoDTO> - * @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 成功获取用户列表 -
401 未登录或未授权访问 -
403 权限不足 -
- */ - public List searchUsers(String keyword, Boolean includeInactiveUsers, Integer offset, Integer limit) throws ApiException { - ApiResponse> localVarResp = searchUsersWithHttpInfo(keyword, includeInactiveUsers, offset, limit); - return localVarResp.getData(); - } - - /** - * 搜索用户(new added) - * GET /openapi/v1/users,支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - * @param keyword 用户名、显示名或邮箱关键字 (required) - * @param includeInactiveUsers 是否包含禁用用户 (optional, default to false) - * @param offset 偏移量 (optional, default to 0) - * @param limit 返回数量 (optional, default to 10) - * @return ApiResponse<List<OpenUserInfoDTO>> - * @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 成功获取用户列表 -
401 未登录或未授权访问 -
403 权限不足 -
- */ - public ApiResponse> searchUsersWithHttpInfo(String keyword, Boolean includeInactiveUsers, Integer offset, Integer limit) throws ApiException { - okhttp3.Call localVarCall = searchUsersValidateBeforeCall(keyword, includeInactiveUsers, offset, limit, null); - Type localVarReturnType = new TypeToken>(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * 搜索用户(new added) (asynchronously) - * GET /openapi/v1/users,支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - * @param keyword 用户名、显示名或邮箱关键字 (required) - * @param includeInactiveUsers 是否包含禁用用户 (optional, default to false) - * @param offset 偏移量 (optional, default to 0) - * @param limit 返回数量 (optional, default to 10) - * @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 成功获取用户列表 -
401 未登录或未授权访问 -
403 权限不足 -
- */ - public okhttp3.Call searchUsersAsync(String keyword, Boolean includeInactiveUsers, Integer offset, Integer limit, final ApiCallback> _callback) throws ApiException { - - okhttp3.Call localVarCall = searchUsersValidateBeforeCall(keyword, includeInactiveUsers, offset, limit, _callback); - Type localVarReturnType = new TypeToken>(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/java-client/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java deleted file mode 100644 index 42d1dcbe..00000000 --- a/java-client/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.auth; - -import org.openapitools.client.ApiException; -import org.openapitools.client.Pair; - -import java.net.URI; -import java.util.Map; -import java.util.List; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ApiKeyAuth implements Authentication { - private final String location; - private final String paramName; - - private String apiKey; - private String apiKeyPrefix; - - public ApiKeyAuth(String location, String paramName) { - this.location = location; - this.paramName = paramName; - } - - public String getLocation() { - return location; - } - - public String getParamName() { - return paramName; - } - - public String getApiKey() { - return apiKey; - } - - public void setApiKey(String apiKey) { - this.apiKey = apiKey; - } - - public String getApiKeyPrefix() { - return apiKeyPrefix; - } - - public void setApiKeyPrefix(String apiKeyPrefix) { - this.apiKeyPrefix = apiKeyPrefix; - } - - @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams, - String payload, String method, URI uri) throws ApiException { - if (apiKey == null) { - return; - } - String value; - if (apiKeyPrefix != null) { - value = apiKeyPrefix + " " + apiKey; - } else { - value = apiKey; - } - if ("query".equals(location)) { - queryParams.add(new Pair(paramName, value)); - } else if ("header".equals(location)) { - headerParams.put(paramName, value); - } else if ("cookie".equals(location)) { - cookieParams.put(paramName, value); - } - } -} diff --git a/java-client/src/main/java/org/openapitools/client/auth/Authentication.java b/java-client/src/main/java/org/openapitools/client/auth/Authentication.java deleted file mode 100644 index 01ca0098..00000000 --- a/java-client/src/main/java/org/openapitools/client/auth/Authentication.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.auth; - -import org.openapitools.client.Pair; -import org.openapitools.client.ApiException; - -import java.net.URI; -import java.util.Map; -import java.util.List; - -public interface Authentication { - /** - * Apply authentication settings to header and query params. - * - * @param queryParams List of query parameters - * @param headerParams Map of header parameters - * @param cookieParams Map of cookie parameters - * @param payload HTTP request body - * @param method HTTP method - * @param uri URI - * @throws ApiException if failed to update the parameters - */ - void applyToParams(List queryParams, Map headerParams, Map cookieParams, String payload, String method, URI uri) throws ApiException; -} diff --git a/java-client/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/java-client/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java deleted file mode 100644 index f0a4250a..00000000 --- a/java-client/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.auth; - -import org.openapitools.client.Pair; -import org.openapitools.client.ApiException; - -import okhttp3.Credentials; - -import java.net.URI; -import java.util.Map; -import java.util.List; - -import java.io.UnsupportedEncodingException; - -public class HttpBasicAuth implements Authentication { - private String username; - private String password; - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams, - String payload, String method, URI uri) throws ApiException { - if (username == null && password == null) { - return; - } - headerParams.put("Authorization", Credentials.basic( - username == null ? "" : username, - password == null ? "" : password)); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/java-client/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java deleted file mode 100644 index 705a0282..00000000 --- a/java-client/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.auth; - -import org.openapitools.client.ApiException; -import org.openapitools.client.Pair; - -import java.net.URI; -import java.util.Map; -import java.util.List; - -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class HttpBearerAuth implements Authentication { - private final String scheme; - private String bearerToken; - - public HttpBearerAuth(String scheme) { - this.scheme = scheme; - } - - /** - * Gets the token, which together with the scheme, will be sent as the value of the Authorization header. - * - * @return The bearer token - */ - public String getBearerToken() { - return bearerToken; - } - - /** - * Sets the token, which together with the scheme, will be sent as the value of the Authorization header. - * - * @param bearerToken The bearer token to send in the Authorization header - */ - public void setBearerToken(String bearerToken) { - this.bearerToken = bearerToken; - } - - @Override - public void applyToParams(List queryParams, Map headerParams, Map cookieParams, - String payload, String method, URI uri) throws ApiException { - if (bearerToken == null) { - return; - } - - headerParams.put("Authorization", (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken); - } - - private static String upperCaseBearer(String scheme) { - return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme; - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/java-client/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java deleted file mode 100644 index cb3e9a30..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import org.openapitools.client.ApiException; -import java.util.Objects; -import java.lang.reflect.Type; -import java.util.Map; -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") -public abstract class AbstractOpenApiSchema { - - // store the actual instance of the schema/object - private Object instance; - - // is nullable - private Boolean isNullable; - - // schema type (e.g. oneOf, anyOf) - private final String schemaType; - - public AbstractOpenApiSchema(String schemaType, Boolean isNullable) { - this.schemaType = schemaType; - this.isNullable = isNullable; - } - - /** - * Get the list of oneOf/anyOf composed schemas allowed to be stored in this object - * - * @return an instance of the actual schema/object - */ - public abstract Map getSchemas(); - - /** - * Get the actual instance - * - * @return an instance of the actual schema/object - */ - //@JsonValue - public Object getActualInstance() {return instance;} - - /** - * Set the actual instance - * - * @param instance the actual instance of the schema/object - */ - public void setActualInstance(Object instance) {this.instance = instance;} - - /** - * Get the instant recursively when the schemas defined in oneOf/anyof happen to be oneOf/anyOf schema as well - * - * @return an instance of the actual schema/object - */ - public Object getActualInstanceRecursively() { - return getActualInstanceRecursively(this); - } - - private Object getActualInstanceRecursively(AbstractOpenApiSchema object) { - if (object.getActualInstance() == null) { - return null; - } else if (object.getActualInstance() instanceof AbstractOpenApiSchema) { - return getActualInstanceRecursively((AbstractOpenApiSchema)object.getActualInstance()); - } else { - return object.getActualInstance(); - } - } - - /** - * Get the schema type (e.g. anyOf, oneOf) - * - * @return the schema type - */ - public String getSchemaType() { - return schemaType; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ").append(getClass()).append(" {\n"); - sb.append(" instance: ").append(toIndentedString(instance)).append("\n"); - sb.append(" isNullable: ").append(toIndentedString(isNullable)).append("\n"); - sb.append(" schemaType: ").append(toIndentedString(schemaType)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - AbstractOpenApiSchema a = (AbstractOpenApiSchema) o; - return Objects.equals(this.instance, a.instance) && - Objects.equals(this.isNullable, a.isNullable) && - Objects.equals(this.schemaType, a.schemaType); - } - - @Override - public int hashCode() { - return Objects.hash(instance, isNullable, schemaType); - } - - /** - * Is nullable - * - * @return true if it's nullable - */ - public Boolean isNullable() { - if (Boolean.TRUE.equals(isNullable)) { - return Boolean.TRUE; - } else { - return Boolean.FALSE; - } - } - - - -} diff --git a/java-client/src/main/java/org/openapitools/client/model/ExceptionResponse.java b/java-client/src/main/java/org/openapitools/client/model/ExceptionResponse.java deleted file mode 100644 index 47dc6488..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/ExceptionResponse.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * ExceptionResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class ExceptionResponse { - public static final String SERIALIZED_NAME_STATUS = "status"; - @SerializedName(SERIALIZED_NAME_STATUS) - private Integer status; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - private String message; - - public static final String SERIALIZED_NAME_TIMESTAMP = "timestamp"; - @SerializedName(SERIALIZED_NAME_TIMESTAMP) - private OffsetDateTime timestamp; - - public static final String SERIALIZED_NAME_EXCEPTION = "exception"; - @SerializedName(SERIALIZED_NAME_EXCEPTION) - private String exception; - - public ExceptionResponse() { - } - - public ExceptionResponse status(Integer status) { - - this.status = status; - return this; - } - - /** - * HTTP 状态码 - * @return status - **/ - @javax.annotation.Nullable - public Integer getStatus() { - return status; - } - - - public void setStatus(Integer status) { - this.status = status; - } - - - public ExceptionResponse message(String message) { - - this.message = message; - return this; - } - - /** - * 错误信息 - * @return message - **/ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - - public void setMessage(String message) { - this.message = message; - } - - - public ExceptionResponse timestamp(OffsetDateTime timestamp) { - - this.timestamp = timestamp; - return this; - } - - /** - * 时间戳 - * @return timestamp - **/ - @javax.annotation.Nullable - public OffsetDateTime getTimestamp() { - return timestamp; - } - - - public void setTimestamp(OffsetDateTime timestamp) { - this.timestamp = timestamp; - } - - - public ExceptionResponse exception(String exception) { - - this.exception = exception; - return this; - } - - /** - * 错误类名 - * @return exception - **/ - @javax.annotation.Nullable - public String getException() { - return exception; - } - - - public void setException(String exception) { - this.exception = exception; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExceptionResponse exceptionResponse = (ExceptionResponse) o; - return Objects.equals(this.status, exceptionResponse.status) && - Objects.equals(this.message, exceptionResponse.message) && - Objects.equals(this.timestamp, exceptionResponse.timestamp) && - Objects.equals(this.exception, exceptionResponse.exception); - } - - @Override - public int hashCode() { - return Objects.hash(status, message, timestamp, exception); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExceptionResponse {\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); - sb.append(" exception: ").append(toIndentedString(exception)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("status"); - openapiFields.add("message"); - openapiFields.add("timestamp"); - openapiFields.add("exception"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to ExceptionResponse - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!ExceptionResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in ExceptionResponse is not found in the empty JSON string", ExceptionResponse.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!ExceptionResponse.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExceptionResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - if ((jsonObj.get("exception") != null && !jsonObj.get("exception").isJsonNull()) && !jsonObj.get("exception").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `exception` to be a primitive type in the JSON string but got `%s`", jsonObj.get("exception").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!ExceptionResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'ExceptionResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(ExceptionResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, ExceptionResponse value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public ExceptionResponse read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of ExceptionResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of ExceptionResponse - * @throws IOException if the JSON string is invalid with respect to ExceptionResponse - */ - public static ExceptionResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, ExceptionResponse.class); - } - - /** - * Convert an instance of ExceptionResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTO.java b/java-client/src/main/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTO.java deleted file mode 100644 index 83cc7c43..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTO.java +++ /dev/null @@ -1,338 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NamespaceGrayDelReleaseDTO { - public static final String SERIALIZED_NAME_RELEASE_TITLE = "releaseTitle"; - @SerializedName(SERIALIZED_NAME_RELEASE_TITLE) - private String releaseTitle; - - public static final String SERIALIZED_NAME_RELEASE_COMMENT = "releaseComment"; - @SerializedName(SERIALIZED_NAME_RELEASE_COMMENT) - private String releaseComment; - - public static final String SERIALIZED_NAME_RELEASED_BY = "releasedBy"; - @SerializedName(SERIALIZED_NAME_RELEASED_BY) - private String releasedBy; - - public static final String SERIALIZED_NAME_IS_EMERGENCY_PUBLISH = "isEmergencyPublish"; - @SerializedName(SERIALIZED_NAME_IS_EMERGENCY_PUBLISH) - private Boolean isEmergencyPublish; - - public static final String SERIALIZED_NAME_GRAY_DEL_KEYS = "grayDelKeys"; - @SerializedName(SERIALIZED_NAME_GRAY_DEL_KEYS) - private List grayDelKeys; - - public NamespaceGrayDelReleaseDTO() { - } - - public NamespaceGrayDelReleaseDTO releaseTitle(String releaseTitle) { - - this.releaseTitle = releaseTitle; - return this; - } - - /** - * 发布标题,用于标识这次灰度删除发布的名称或版本号 - * @return releaseTitle - **/ - @javax.annotation.Nullable - public String getReleaseTitle() { - return releaseTitle; - } - - - public void setReleaseTitle(String releaseTitle) { - this.releaseTitle = releaseTitle; - } - - - public NamespaceGrayDelReleaseDTO releaseComment(String releaseComment) { - - this.releaseComment = releaseComment; - return this; - } - - /** - * 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 - * @return releaseComment - **/ - @javax.annotation.Nullable - public String getReleaseComment() { - return releaseComment; - } - - - public void setReleaseComment(String releaseComment) { - this.releaseComment = releaseComment; - } - - - public NamespaceGrayDelReleaseDTO releasedBy(String releasedBy) { - - this.releasedBy = releasedBy; - return this; - } - - /** - * 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 - * @return releasedBy - **/ - @javax.annotation.Nullable - public String getReleasedBy() { - return releasedBy; - } - - - public void setReleasedBy(String releasedBy) { - this.releasedBy = releasedBy; - } - - - public NamespaceGrayDelReleaseDTO isEmergencyPublish(Boolean isEmergencyPublish) { - - this.isEmergencyPublish = isEmergencyPublish; - return this; - } - - /** - * 是否为紧急发布,紧急发布可能会跳过某些审核流程 - * @return isEmergencyPublish - **/ - @javax.annotation.Nullable - public Boolean getIsEmergencyPublish() { - return isEmergencyPublish; - } - - - public void setIsEmergencyPublish(Boolean isEmergencyPublish) { - this.isEmergencyPublish = isEmergencyPublish; - } - - - public NamespaceGrayDelReleaseDTO grayDelKeys(List grayDelKeys) { - - this.grayDelKeys = grayDelKeys; - return this; - } - - public NamespaceGrayDelReleaseDTO addGrayDelKeysItem(String grayDelKeysItem) { - if (this.grayDelKeys == null) { - this.grayDelKeys = new ArrayList<>(); - } - this.grayDelKeys.add(grayDelKeysItem); - return this; - } - - /** - * 需要在灰度发布中删除的配置项键名列表 - * @return grayDelKeys - **/ - @javax.annotation.Nullable - public List getGrayDelKeys() { - return grayDelKeys; - } - - - public void setGrayDelKeys(List grayDelKeys) { - this.grayDelKeys = grayDelKeys; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO = (NamespaceGrayDelReleaseDTO) o; - return Objects.equals(this.releaseTitle, namespaceGrayDelReleaseDTO.releaseTitle) && - Objects.equals(this.releaseComment, namespaceGrayDelReleaseDTO.releaseComment) && - Objects.equals(this.releasedBy, namespaceGrayDelReleaseDTO.releasedBy) && - Objects.equals(this.isEmergencyPublish, namespaceGrayDelReleaseDTO.isEmergencyPublish) && - Objects.equals(this.grayDelKeys, namespaceGrayDelReleaseDTO.grayDelKeys); - } - - @Override - public int hashCode() { - return Objects.hash(releaseTitle, releaseComment, releasedBy, isEmergencyPublish, grayDelKeys); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NamespaceGrayDelReleaseDTO {\n"); - sb.append(" releaseTitle: ").append(toIndentedString(releaseTitle)).append("\n"); - sb.append(" releaseComment: ").append(toIndentedString(releaseComment)).append("\n"); - sb.append(" releasedBy: ").append(toIndentedString(releasedBy)).append("\n"); - sb.append(" isEmergencyPublish: ").append(toIndentedString(isEmergencyPublish)).append("\n"); - sb.append(" grayDelKeys: ").append(toIndentedString(grayDelKeys)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - 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(); - } - - /** - * 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - 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(), jsonObj.toString())); - } - } - if ((jsonObj.get("releaseTitle") != null && !jsonObj.get("releaseTitle").isJsonNull()) && !jsonObj.get("releaseTitle").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `releaseTitle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("releaseTitle").toString())); - } - if ((jsonObj.get("releaseComment") != null && !jsonObj.get("releaseComment").isJsonNull()) && !jsonObj.get("releaseComment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `releaseComment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("releaseComment").toString())); - } - if ((jsonObj.get("releasedBy") != null && !jsonObj.get("releasedBy").isJsonNull()) && !jsonObj.get("releasedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `releasedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("releasedBy").toString())); - } - // ensure the optional json data is an array if present - if (jsonObj.get("grayDelKeys") != null && !jsonObj.get("grayDelKeys").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `grayDelKeys` to be an array in the JSON string but got `%s`", jsonObj.get("grayDelKeys").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!NamespaceGrayDelReleaseDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NamespaceGrayDelReleaseDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NamespaceGrayDelReleaseDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, NamespaceGrayDelReleaseDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public NamespaceGrayDelReleaseDTO read(JsonReader in) throws IOException { - 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 - */ - public static NamespaceGrayDelReleaseDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NamespaceGrayDelReleaseDTO.class); - } - - /** - * Convert an instance of NamespaceGrayDelReleaseDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/NamespaceReleaseDTO.java b/java-client/src/main/java/org/openapitools/client/model/NamespaceReleaseDTO.java deleted file mode 100644 index 533d1c71..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/NamespaceReleaseDTO.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * 命名空间发布请求数据传输对象,用于创建新的配置发布 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class NamespaceReleaseDTO { - public static final String SERIALIZED_NAME_RELEASE_TITLE = "releaseTitle"; - @SerializedName(SERIALIZED_NAME_RELEASE_TITLE) - private String releaseTitle; - - public static final String SERIALIZED_NAME_RELEASE_COMMENT = "releaseComment"; - @SerializedName(SERIALIZED_NAME_RELEASE_COMMENT) - private String releaseComment; - - public static final String SERIALIZED_NAME_RELEASED_BY = "releasedBy"; - @SerializedName(SERIALIZED_NAME_RELEASED_BY) - private String releasedBy; - - public static final String SERIALIZED_NAME_IS_EMERGENCY_PUBLISH = "isEmergencyPublish"; - @SerializedName(SERIALIZED_NAME_IS_EMERGENCY_PUBLISH) - private Boolean isEmergencyPublish; - - public NamespaceReleaseDTO() { - } - - public NamespaceReleaseDTO releaseTitle(String releaseTitle) { - - this.releaseTitle = releaseTitle; - return this; - } - - /** - * 发布标题,用于标识这次发布的名称或版本号 - * @return releaseTitle - **/ - @javax.annotation.Nullable - public String getReleaseTitle() { - return releaseTitle; - } - - - public void setReleaseTitle(String releaseTitle) { - this.releaseTitle = releaseTitle; - } - - - public NamespaceReleaseDTO releaseComment(String releaseComment) { - - this.releaseComment = releaseComment; - return this; - } - - /** - * 发布备注,详细描述本次发布的变更内容和目的 - * @return releaseComment - **/ - @javax.annotation.Nullable - public String getReleaseComment() { - return releaseComment; - } - - - public void setReleaseComment(String releaseComment) { - this.releaseComment = releaseComment; - } - - - public NamespaceReleaseDTO releasedBy(String releasedBy) { - - this.releasedBy = releasedBy; - return this; - } - - /** - * 发布操作者用户名,记录是谁执行了这次发布操作 - * @return releasedBy - **/ - @javax.annotation.Nullable - public String getReleasedBy() { - return releasedBy; - } - - - public void setReleasedBy(String releasedBy) { - this.releasedBy = releasedBy; - } - - - public NamespaceReleaseDTO isEmergencyPublish(Boolean isEmergencyPublish) { - - this.isEmergencyPublish = isEmergencyPublish; - return this; - } - - /** - * 是否为紧急发布,紧急发布可能会跳过某些审核流程 - * @return isEmergencyPublish - **/ - @javax.annotation.Nullable - public Boolean getIsEmergencyPublish() { - return isEmergencyPublish; - } - - - public void setIsEmergencyPublish(Boolean isEmergencyPublish) { - this.isEmergencyPublish = isEmergencyPublish; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NamespaceReleaseDTO namespaceReleaseDTO = (NamespaceReleaseDTO) o; - return Objects.equals(this.releaseTitle, namespaceReleaseDTO.releaseTitle) && - Objects.equals(this.releaseComment, namespaceReleaseDTO.releaseComment) && - Objects.equals(this.releasedBy, namespaceReleaseDTO.releasedBy) && - Objects.equals(this.isEmergencyPublish, namespaceReleaseDTO.isEmergencyPublish); - } - - @Override - public int hashCode() { - return Objects.hash(releaseTitle, releaseComment, releasedBy, isEmergencyPublish); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NamespaceReleaseDTO {\n"); - sb.append(" releaseTitle: ").append(toIndentedString(releaseTitle)).append("\n"); - sb.append(" releaseComment: ").append(toIndentedString(releaseComment)).append("\n"); - sb.append(" releasedBy: ").append(toIndentedString(releasedBy)).append("\n"); - sb.append(" isEmergencyPublish: ").append(toIndentedString(isEmergencyPublish)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("releaseTitle"); - openapiFields.add("releaseComment"); - openapiFields.add("releasedBy"); - openapiFields.add("isEmergencyPublish"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - 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(), jsonObj.toString())); - } - } - if ((jsonObj.get("releaseTitle") != null && !jsonObj.get("releaseTitle").isJsonNull()) && !jsonObj.get("releaseTitle").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `releaseTitle` to be a primitive type in the JSON string but got `%s`", jsonObj.get("releaseTitle").toString())); - } - if ((jsonObj.get("releaseComment") != null && !jsonObj.get("releaseComment").isJsonNull()) && !jsonObj.get("releaseComment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `releaseComment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("releaseComment").toString())); - } - if ((jsonObj.get("releasedBy") != null && !jsonObj.get("releasedBy").isJsonNull()) && !jsonObj.get("releasedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `releasedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("releasedBy").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!NamespaceReleaseDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'NamespaceReleaseDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(NamespaceReleaseDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, NamespaceReleaseDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public NamespaceReleaseDTO read(JsonReader in) throws IOException { - 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 - */ - public static NamespaceReleaseDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, NamespaceReleaseDTO.class); - } - - /** - * Convert an instance of NamespaceReleaseDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenAccessKeyDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenAccessKeyDTO.java deleted file mode 100644 index acea0daf..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenAccessKeyDTO.java +++ /dev/null @@ -1,507 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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; - -/** - * OpenAccessKeyDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenAccessKeyDTO { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - 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) - 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) - private String dataChangeLastModifiedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private Long id; - - public static final String SERIALIZED_NAME_SECRET = "secret"; - @SerializedName(SERIALIZED_NAME_SECRET) - private String secret; - - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - private String appId; - - public static final String SERIALIZED_NAME_MODE = "mode"; - @SerializedName(SERIALIZED_NAME_MODE) - private Integer mode; - - public static final String SERIALIZED_NAME_ENABLED = "enabled"; - @SerializedName(SERIALIZED_NAME_ENABLED) - private Boolean enabled; - - public OpenAccessKeyDTO() { - } - - public OpenAccessKeyDTO dataChangeCreatedBy(String dataChangeCreatedBy) { - - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * - * @return dataChangeCreatedBy - **/ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - - public void setDataChangeCreatedBy(String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public OpenAccessKeyDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { - - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * - * @return dataChangeLastModifiedBy - **/ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - - public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public OpenAccessKeyDTO dataChangeCreatedByDisplayName(String dataChangeCreatedByDisplayName) { - - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * - * @return dataChangeCreatedByDisplayName - **/ - @javax.annotation.Nullable - public String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - - public void setDataChangeCreatedByDisplayName(String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - - public OpenAccessKeyDTO dataChangeLastModifiedByDisplayName(String dataChangeLastModifiedByDisplayName) { - - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * - * @return dataChangeLastModifiedByDisplayName - **/ - @javax.annotation.Nullable - public String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - - public void setDataChangeLastModifiedByDisplayName(String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - - public OpenAccessKeyDTO dataChangeCreatedTime(String dataChangeCreatedTime) { - - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * - * @return dataChangeCreatedTime - **/ - @javax.annotation.Nullable - public String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - - public void setDataChangeCreatedTime(String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - public OpenAccessKeyDTO dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { - - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * - * @return dataChangeLastModifiedTime - **/ - @javax.annotation.Nullable - public String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - - public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public OpenAccessKeyDTO id(Long id) { - - this.id = id; - return this; - } - - /** - * - * @return id - **/ - @javax.annotation.Nullable - public Long getId() { - return id; - } - - - public void setId(Long id) { - this.id = id; - } - - - public OpenAccessKeyDTO secret(String secret) { - - this.secret = secret; - return this; - } - - /** - * - * @return secret - **/ - @javax.annotation.Nullable - public String getSecret() { - return secret; - } - - - public void setSecret(String secret) { - this.secret = secret; - } - - - public OpenAccessKeyDTO appId(String appId) { - - this.appId = appId; - return this; - } - - /** - * - * @return appId - **/ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - - public void setAppId(String appId) { - this.appId = appId; - } - - - public OpenAccessKeyDTO mode(Integer mode) { - - this.mode = mode; - return this; - } - - /** - * - * @return mode - **/ - @javax.annotation.Nullable - public Integer getMode() { - return mode; - } - - - public void setMode(Integer mode) { - this.mode = mode; - } - - - public OpenAccessKeyDTO enabled(Boolean enabled) { - - this.enabled = enabled; - return this; - } - - /** - * - * @return enabled - **/ - @javax.annotation.Nullable - public Boolean getEnabled() { - return enabled; - } - - - public void setEnabled(Boolean enabled) { - this.enabled = enabled; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenAccessKeyDTO openAccessKeyDTO = (OpenAccessKeyDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openAccessKeyDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, openAccessKeyDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, openAccessKeyDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, openAccessKeyDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, openAccessKeyDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openAccessKeyDTO.dataChangeLastModifiedTime) && - Objects.equals(this.id, openAccessKeyDTO.id) && - Objects.equals(this.secret, openAccessKeyDTO.secret) && - Objects.equals(this.appId, openAccessKeyDTO.appId) && - Objects.equals(this.mode, openAccessKeyDTO.mode) && - Objects.equals(this.enabled, openAccessKeyDTO.enabled); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, id, secret, appId, mode, enabled); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenAccessKeyDTO {\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(" secret: ").append(toIndentedString(secret)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).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("dataChangeCreatedBy"); - openapiFields.add("dataChangeLastModifiedBy"); - openapiFields.add("dataChangeCreatedByDisplayName"); - openapiFields.add("dataChangeLastModifiedByDisplayName"); - openapiFields.add("dataChangeCreatedTime"); - openapiFields.add("dataChangeLastModifiedTime"); - openapiFields.add("id"); - openapiFields.add("secret"); - openapiFields.add("appId"); - openapiFields.add("mode"); - openapiFields.add("enabled"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OpenAccessKeyDTO - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OpenAccessKeyDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenAccessKeyDTO is not found in the empty JSON string", OpenAccessKeyDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OpenAccessKeyDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenAccessKeyDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - 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("secret") != null && !jsonObj.get("secret").isJsonNull()) && !jsonObj.get("secret").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `secret` to be a primitive type in the JSON string but got `%s`", jsonObj.get("secret").toString())); - } - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenAccessKeyDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenAccessKeyDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenAccessKeyDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenAccessKeyDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenAccessKeyDTO read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenAccessKeyDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenAccessKeyDTO - * @throws IOException if the JSON string is invalid with respect to OpenAccessKeyDTO - */ - public static OpenAccessKeyDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenAccessKeyDTO.class); - } - - /** - * Convert an instance of OpenAccessKeyDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenAppDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenAppDTO.java deleted file mode 100644 index 8a02d894..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenAppDTO.java +++ /dev/null @@ -1,578 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Apollo应用信息数据传输对象,包含应用的基本信息和元数据 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenAppDTO { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME = "dataChangeCreatedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME) - private String dataChangeCreatedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME = "dataChangeLastModifiedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME) - private String dataChangeLastModifiedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - private String appId; - - public static final String SERIALIZED_NAME_ORG_ID = "orgId"; - @SerializedName(SERIALIZED_NAME_ORG_ID) - private String orgId; - - public static final String SERIALIZED_NAME_ORG_NAME = "orgName"; - @SerializedName(SERIALIZED_NAME_ORG_NAME) - private String orgName; - - public static final String SERIALIZED_NAME_OWNER_NAME = "ownerName"; - @SerializedName(SERIALIZED_NAME_OWNER_NAME) - private String ownerName; - - public static final String SERIALIZED_NAME_OWNER_EMAIL = "ownerEmail"; - @SerializedName(SERIALIZED_NAME_OWNER_EMAIL) - private String ownerEmail; - - public static final String SERIALIZED_NAME_OWNER_DISPLAY_NAME = "ownerDisplayName"; - @SerializedName(SERIALIZED_NAME_OWNER_DISPLAY_NAME) - private String ownerDisplayName; - - public OpenAppDTO() { - } - - public OpenAppDTO dataChangeCreatedBy(String dataChangeCreatedBy) { - - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * 数据创建者用户名,记录是谁创建了这个应用 - * @return dataChangeCreatedBy - **/ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - - public void setDataChangeCreatedBy(String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public OpenAppDTO dataChangeCreatedByDisplayName(String dataChangeCreatedByDisplayName) { - - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * 数据创建者显示名称,用于展示创建者的友好名称 - * @return dataChangeCreatedByDisplayName - **/ - @javax.annotation.Nullable - public String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - - public void setDataChangeCreatedByDisplayName(String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - - public OpenAppDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { - - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * 数据最后修改者用户名,记录最后一次修改应用信息的用户 - * @return dataChangeLastModifiedBy - **/ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - - public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public OpenAppDTO dataChangeLastModifiedByDisplayName(String dataChangeLastModifiedByDisplayName) { - - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * 数据最后修改者显示名称,用于展示最后修改者的友好名称 - * @return dataChangeLastModifiedByDisplayName - **/ - @javax.annotation.Nullable - public String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - - public void setDataChangeLastModifiedByDisplayName(String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - - 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(String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - 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(String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public OpenAppDTO name(String name) { - - this.name = name; - return this; - } - - /** - * 应用名称,用于显示的友好名称 - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public OpenAppDTO appId(String appId) { - - this.appId = appId; - return this; - } - - /** - * 应用唯一标识符,全局唯一的应用ID - * @return appId - **/ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - - public void setAppId(String appId) { - this.appId = appId; - } - - - public OpenAppDTO orgId(String orgId) { - - this.orgId = orgId; - return this; - } - - /** - * 组织ID,应用所属组织的唯一标识 - * @return orgId - **/ - @javax.annotation.Nullable - public String getOrgId() { - return orgId; - } - - - public void setOrgId(String orgId) { - this.orgId = orgId; - } - - - public OpenAppDTO orgName(String orgName) { - - this.orgName = orgName; - return this; - } - - /** - * 组织名称,应用所属组织的显示名称 - * @return orgName - **/ - @javax.annotation.Nullable - public String getOrgName() { - return orgName; - } - - - public void setOrgName(String orgName) { - this.orgName = orgName; - } - - - public OpenAppDTO ownerName(String ownerName) { - - this.ownerName = ownerName; - return this; - } - - /** - * 应用负责人姓名,应用的主要负责人 - * @return ownerName - **/ - @javax.annotation.Nullable - public String getOwnerName() { - return ownerName; - } - - - public void setOwnerName(String ownerName) { - this.ownerName = ownerName; - } - - - public OpenAppDTO ownerEmail(String ownerEmail) { - - this.ownerEmail = ownerEmail; - return this; - } - - /** - * 应用负责人邮箱地址,用于接收应用相关通知 - * @return ownerEmail - **/ - @javax.annotation.Nullable - public String getOwnerEmail() { - return ownerEmail; - } - - - public void setOwnerEmail(String ownerEmail) { - this.ownerEmail = ownerEmail; - } - - - public OpenAppDTO ownerDisplayName(String ownerDisplayName) { - - this.ownerDisplayName = ownerDisplayName; - return this; - } - - /** - * Get ownerDisplayName - * @return ownerDisplayName - **/ - @javax.annotation.Nullable - public String getOwnerDisplayName() { - return ownerDisplayName; - } - - - public void setOwnerDisplayName(String ownerDisplayName) { - this.ownerDisplayName = ownerDisplayName; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenAppDTO openAppDTO = (OpenAppDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openAppDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, openAppDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedBy, openAppDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, openAppDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, openAppDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openAppDTO.dataChangeLastModifiedTime) && - Objects.equals(this.name, openAppDTO.name) && - Objects.equals(this.appId, openAppDTO.appId) && - Objects.equals(this.orgId, openAppDTO.orgId) && - Objects.equals(this.orgName, openAppDTO.orgName) && - Objects.equals(this.ownerName, openAppDTO.ownerName) && - Objects.equals(this.ownerEmail, openAppDTO.ownerEmail) && - Objects.equals(this.ownerDisplayName, openAppDTO.ownerDisplayName); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedBy, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, name, appId, orgId, orgName, ownerName, ownerEmail, ownerDisplayName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenAppDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).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(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); - sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); - sb.append(" ownerName: ").append(toIndentedString(ownerName)).append("\n"); - sb.append(" ownerEmail: ").append(toIndentedString(ownerEmail)).append("\n"); - sb.append(" ownerDisplayName: ").append(toIndentedString(ownerDisplayName)).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("dataChangeCreatedBy"); - openapiFields.add("dataChangeCreatedByDisplayName"); - openapiFields.add("dataChangeLastModifiedBy"); - openapiFields.add("dataChangeLastModifiedByDisplayName"); - openapiFields.add("dataChangeCreatedTime"); - openapiFields.add("dataChangeLastModifiedTime"); - openapiFields.add("name"); - openapiFields.add("appId"); - openapiFields.add("orgId"); - openapiFields.add("orgName"); - openapiFields.add("ownerName"); - openapiFields.add("ownerEmail"); - openapiFields.add("ownerDisplayName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - 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(), jsonObj.toString())); - } - } - 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("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("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("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") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("orgId") != null && !jsonObj.get("orgId").isJsonNull()) && !jsonObj.get("orgId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `orgId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orgId").toString())); - } - if ((jsonObj.get("orgName") != null && !jsonObj.get("orgName").isJsonNull()) && !jsonObj.get("orgName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `orgName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orgName").toString())); - } - if ((jsonObj.get("ownerName") != null && !jsonObj.get("ownerName").isJsonNull()) && !jsonObj.get("ownerName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerName").toString())); - } - if ((jsonObj.get("ownerEmail") != null && !jsonObj.get("ownerEmail").isJsonNull()) && !jsonObj.get("ownerEmail").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerEmail` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerEmail").toString())); - } - if ((jsonObj.get("ownerDisplayName") != null && !jsonObj.get("ownerDisplayName").isJsonNull()) && !jsonObj.get("ownerDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ownerDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ownerDisplayName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenAppDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenAppDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenAppDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenAppDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenAppDTO read(JsonReader in) throws IOException { - 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 - */ - public static OpenAppDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenAppDTO.class); - } - - /** - * Convert an instance of OpenAppDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenAppNamespaceDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenAppNamespaceDTO.java deleted file mode 100644 index c6ee1c4e..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenAppNamespaceDTO.java +++ /dev/null @@ -1,541 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenAppNamespaceDTO { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME = "dataChangeCreatedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME) - private String dataChangeCreatedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME = "dataChangeLastModifiedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME) - private String dataChangeLastModifiedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - private String appId; - - public static final String SERIALIZED_NAME_FORMAT = "format"; - @SerializedName(SERIALIZED_NAME_FORMAT) - private String format; - - public static final String SERIALIZED_NAME_IS_PUBLIC = "isPublic"; - @SerializedName(SERIALIZED_NAME_IS_PUBLIC) - private Boolean isPublic; - - public static final String SERIALIZED_NAME_APPEND_NAMESPACE_PREFIX = "appendNamespacePrefix"; - @SerializedName(SERIALIZED_NAME_APPEND_NAMESPACE_PREFIX) - private Boolean appendNamespacePrefix = true; - - public static final String SERIALIZED_NAME_COMMENT = "comment"; - @SerializedName(SERIALIZED_NAME_COMMENT) - private String comment; - - public OpenAppNamespaceDTO() { - } - - public OpenAppNamespaceDTO dataChangeCreatedBy(String dataChangeCreatedBy) { - - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * 命名空间创建者用户名,记录是谁创建了这个应用命名空间 - * @return dataChangeCreatedBy - **/ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - - public void setDataChangeCreatedBy(String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public OpenAppNamespaceDTO dataChangeCreatedByDisplayName(String dataChangeCreatedByDisplayName) { - - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * 命名空间创建者显示名称,用于展示创建者的友好名称 - * @return dataChangeCreatedByDisplayName - **/ - @javax.annotation.Nullable - public String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - - public void setDataChangeCreatedByDisplayName(String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - - public OpenAppNamespaceDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { - - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 - * @return dataChangeLastModifiedBy - **/ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - - public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public OpenAppNamespaceDTO dataChangeLastModifiedByDisplayName(String dataChangeLastModifiedByDisplayName) { - - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * 命名空间最后修改者显示名称,用于展示最后修改者的友好名称 - * @return dataChangeLastModifiedByDisplayName - **/ - @javax.annotation.Nullable - public String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - - public void setDataChangeLastModifiedByDisplayName(String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - - 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(String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - 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(String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public OpenAppNamespaceDTO name(String name) { - - this.name = name; - return this; - } - - /** - * 命名空间名称,在同一应用内唯一标识一个命名空间 - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public OpenAppNamespaceDTO appId(String appId) { - - this.appId = appId; - return this; - } - - /** - * 所属应用的唯一标识符 - * @return appId - **/ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - - public void setAppId(String appId) { - this.appId = appId; - } - - - public 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(String format) { - this.format = format; - } - - - public OpenAppNamespaceDTO isPublic(Boolean isPublic) { - - this.isPublic = isPublic; - return this; - } - - /** - * 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - * @return isPublic - **/ - @javax.annotation.Nullable - public Boolean getIsPublic() { - return isPublic; - } - - - public void setIsPublic(Boolean isPublic) { - this.isPublic = isPublic; - } - - - public OpenAppNamespaceDTO appendNamespacePrefix(Boolean appendNamespacePrefix) { - - this.appendNamespacePrefix = appendNamespacePrefix; - return this; - } - - /** - * 对于公共命名空间,是否在命名空间名称前添加前缀 - * @return appendNamespacePrefix - **/ - @javax.annotation.Nullable - public Boolean getAppendNamespacePrefix() { - return appendNamespacePrefix; - } - - - public void setAppendNamespacePrefix(Boolean appendNamespacePrefix) { - this.appendNamespacePrefix = appendNamespacePrefix; - } - - - public OpenAppNamespaceDTO comment(String comment) { - - this.comment = comment; - return this; - } - - /** - * 命名空间备注说明,描述命名空间的用途和包含的配置类型 - * @return comment - **/ - @javax.annotation.Nullable - public String getComment() { - return comment; - } - - - public void setComment(String comment) { - this.comment = comment; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenAppNamespaceDTO openAppNamespaceDTO = (OpenAppNamespaceDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openAppNamespaceDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, openAppNamespaceDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedBy, openAppNamespaceDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, openAppNamespaceDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, openAppNamespaceDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openAppNamespaceDTO.dataChangeLastModifiedTime) && - Objects.equals(this.name, openAppNamespaceDTO.name) && - Objects.equals(this.appId, openAppNamespaceDTO.appId) && - Objects.equals(this.format, openAppNamespaceDTO.format) && - Objects.equals(this.isPublic, openAppNamespaceDTO.isPublic) && - Objects.equals(this.appendNamespacePrefix, openAppNamespaceDTO.appendNamespacePrefix) && - Objects.equals(this.comment, openAppNamespaceDTO.comment); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedBy, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, name, appId, format, isPublic, appendNamespacePrefix, comment); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenAppNamespaceDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).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(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" format: ").append(toIndentedString(format)).append("\n"); - sb.append(" isPublic: ").append(toIndentedString(isPublic)).append("\n"); - sb.append(" appendNamespacePrefix: ").append(toIndentedString(appendNamespacePrefix)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("dataChangeCreatedBy"); - openapiFields.add("dataChangeCreatedByDisplayName"); - openapiFields.add("dataChangeLastModifiedBy"); - openapiFields.add("dataChangeLastModifiedByDisplayName"); - 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(); - } - - /** - * 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - 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(), jsonObj.toString())); - } - } - 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("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("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("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") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("format") != null && !jsonObj.get("format").isJsonNull()) && !jsonObj.get("format").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("format").toString())); - } - if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenAppNamespaceDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenAppNamespaceDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenAppNamespaceDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenAppNamespaceDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenAppNamespaceDTO read(JsonReader in) throws IOException { - 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 - */ - public static OpenAppNamespaceDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenAppNamespaceDTO.class); - } - - /** - * Convert an instance of OpenAppNamespaceDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenAppRoleUserDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenAppRoleUserDTO.java deleted file mode 100644 index 1ca5444b..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenAppRoleUserDTO.java +++ /dev/null @@ -1,259 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.OpenUserInfoDTO; - -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; - -/** - * OpenAppRoleUserDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenAppRoleUserDTO { - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - private String appId; - - public static final String SERIALIZED_NAME_MASTER_USERS = "masterUsers"; - @SerializedName(SERIALIZED_NAME_MASTER_USERS) - private List masterUsers; - - public OpenAppRoleUserDTO() { - } - - public OpenAppRoleUserDTO appId(String appId) { - - this.appId = appId; - return this; - } - - /** - * - * @return appId - **/ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - - public void setAppId(String appId) { - this.appId = appId; - } - - - public OpenAppRoleUserDTO masterUsers(List masterUsers) { - - this.masterUsers = masterUsers; - return this; - } - - public OpenAppRoleUserDTO addMasterUsersItem(OpenUserInfoDTO masterUsersItem) { - if (this.masterUsers == null) { - this.masterUsers = new ArrayList<>(); - } - this.masterUsers.add(masterUsersItem); - return this; - } - - /** - * - * @return masterUsers - **/ - @javax.annotation.Nullable - public List getMasterUsers() { - return masterUsers; - } - - - public void setMasterUsers(List masterUsers) { - this.masterUsers = masterUsers; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenAppRoleUserDTO openAppRoleUserDTO = (OpenAppRoleUserDTO) o; - return Objects.equals(this.appId, openAppRoleUserDTO.appId) && - Objects.equals(this.masterUsers, openAppRoleUserDTO.masterUsers); - } - - @Override - public int hashCode() { - return Objects.hash(appId, masterUsers); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenAppRoleUserDTO {\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" masterUsers: ").append(toIndentedString(masterUsers)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("appId"); - openapiFields.add("masterUsers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OpenAppRoleUserDTO - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OpenAppRoleUserDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenAppRoleUserDTO is not found in the empty JSON string", OpenAppRoleUserDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OpenAppRoleUserDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenAppRoleUserDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if (jsonObj.get("masterUsers") != null && !jsonObj.get("masterUsers").isJsonNull()) { - JsonArray jsonArraymasterUsers = jsonObj.getAsJsonArray("masterUsers"); - if (jsonArraymasterUsers != null) { - // ensure the json data is an array - if (!jsonObj.get("masterUsers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `masterUsers` to be an array in the JSON string but got `%s`", jsonObj.get("masterUsers").toString())); - } - - // validate the optional field `masterUsers` (array) - for (int i = 0; i < jsonArraymasterUsers.size(); i++) { - OpenUserInfoDTO.validateJsonObject(jsonArraymasterUsers.get(i).getAsJsonObject()); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenAppRoleUserDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenAppRoleUserDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenAppRoleUserDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenAppRoleUserDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenAppRoleUserDTO read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenAppRoleUserDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenAppRoleUserDTO - * @throws IOException if the JSON string is invalid with respect to OpenAppRoleUserDTO - */ - public static OpenAppRoleUserDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenAppRoleUserDTO.class); - } - - /** - * Convert an instance of OpenAppRoleUserDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenClusterDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenClusterDTO.java deleted file mode 100644 index 6fd15dae..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenClusterDTO.java +++ /dev/null @@ -1,510 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenClusterDTO { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME = "dataChangeCreatedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME) - private String dataChangeCreatedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME = "dataChangeLastModifiedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME) - private String dataChangeLastModifiedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - private String appId; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private Long id; - - public static final String SERIALIZED_NAME_PARENT_CLUSTER_ID = "parentClusterId"; - @SerializedName(SERIALIZED_NAME_PARENT_CLUSTER_ID) - private Long parentClusterId; - - public static final String SERIALIZED_NAME_COMMENT = "comment"; - @SerializedName(SERIALIZED_NAME_COMMENT) - private String comment; - - public OpenClusterDTO() { - } - - public OpenClusterDTO dataChangeCreatedBy(String dataChangeCreatedBy) { - - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * 集群创建者用户名,记录是谁创建了这个集群 - * @return dataChangeCreatedBy - **/ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - - public void setDataChangeCreatedBy(String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public OpenClusterDTO dataChangeCreatedByDisplayName(String dataChangeCreatedByDisplayName) { - - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * 集群创建者显示名称,用于展示创建者的友好名称 - * @return dataChangeCreatedByDisplayName - **/ - @javax.annotation.Nullable - public String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - - public void setDataChangeCreatedByDisplayName(String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - - public OpenClusterDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { - - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * 集群最后修改者用户名,记录最后一次修改集群信息的用户 - * @return dataChangeLastModifiedBy - **/ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - - public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public OpenClusterDTO dataChangeLastModifiedByDisplayName(String dataChangeLastModifiedByDisplayName) { - - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * 集群最后修改者显示名称,用于展示最后修改者的友好名称 - * @return dataChangeLastModifiedByDisplayName - **/ - @javax.annotation.Nullable - public String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - - public void setDataChangeLastModifiedByDisplayName(String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - - 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(String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - 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(String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public OpenClusterDTO name(String name) { - - this.name = name; - return this; - } - - /** - * 集群名称,在同一应用和环境下唯一标识一个集群 - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public OpenClusterDTO appId(String appId) { - - this.appId = appId; - return this; - } - - /** - * 所属应用的唯一标识符 - * @return appId - **/ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - - public void setAppId(String appId) { - this.appId = appId; - } - - - public OpenClusterDTO id(Long id) { - - this.id = id; - return this; - } - - /** - * 集群的唯一标识符 - * @return id - **/ - @javax.annotation.Nullable - public Long getId() { - return id; - } - - - public void setId(Long id) { - this.id = id; - } - - - public OpenClusterDTO parentClusterId(Long parentClusterId) { - - this.parentClusterId = parentClusterId; - return this; - } - - /** - * 父集群的ID - * @return parentClusterId - **/ - @javax.annotation.Nullable - public Long getParentClusterId() { - return parentClusterId; - } - - - public void setParentClusterId(Long parentClusterId) { - this.parentClusterId = parentClusterId; - } - - - public OpenClusterDTO comment(String comment) { - - this.comment = comment; - return this; - } - - /** - * 集群的备注说明 - * @return comment - **/ - @javax.annotation.Nullable - public String getComment() { - return comment; - } - - - public void setComment(String comment) { - this.comment = comment; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenClusterDTO openClusterDTO = (OpenClusterDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openClusterDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, openClusterDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedBy, openClusterDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, openClusterDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, openClusterDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openClusterDTO.dataChangeLastModifiedTime) && - Objects.equals(this.name, openClusterDTO.name) && - Objects.equals(this.appId, openClusterDTO.appId) && - Objects.equals(this.id, openClusterDTO.id) && - Objects.equals(this.parentClusterId, openClusterDTO.parentClusterId) && - Objects.equals(this.comment, openClusterDTO.comment); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedBy, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, name, appId, id, parentClusterId, comment); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenClusterDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).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(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).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(); - openapiFields.add("dataChangeCreatedBy"); - openapiFields.add("dataChangeCreatedByDisplayName"); - openapiFields.add("dataChangeLastModifiedBy"); - openapiFields.add("dataChangeLastModifiedByDisplayName"); - openapiFields.add("dataChangeCreatedTime"); - openapiFields.add("dataChangeLastModifiedTime"); - openapiFields.add("name"); - openapiFields.add("appId"); - openapiFields.add("id"); - openapiFields.add("parentClusterId"); - openapiFields.add("comment"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - 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(), jsonObj.toString())); - } - } - 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("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("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("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") != 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("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 (!OpenClusterDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenClusterDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenClusterDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenClusterDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenClusterDTO read(JsonReader in) throws IOException { - 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 - */ - public static OpenClusterDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenClusterDTO.class); - } - - /** - * Convert an instance of OpenClusterDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenClusterNamespaceRoleUserDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenClusterNamespaceRoleUserDTO.java deleted file mode 100644 index d3967843..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenClusterNamespaceRoleUserDTO.java +++ /dev/null @@ -1,371 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.OpenUserInfoDTO; - -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; - -/** - * OpenClusterNamespaceRoleUserDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenClusterNamespaceRoleUserDTO { - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - private String appId; - - public static final String SERIALIZED_NAME_ENV = "env"; - @SerializedName(SERIALIZED_NAME_ENV) - private String env; - - public static final String SERIALIZED_NAME_CLUSTER = "cluster"; - @SerializedName(SERIALIZED_NAME_CLUSTER) - private String cluster; - - public static final String SERIALIZED_NAME_MODIFY_ROLE_USERS = "modifyRoleUsers"; - @SerializedName(SERIALIZED_NAME_MODIFY_ROLE_USERS) - private List modifyRoleUsers; - - public static final String SERIALIZED_NAME_RELEASE_ROLE_USERS = "releaseRoleUsers"; - @SerializedName(SERIALIZED_NAME_RELEASE_ROLE_USERS) - private List releaseRoleUsers; - - public OpenClusterNamespaceRoleUserDTO() { - } - - public OpenClusterNamespaceRoleUserDTO appId(String appId) { - - this.appId = appId; - return this; - } - - /** - * - * @return appId - **/ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - - public void setAppId(String appId) { - this.appId = appId; - } - - - public OpenClusterNamespaceRoleUserDTO env(String env) { - - this.env = env; - return this; - } - - /** - * - * @return env - **/ - @javax.annotation.Nullable - public String getEnv() { - return env; - } - - - public void setEnv(String env) { - this.env = env; - } - - - public OpenClusterNamespaceRoleUserDTO cluster(String cluster) { - - this.cluster = cluster; - return this; - } - - /** - * - * @return cluster - **/ - @javax.annotation.Nullable - public String getCluster() { - return cluster; - } - - - public void setCluster(String cluster) { - this.cluster = cluster; - } - - - public OpenClusterNamespaceRoleUserDTO modifyRoleUsers(List modifyRoleUsers) { - - this.modifyRoleUsers = modifyRoleUsers; - return this; - } - - public OpenClusterNamespaceRoleUserDTO addModifyRoleUsersItem(OpenUserInfoDTO modifyRoleUsersItem) { - if (this.modifyRoleUsers == null) { - this.modifyRoleUsers = new ArrayList<>(); - } - this.modifyRoleUsers.add(modifyRoleUsersItem); - return this; - } - - /** - * - * @return modifyRoleUsers - **/ - @javax.annotation.Nullable - public List getModifyRoleUsers() { - return modifyRoleUsers; - } - - - public void setModifyRoleUsers(List modifyRoleUsers) { - this.modifyRoleUsers = modifyRoleUsers; - } - - - public OpenClusterNamespaceRoleUserDTO releaseRoleUsers(List releaseRoleUsers) { - - this.releaseRoleUsers = releaseRoleUsers; - return this; - } - - public OpenClusterNamespaceRoleUserDTO addReleaseRoleUsersItem(OpenUserInfoDTO releaseRoleUsersItem) { - if (this.releaseRoleUsers == null) { - this.releaseRoleUsers = new ArrayList<>(); - } - this.releaseRoleUsers.add(releaseRoleUsersItem); - return this; - } - - /** - * - * @return releaseRoleUsers - **/ - @javax.annotation.Nullable - public List getReleaseRoleUsers() { - return releaseRoleUsers; - } - - - public void setReleaseRoleUsers(List releaseRoleUsers) { - this.releaseRoleUsers = releaseRoleUsers; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenClusterNamespaceRoleUserDTO openClusterNamespaceRoleUserDTO = (OpenClusterNamespaceRoleUserDTO) o; - return Objects.equals(this.appId, openClusterNamespaceRoleUserDTO.appId) && - Objects.equals(this.env, openClusterNamespaceRoleUserDTO.env) && - Objects.equals(this.cluster, openClusterNamespaceRoleUserDTO.cluster) && - Objects.equals(this.modifyRoleUsers, openClusterNamespaceRoleUserDTO.modifyRoleUsers) && - Objects.equals(this.releaseRoleUsers, openClusterNamespaceRoleUserDTO.releaseRoleUsers); - } - - @Override - public int hashCode() { - return Objects.hash(appId, env, cluster, modifyRoleUsers, releaseRoleUsers); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenClusterNamespaceRoleUserDTO {\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" env: ").append(toIndentedString(env)).append("\n"); - sb.append(" cluster: ").append(toIndentedString(cluster)).append("\n"); - sb.append(" modifyRoleUsers: ").append(toIndentedString(modifyRoleUsers)).append("\n"); - sb.append(" releaseRoleUsers: ").append(toIndentedString(releaseRoleUsers)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("appId"); - openapiFields.add("env"); - openapiFields.add("cluster"); - openapiFields.add("modifyRoleUsers"); - openapiFields.add("releaseRoleUsers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OpenClusterNamespaceRoleUserDTO - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OpenClusterNamespaceRoleUserDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenClusterNamespaceRoleUserDTO is not found in the empty JSON string", OpenClusterNamespaceRoleUserDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OpenClusterNamespaceRoleUserDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenClusterNamespaceRoleUserDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("env") != null && !jsonObj.get("env").isJsonNull()) && !jsonObj.get("env").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `env` to be a primitive type in the JSON string but got `%s`", jsonObj.get("env").toString())); - } - if ((jsonObj.get("cluster") != null && !jsonObj.get("cluster").isJsonNull()) && !jsonObj.get("cluster").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `cluster` to be a primitive type in the JSON string but got `%s`", jsonObj.get("cluster").toString())); - } - if (jsonObj.get("modifyRoleUsers") != null && !jsonObj.get("modifyRoleUsers").isJsonNull()) { - JsonArray jsonArraymodifyRoleUsers = jsonObj.getAsJsonArray("modifyRoleUsers"); - if (jsonArraymodifyRoleUsers != null) { - // ensure the json data is an array - if (!jsonObj.get("modifyRoleUsers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `modifyRoleUsers` to be an array in the JSON string but got `%s`", jsonObj.get("modifyRoleUsers").toString())); - } - - // validate the optional field `modifyRoleUsers` (array) - for (int i = 0; i < jsonArraymodifyRoleUsers.size(); i++) { - OpenUserInfoDTO.validateJsonObject(jsonArraymodifyRoleUsers.get(i).getAsJsonObject()); - }; - } - } - if (jsonObj.get("releaseRoleUsers") != null && !jsonObj.get("releaseRoleUsers").isJsonNull()) { - JsonArray jsonArrayreleaseRoleUsers = jsonObj.getAsJsonArray("releaseRoleUsers"); - if (jsonArrayreleaseRoleUsers != null) { - // ensure the json data is an array - if (!jsonObj.get("releaseRoleUsers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `releaseRoleUsers` to be an array in the JSON string but got `%s`", jsonObj.get("releaseRoleUsers").toString())); - } - - // validate the optional field `releaseRoleUsers` (array) - for (int i = 0; i < jsonArrayreleaseRoleUsers.size(); i++) { - OpenUserInfoDTO.validateJsonObject(jsonArrayreleaseRoleUsers.get(i).getAsJsonObject()); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenClusterNamespaceRoleUserDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenClusterNamespaceRoleUserDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenClusterNamespaceRoleUserDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenClusterNamespaceRoleUserDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenClusterNamespaceRoleUserDTO read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenClusterNamespaceRoleUserDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenClusterNamespaceRoleUserDTO - * @throws IOException if the JSON string is invalid with respect to OpenClusterNamespaceRoleUserDTO - */ - public static OpenClusterNamespaceRoleUserDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenClusterNamespaceRoleUserDTO.class); - } - - /** - * Convert an instance of OpenClusterNamespaceRoleUserDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenCreateAppDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenCreateAppDTO.java deleted file mode 100644 index c0d99a06..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenCreateAppDTO.java +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.LinkedHashSet; -import java.util.Set; -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.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenCreateAppDTO { - public static final String SERIALIZED_NAME_ASSIGN_APP_ROLE_TO_SELF = "assignAppRoleToSelf"; - @SerializedName(SERIALIZED_NAME_ASSIGN_APP_ROLE_TO_SELF) - private Boolean assignAppRoleToSelf; - - public static final String SERIALIZED_NAME_ADMINS = "admins"; - @SerializedName(SERIALIZED_NAME_ADMINS) - private Set admins; - - public static final String SERIALIZED_NAME_APP = "app"; - @SerializedName(SERIALIZED_NAME_APP) - private OpenAppDTO app; - - public OpenCreateAppDTO() { - } - - 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(Boolean assignAppRoleToSelf) { - this.assignAppRoleToSelf = assignAppRoleToSelf; - } - - - public OpenCreateAppDTO admins(Set admins) { - - this.admins = admins; - return this; - } - - public OpenCreateAppDTO addAdminsItem(String adminsItem) { - if (this.admins == null) { - this.admins = new LinkedHashSet<>(); - } - this.admins.add(adminsItem); - return this; - } - - /** - * 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 - * @return admins - **/ - @javax.annotation.Nullable - public Set getAdmins() { - return admins; - } - - - public void setAdmins(Set admins) { - this.admins = admins; - } - - - 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(OpenAppDTO app) { - this.app = app; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenCreateAppDTO openCreateAppDTO = (OpenCreateAppDTO) o; - return Objects.equals(this.assignAppRoleToSelf, openCreateAppDTO.assignAppRoleToSelf) && - Objects.equals(this.admins, openCreateAppDTO.admins) && - Objects.equals(this.app, openCreateAppDTO.app); - } - - @Override - public int hashCode() { - return Objects.hash(assignAppRoleToSelf, admins, app); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenCreateAppDTO {\n"); - sb.append(" assignAppRoleToSelf: ").append(toIndentedString(assignAppRoleToSelf)).append("\n"); - sb.append(" admins: ").append(toIndentedString(admins)).append("\n"); - sb.append(" app: ").append(toIndentedString(app)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("assignAppRoleToSelf"); - openapiFields.add("admins"); - openapiFields.add("app"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - 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(), jsonObj.toString())); - } - } - // ensure the optional json data is an array if present - 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.validateJsonObject(jsonObj.getAsJsonObject("app")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenCreateAppDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenCreateAppDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenCreateAppDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenCreateAppDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenCreateAppDTO read(JsonReader in) throws IOException { - 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 - */ - public static OpenCreateAppDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenCreateAppDTO.class); - } - - /** - * Convert an instance of OpenCreateAppDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenCreateNamespaceDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenCreateNamespaceDTO.java deleted file mode 100644 index 9acc0d01..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenCreateNamespaceDTO.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenCreateNamespaceDTO { - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - private String appId; - - public static final String SERIALIZED_NAME_ENV = "env"; - @SerializedName(SERIALIZED_NAME_ENV) - private String env; - - public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; - @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - private String clusterName; - - public static final String SERIALIZED_NAME_APP_NAMESPACE_NAME = "appNamespaceName"; - @SerializedName(SERIALIZED_NAME_APP_NAMESPACE_NAME) - private String appNamespaceName; - - public OpenCreateNamespaceDTO() { - } - - public OpenCreateNamespaceDTO appId(String appId) { - - this.appId = appId; - return this; - } - - /** - * 所属应用的唯一标识符 - * @return appId - **/ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - - public void setAppId(String appId) { - this.appId = appId; - } - - - public OpenCreateNamespaceDTO env(String env) { - - this.env = env; - return this; - } - - /** - * 所在那个环境创建 - * @return env - **/ - @javax.annotation.Nullable - public String getEnv() { - return env; - } - - - public void setEnv(String env) { - this.env = env; - } - - - public OpenCreateNamespaceDTO clusterName(String clusterName) { - - this.clusterName = clusterName; - return this; - } - - /** - * 所属集群的名称 - * @return clusterName - **/ - @javax.annotation.Nullable - public String getClusterName() { - return clusterName; - } - - - public void setClusterName(String clusterName) { - this.clusterName = clusterName; - } - - - public OpenCreateNamespaceDTO appNamespaceName(String appNamespaceName) { - - this.appNamespaceName = appNamespaceName; - return this; - } - - /** - * 根据已创建的appnamespace来实例化namespace - * @return appNamespaceName - **/ - @javax.annotation.Nullable - public String getAppNamespaceName() { - return appNamespaceName; - } - - - public void setAppNamespaceName(String appNamespaceName) { - this.appNamespaceName = appNamespaceName; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenCreateNamespaceDTO openCreateNamespaceDTO = (OpenCreateNamespaceDTO) o; - return Objects.equals(this.appId, openCreateNamespaceDTO.appId) && - Objects.equals(this.env, openCreateNamespaceDTO.env) && - Objects.equals(this.clusterName, openCreateNamespaceDTO.clusterName) && - Objects.equals(this.appNamespaceName, openCreateNamespaceDTO.appNamespaceName); - } - - @Override - public int hashCode() { - return Objects.hash(appId, env, clusterName, appNamespaceName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenCreateNamespaceDTO {\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" env: ").append(toIndentedString(env)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" appNamespaceName: ").append(toIndentedString(appNamespaceName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("appId"); - openapiFields.add("env"); - openapiFields.add("clusterName"); - openapiFields.add("appNamespaceName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OpenCreateNamespaceDTO - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OpenCreateNamespaceDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenCreateNamespaceDTO is not found in the empty JSON string", OpenCreateNamespaceDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OpenCreateNamespaceDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenCreateNamespaceDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("env") != null && !jsonObj.get("env").isJsonNull()) && !jsonObj.get("env").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `env` to be a primitive type in the JSON string but got `%s`", jsonObj.get("env").toString())); - } - if ((jsonObj.get("clusterName") != null && !jsonObj.get("clusterName").isJsonNull()) && !jsonObj.get("clusterName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `clusterName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clusterName").toString())); - } - if ((jsonObj.get("appNamespaceName") != null && !jsonObj.get("appNamespaceName").isJsonNull()) && !jsonObj.get("appNamespaceName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appNamespaceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appNamespaceName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenCreateNamespaceDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenCreateNamespaceDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenCreateNamespaceDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenCreateNamespaceDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenCreateNamespaceDTO read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenCreateNamespaceDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenCreateNamespaceDTO - * @throws IOException if the JSON string is invalid with respect to OpenCreateNamespaceDTO - */ - public static OpenCreateNamespaceDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenCreateNamespaceDTO.class); - } - - /** - * Convert an instance of OpenCreateNamespaceDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterDTO.java deleted file mode 100644 index d3224e79..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterDTO.java +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 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; - -/** - * OpenEnvClusterDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenEnvClusterDTO { - public static final String SERIALIZED_NAME_ENV = "env"; - @SerializedName(SERIALIZED_NAME_ENV) - private String env; - - public static final String SERIALIZED_NAME_CLUSTERS = "clusters"; - @SerializedName(SERIALIZED_NAME_CLUSTERS) - private List clusters; - - public OpenEnvClusterDTO() { - } - - 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(String env) { - this.env = env; - } - - - public OpenEnvClusterDTO clusters(List clusters) { - - this.clusters = clusters; - return this; - } - - public OpenEnvClusterDTO addClustersItem(String clustersItem) { - if (this.clusters == null) { - this.clusters = new ArrayList<>(); - } - this.clusters.add(clustersItem); - return this; - } - - /** - * 该环境下的集群名称列表 - * @return clusters - **/ - @javax.annotation.Nullable - public List getClusters() { - return clusters; - } - - - public void setClusters(List clusters) { - this.clusters = clusters; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenEnvClusterDTO openEnvClusterDTO = (OpenEnvClusterDTO) o; - return Objects.equals(this.env, openEnvClusterDTO.env) && - Objects.equals(this.clusters, openEnvClusterDTO.clusters); - } - - @Override - public int hashCode() { - return Objects.hash(env, clusters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenEnvClusterDTO {\n"); - sb.append(" env: ").append(toIndentedString(env)).append("\n"); - sb.append(" clusters: ").append(toIndentedString(clusters)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("env"); - openapiFields.add("clusters"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - 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(), jsonObj.toString())); - } - } - if ((jsonObj.get("env") != null && !jsonObj.get("env").isJsonNull()) && !jsonObj.get("env").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `env` to be a primitive type in the JSON string but got `%s`", jsonObj.get("env").toString())); - } - // ensure the optional json data is an array if present - 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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenEnvClusterDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenEnvClusterDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenEnvClusterDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenEnvClusterDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenEnvClusterDTO read(JsonReader in) throws IOException { - 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 - */ - public static OpenEnvClusterDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenEnvClusterDTO.class); - } - - /** - * Convert an instance of OpenEnvClusterDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterInfo.java b/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterInfo.java deleted file mode 100644 index cd24dd39..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenEnvClusterInfo.java +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.OpenClusterDTO; - -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; - -/** - * OpenEnvClusterInfo - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenEnvClusterInfo { - public static final String SERIALIZED_NAME_CODE = "code"; - @SerializedName(SERIALIZED_NAME_CODE) - private Integer code; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - private String message; - - public static final String SERIALIZED_NAME_ENV = "env"; - @SerializedName(SERIALIZED_NAME_ENV) - private String env; - - public static final String SERIALIZED_NAME_CLUSTERS = "clusters"; - @SerializedName(SERIALIZED_NAME_CLUSTERS) - private List clusters; - - public OpenEnvClusterInfo() { - } - - public OpenEnvClusterInfo code(Integer code) { - - this.code = code; - return this; - } - - /** - * 查询状态码 - * @return code - **/ - @javax.annotation.Nullable - public Integer getCode() { - return code; - } - - - public void setCode(Integer code) { - this.code = code; - } - - - public OpenEnvClusterInfo message(String message) { - - this.message = message; - return this; - } - - /** - * 相关信息 - * @return message - **/ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - - public void setMessage(String message) { - this.message = message; - } - - - public OpenEnvClusterInfo env(String env) { - - this.env = env; - return this; - } - - /** - * 环境标识 - * @return env - **/ - @javax.annotation.Nullable - public String getEnv() { - return env; - } - - - public void setEnv(String env) { - this.env = env; - } - - - public OpenEnvClusterInfo clusters(List clusters) { - - this.clusters = clusters; - return this; - } - - public OpenEnvClusterInfo addClustersItem(OpenClusterDTO clustersItem) { - if (this.clusters == null) { - this.clusters = new ArrayList<>(); - } - this.clusters.add(clustersItem); - return this; - } - - /** - * 集群信息列表 - * @return clusters - **/ - @javax.annotation.Nullable - public List getClusters() { - return clusters; - } - - - public void setClusters(List clusters) { - this.clusters = clusters; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenEnvClusterInfo openEnvClusterInfo = (OpenEnvClusterInfo) o; - return Objects.equals(this.code, openEnvClusterInfo.code) && - Objects.equals(this.message, openEnvClusterInfo.message) && - Objects.equals(this.env, openEnvClusterInfo.env) && - Objects.equals(this.clusters, openEnvClusterInfo.clusters); - } - - @Override - public int hashCode() { - return Objects.hash(code, message, env, clusters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenEnvClusterInfo {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" env: ").append(toIndentedString(env)).append("\n"); - sb.append(" clusters: ").append(toIndentedString(clusters)).append("\n"); - sb.append("}"); - 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("env"); - openapiFields.add("clusters"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - 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())); - } - } - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - if ((jsonObj.get("env") != null && !jsonObj.get("env").isJsonNull()) && !jsonObj.get("env").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `env` to be a primitive type in the JSON string but got `%s`", jsonObj.get("env").toString())); - } - if (jsonObj.get("clusters") != null && !jsonObj.get("clusters").isJsonNull()) { - JsonArray jsonArrayclusters = jsonObj.getAsJsonArray("clusters"); - if (jsonArrayclusters != null) { - // ensure the json data is an array - if (!jsonObj.get("clusters").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `clusters` to be an array in the JSON string but got `%s`", jsonObj.get("clusters").toString())); - } - - // validate the optional field `clusters` (array) - for (int i = 0; i < jsonArrayclusters.size(); i++) { - OpenClusterDTO.validateJsonObject(jsonArrayclusters.get(i).getAsJsonObject()); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - 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(OpenEnvClusterInfo.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenEnvClusterInfo value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenEnvClusterInfo read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * 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 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/OpenEnvNamespaceRoleUserDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenEnvNamespaceRoleUserDTO.java deleted file mode 100644 index 6a1e20e0..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenEnvNamespaceRoleUserDTO.java +++ /dev/null @@ -1,371 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.OpenUserInfoDTO; - -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; - -/** - * OpenEnvNamespaceRoleUserDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenEnvNamespaceRoleUserDTO { - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - private String appId; - - public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - private String namespaceName; - - public static final String SERIALIZED_NAME_MODIFY_ROLE_USERS = "modifyRoleUsers"; - @SerializedName(SERIALIZED_NAME_MODIFY_ROLE_USERS) - private List modifyRoleUsers; - - public static final String SERIALIZED_NAME_RELEASE_ROLE_USERS = "releaseRoleUsers"; - @SerializedName(SERIALIZED_NAME_RELEASE_ROLE_USERS) - private List releaseRoleUsers; - - public static final String SERIALIZED_NAME_ENV = "env"; - @SerializedName(SERIALIZED_NAME_ENV) - private String env; - - public OpenEnvNamespaceRoleUserDTO() { - } - - public OpenEnvNamespaceRoleUserDTO appId(String appId) { - - this.appId = appId; - return this; - } - - /** - * - * @return appId - **/ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - - public void setAppId(String appId) { - this.appId = appId; - } - - - public OpenEnvNamespaceRoleUserDTO namespaceName(String namespaceName) { - - this.namespaceName = namespaceName; - return this; - } - - /** - * - * @return namespaceName - **/ - @javax.annotation.Nullable - public String getNamespaceName() { - return namespaceName; - } - - - public void setNamespaceName(String namespaceName) { - this.namespaceName = namespaceName; - } - - - public OpenEnvNamespaceRoleUserDTO modifyRoleUsers(List modifyRoleUsers) { - - this.modifyRoleUsers = modifyRoleUsers; - return this; - } - - public OpenEnvNamespaceRoleUserDTO addModifyRoleUsersItem(OpenUserInfoDTO modifyRoleUsersItem) { - if (this.modifyRoleUsers == null) { - this.modifyRoleUsers = new ArrayList<>(); - } - this.modifyRoleUsers.add(modifyRoleUsersItem); - return this; - } - - /** - * - * @return modifyRoleUsers - **/ - @javax.annotation.Nullable - public List getModifyRoleUsers() { - return modifyRoleUsers; - } - - - public void setModifyRoleUsers(List modifyRoleUsers) { - this.modifyRoleUsers = modifyRoleUsers; - } - - - public OpenEnvNamespaceRoleUserDTO releaseRoleUsers(List releaseRoleUsers) { - - this.releaseRoleUsers = releaseRoleUsers; - return this; - } - - public OpenEnvNamespaceRoleUserDTO addReleaseRoleUsersItem(OpenUserInfoDTO releaseRoleUsersItem) { - if (this.releaseRoleUsers == null) { - this.releaseRoleUsers = new ArrayList<>(); - } - this.releaseRoleUsers.add(releaseRoleUsersItem); - return this; - } - - /** - * - * @return releaseRoleUsers - **/ - @javax.annotation.Nullable - public List getReleaseRoleUsers() { - return releaseRoleUsers; - } - - - public void setReleaseRoleUsers(List releaseRoleUsers) { - this.releaseRoleUsers = releaseRoleUsers; - } - - - public OpenEnvNamespaceRoleUserDTO env(String env) { - - this.env = env; - return this; - } - - /** - * - * @return env - **/ - @javax.annotation.Nullable - public String getEnv() { - return env; - } - - - public void setEnv(String env) { - this.env = env; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenEnvNamespaceRoleUserDTO openEnvNamespaceRoleUserDTO = (OpenEnvNamespaceRoleUserDTO) o; - return Objects.equals(this.appId, openEnvNamespaceRoleUserDTO.appId) && - Objects.equals(this.namespaceName, openEnvNamespaceRoleUserDTO.namespaceName) && - Objects.equals(this.modifyRoleUsers, openEnvNamespaceRoleUserDTO.modifyRoleUsers) && - Objects.equals(this.releaseRoleUsers, openEnvNamespaceRoleUserDTO.releaseRoleUsers) && - Objects.equals(this.env, openEnvNamespaceRoleUserDTO.env); - } - - @Override - public int hashCode() { - return Objects.hash(appId, namespaceName, modifyRoleUsers, releaseRoleUsers, env); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenEnvNamespaceRoleUserDTO {\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" modifyRoleUsers: ").append(toIndentedString(modifyRoleUsers)).append("\n"); - sb.append(" releaseRoleUsers: ").append(toIndentedString(releaseRoleUsers)).append("\n"); - sb.append(" env: ").append(toIndentedString(env)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("appId"); - openapiFields.add("namespaceName"); - openapiFields.add("modifyRoleUsers"); - openapiFields.add("releaseRoleUsers"); - openapiFields.add("env"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OpenEnvNamespaceRoleUserDTO - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OpenEnvNamespaceRoleUserDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenEnvNamespaceRoleUserDTO is not found in the empty JSON string", OpenEnvNamespaceRoleUserDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OpenEnvNamespaceRoleUserDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenEnvNamespaceRoleUserDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("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("modifyRoleUsers") != null && !jsonObj.get("modifyRoleUsers").isJsonNull()) { - JsonArray jsonArraymodifyRoleUsers = jsonObj.getAsJsonArray("modifyRoleUsers"); - if (jsonArraymodifyRoleUsers != null) { - // ensure the json data is an array - if (!jsonObj.get("modifyRoleUsers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `modifyRoleUsers` to be an array in the JSON string but got `%s`", jsonObj.get("modifyRoleUsers").toString())); - } - - // validate the optional field `modifyRoleUsers` (array) - for (int i = 0; i < jsonArraymodifyRoleUsers.size(); i++) { - OpenUserInfoDTO.validateJsonObject(jsonArraymodifyRoleUsers.get(i).getAsJsonObject()); - }; - } - } - if (jsonObj.get("releaseRoleUsers") != null && !jsonObj.get("releaseRoleUsers").isJsonNull()) { - JsonArray jsonArrayreleaseRoleUsers = jsonObj.getAsJsonArray("releaseRoleUsers"); - if (jsonArrayreleaseRoleUsers != null) { - // ensure the json data is an array - if (!jsonObj.get("releaseRoleUsers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `releaseRoleUsers` to be an array in the JSON string but got `%s`", jsonObj.get("releaseRoleUsers").toString())); - } - - // validate the optional field `releaseRoleUsers` (array) - for (int i = 0; i < jsonArrayreleaseRoleUsers.size(); i++) { - OpenUserInfoDTO.validateJsonObject(jsonArrayreleaseRoleUsers.get(i).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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenEnvNamespaceRoleUserDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenEnvNamespaceRoleUserDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenEnvNamespaceRoleUserDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenEnvNamespaceRoleUserDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenEnvNamespaceRoleUserDTO read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenEnvNamespaceRoleUserDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenEnvNamespaceRoleUserDTO - * @throws IOException if the JSON string is invalid with respect to OpenEnvNamespaceRoleUserDTO - */ - public static OpenEnvNamespaceRoleUserDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenEnvNamespaceRoleUserDTO.class); - } - - /** - * Convert an instance of OpenEnvNamespaceRoleUserDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java deleted file mode 100644 index c2af9eba..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleDTO.java +++ /dev/null @@ -1,538 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.LinkedHashSet; -import java.util.Set; -import org.openapitools.client.model.OpenGrayReleaseRuleItemDTO; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenGrayReleaseRuleDTO { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME = "dataChangeCreatedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME) - private String dataChangeCreatedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME = "dataChangeLastModifiedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME) - private String dataChangeLastModifiedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - private String appId; - - public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; - @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - private String clusterName; - - public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - private String namespaceName; - - public static final String SERIALIZED_NAME_BRANCH_NAME = "branchName"; - @SerializedName(SERIALIZED_NAME_BRANCH_NAME) - private String branchName; - - public static final String SERIALIZED_NAME_RULE_ITEMS = "ruleItems"; - @SerializedName(SERIALIZED_NAME_RULE_ITEMS) - private Set ruleItems; - - public OpenGrayReleaseRuleDTO() { - } - - public OpenGrayReleaseRuleDTO dataChangeCreatedBy(String dataChangeCreatedBy) { - - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 - * @return dataChangeCreatedBy - **/ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - - public void setDataChangeCreatedBy(String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public OpenGrayReleaseRuleDTO dataChangeCreatedByDisplayName(String dataChangeCreatedByDisplayName) { - - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * 灰度规则创建者显示名称,用于展示创建者的友好名称 - * @return dataChangeCreatedByDisplayName - **/ - @javax.annotation.Nullable - public String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - - public void setDataChangeCreatedByDisplayName(String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - - public OpenGrayReleaseRuleDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { - - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * 灰度规则最后修改者用户名,记录最后一次修改规则的用户 - * @return dataChangeLastModifiedBy - **/ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - - public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public OpenGrayReleaseRuleDTO dataChangeLastModifiedByDisplayName(String dataChangeLastModifiedByDisplayName) { - - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * 灰度规则最后修改者显示名称,用于展示最后修改者的友好名称 - * @return dataChangeLastModifiedByDisplayName - **/ - @javax.annotation.Nullable - public String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - - public void setDataChangeLastModifiedByDisplayName(String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - - 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(String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - 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(String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public OpenGrayReleaseRuleDTO appId(String appId) { - - this.appId = appId; - return this; - } - - /** - * 所属应用的唯一标识符 - * @return appId - **/ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - - public void setAppId(String appId) { - this.appId = appId; - } - - - public OpenGrayReleaseRuleDTO clusterName(String clusterName) { - - this.clusterName = clusterName; - return this; - } - - /** - * 所属集群的名称 - * @return clusterName - **/ - @javax.annotation.Nullable - public String getClusterName() { - return clusterName; - } - - - public void setClusterName(String clusterName) { - this.clusterName = clusterName; - } - - - public OpenGrayReleaseRuleDTO namespaceName(String namespaceName) { - - this.namespaceName = namespaceName; - return this; - } - - /** - * 所属命名空间的名称 - * @return namespaceName - **/ - @javax.annotation.Nullable - public String getNamespaceName() { - return namespaceName; - } - - - public void setNamespaceName(String namespaceName) { - this.namespaceName = namespaceName; - } - - - public OpenGrayReleaseRuleDTO branchName(String branchName) { - - this.branchName = branchName; - return this; - } - - /** - * 灰度分支名称,标识灰度发布的分支 - * @return branchName - **/ - @javax.annotation.Nullable - public String getBranchName() { - return branchName; - } - - - public void setBranchName(String branchName) { - this.branchName = branchName; - } - - - public OpenGrayReleaseRuleDTO ruleItems(Set ruleItems) { - - this.ruleItems = ruleItems; - return this; - } - - public OpenGrayReleaseRuleDTO addRuleItemsItem(OpenGrayReleaseRuleItemDTO ruleItemsItem) { - if (this.ruleItems == null) { - this.ruleItems = new LinkedHashSet<>(); - } - this.ruleItems.add(ruleItemsItem); - return this; - } - - /** - * 灰度发布规则项列表,包含具体的灰度规则条件 - * @return ruleItems - **/ - @javax.annotation.Nullable - public Set getRuleItems() { - return ruleItems; - } - - - public void setRuleItems(Set ruleItems) { - this.ruleItems = ruleItems; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO = (OpenGrayReleaseRuleDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openGrayReleaseRuleDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, openGrayReleaseRuleDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedBy, openGrayReleaseRuleDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, openGrayReleaseRuleDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, openGrayReleaseRuleDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openGrayReleaseRuleDTO.dataChangeLastModifiedTime) && - Objects.equals(this.appId, openGrayReleaseRuleDTO.appId) && - Objects.equals(this.clusterName, openGrayReleaseRuleDTO.clusterName) && - Objects.equals(this.namespaceName, openGrayReleaseRuleDTO.namespaceName) && - Objects.equals(this.branchName, openGrayReleaseRuleDTO.branchName) && - Objects.equals(this.ruleItems, openGrayReleaseRuleDTO.ruleItems); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedBy, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, appId, clusterName, namespaceName, branchName, ruleItems); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenGrayReleaseRuleDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).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(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" branchName: ").append(toIndentedString(branchName)).append("\n"); - sb.append(" ruleItems: ").append(toIndentedString(ruleItems)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("dataChangeCreatedBy"); - openapiFields.add("dataChangeCreatedByDisplayName"); - openapiFields.add("dataChangeLastModifiedBy"); - openapiFields.add("dataChangeLastModifiedByDisplayName"); - 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(); - } - - /** - * 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - 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(), jsonObj.toString())); - } - } - 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("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("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("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("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("clusterName") != null && !jsonObj.get("clusterName").isJsonNull()) && !jsonObj.get("clusterName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `clusterName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clusterName").toString())); - } - if ((jsonObj.get("namespaceName") != null && !jsonObj.get("namespaceName").isJsonNull()) && !jsonObj.get("namespaceName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `namespaceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespaceName").toString())); - } - if ((jsonObj.get("branchName") != null && !jsonObj.get("branchName").isJsonNull()) && !jsonObj.get("branchName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `branchName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("branchName").toString())); - } - if (jsonObj.get("ruleItems") != null && !jsonObj.get("ruleItems").isJsonNull()) { - JsonArray jsonArrayruleItems = jsonObj.getAsJsonArray("ruleItems"); - if (jsonArrayruleItems != null) { - // ensure the json data is an array - if (!jsonObj.get("ruleItems").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `ruleItems` to be an array in the JSON string but got `%s`", jsonObj.get("ruleItems").toString())); - } - - // validate the optional field `ruleItems` (array) - for (int i = 0; i < jsonArrayruleItems.size(); i++) { - OpenGrayReleaseRuleItemDTO.validateJsonObject(jsonArrayruleItems.get(i).getAsJsonObject()); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenGrayReleaseRuleDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenGrayReleaseRuleDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenGrayReleaseRuleDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenGrayReleaseRuleDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenGrayReleaseRuleDTO read(JsonReader in) throws IOException { - 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 - */ - public static OpenGrayReleaseRuleDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenGrayReleaseRuleDTO.class); - } - - /** - * Convert an instance of OpenGrayReleaseRuleDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTO.java deleted file mode 100644 index 478f1bda..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTO.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.LinkedHashSet; -import java.util.Set; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenGrayReleaseRuleItemDTO { - public static final String SERIALIZED_NAME_CLIENT_APP_ID = "clientAppId"; - @SerializedName(SERIALIZED_NAME_CLIENT_APP_ID) - private String clientAppId; - - public static final String SERIALIZED_NAME_CLIENT_IP_LIST = "clientIpList"; - @SerializedName(SERIALIZED_NAME_CLIENT_IP_LIST) - private Set clientIpList; - - public static final String SERIALIZED_NAME_CLIENT_LABEL_LIST = "clientLabelList"; - @SerializedName(SERIALIZED_NAME_CLIENT_LABEL_LIST) - private Set clientLabelList; - - public OpenGrayReleaseRuleItemDTO() { - } - - public OpenGrayReleaseRuleItemDTO clientAppId(String clientAppId) { - - this.clientAppId = clientAppId; - return this; - } - - /** - * 客户端应用ID,指定哪个应用可以获取灰度配置 - * @return clientAppId - **/ - @javax.annotation.Nullable - public String getClientAppId() { - return clientAppId; - } - - - public void setClientAppId(String clientAppId) { - this.clientAppId = clientAppId; - } - - - public OpenGrayReleaseRuleItemDTO clientIpList(Set clientIpList) { - - this.clientIpList = clientIpList; - return this; - } - - public OpenGrayReleaseRuleItemDTO addClientIpListItem(String clientIpListItem) { - if (this.clientIpList == null) { - this.clientIpList = new LinkedHashSet<>(); - } - this.clientIpList.add(clientIpListItem); - return this; - } - - /** - * 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 - * @return clientIpList - **/ - @javax.annotation.Nullable - public Set getClientIpList() { - return clientIpList; - } - - - public void setClientIpList(Set clientIpList) { - this.clientIpList = clientIpList; - } - - - public OpenGrayReleaseRuleItemDTO clientLabelList(Set clientLabelList) { - - this.clientLabelList = clientLabelList; - return this; - } - - public OpenGrayReleaseRuleItemDTO addClientLabelListItem(String clientLabelListItem) { - if (this.clientLabelList == null) { - this.clientLabelList = new LinkedHashSet<>(); - } - this.clientLabelList.add(clientLabelListItem); - return this; - } - - /** - * 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 - * @return clientLabelList - **/ - @javax.annotation.Nullable - public Set getClientLabelList() { - return clientLabelList; - } - - - public void setClientLabelList(Set clientLabelList) { - this.clientLabelList = clientLabelList; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenGrayReleaseRuleItemDTO openGrayReleaseRuleItemDTO = (OpenGrayReleaseRuleItemDTO) o; - return Objects.equals(this.clientAppId, openGrayReleaseRuleItemDTO.clientAppId) && - Objects.equals(this.clientIpList, openGrayReleaseRuleItemDTO.clientIpList) && - Objects.equals(this.clientLabelList, openGrayReleaseRuleItemDTO.clientLabelList); - } - - @Override - public int hashCode() { - return Objects.hash(clientAppId, clientIpList, clientLabelList); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenGrayReleaseRuleItemDTO {\n"); - sb.append(" clientAppId: ").append(toIndentedString(clientAppId)).append("\n"); - sb.append(" clientIpList: ").append(toIndentedString(clientIpList)).append("\n"); - sb.append(" clientLabelList: ").append(toIndentedString(clientLabelList)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("clientAppId"); - openapiFields.add("clientIpList"); - openapiFields.add("clientLabelList"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - 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(), jsonObj.toString())); - } - } - 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").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").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `clientLabelList` to be an array in the JSON string but got `%s`", jsonObj.get("clientLabelList").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenGrayReleaseRuleItemDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenGrayReleaseRuleItemDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenGrayReleaseRuleItemDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenGrayReleaseRuleItemDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenGrayReleaseRuleItemDTO read(JsonReader in) throws IOException { - 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 - */ - public static OpenGrayReleaseRuleItemDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenGrayReleaseRuleItemDTO.class); - } - - /** - * Convert an instance of OpenGrayReleaseRuleItemDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenInstanceConfigDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenInstanceConfigDTO.java deleted file mode 100644 index 2be39b37..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenInstanceConfigDTO.java +++ /dev/null @@ -1,270 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 org.openapitools.client.model.OpenReleaseDTO; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.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; - -/** - * OpenInstanceConfigDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenInstanceConfigDTO { - public static final String SERIALIZED_NAME_RELEASE = "release"; - @SerializedName(SERIALIZED_NAME_RELEASE) - private OpenReleaseDTO release; - - public static final String SERIALIZED_NAME_RELEASE_DELIVERY_TIME = "releaseDeliveryTime"; - @SerializedName(SERIALIZED_NAME_RELEASE_DELIVERY_TIME) - private String releaseDeliveryTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - private String dataChangeLastModifiedTime; - - public OpenInstanceConfigDTO() { - } - - 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(OpenReleaseDTO release) { - this.release = release; - } - - - 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(String releaseDeliveryTime) { - this.releaseDeliveryTime = releaseDeliveryTime; - } - - - 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(String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenInstanceConfigDTO openInstanceConfigDTO = (OpenInstanceConfigDTO) o; - return Objects.equals(this.release, openInstanceConfigDTO.release) && - Objects.equals(this.releaseDeliveryTime, openInstanceConfigDTO.releaseDeliveryTime) && - Objects.equals(this.dataChangeLastModifiedTime, openInstanceConfigDTO.dataChangeLastModifiedTime); - } - - @Override - public int hashCode() { - return Objects.hash(release, releaseDeliveryTime, dataChangeLastModifiedTime); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenInstanceConfigDTO {\n"); - sb.append(" release: ").append(toIndentedString(release)).append("\n"); - sb.append(" releaseDeliveryTime: ").append(toIndentedString(releaseDeliveryTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("release"); - openapiFields.add("releaseDeliveryTime"); - openapiFields.add("dataChangeLastModifiedTime"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - 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(), jsonObj.toString())); - } - } - // validate the optional field `release` - if (jsonObj.get("release") != null && !jsonObj.get("release").isJsonNull()) { - 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())); - } - if ((jsonObj.get("dataChangeLastModifiedTime") != null && !jsonObj.get("dataChangeLastModifiedTime").isJsonNull()) && !jsonObj.get("dataChangeLastModifiedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeLastModifiedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeLastModifiedTime").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenInstanceConfigDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenInstanceConfigDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenInstanceConfigDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenInstanceConfigDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenInstanceConfigDTO read(JsonReader in) throws IOException { - 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 - */ - public static OpenInstanceConfigDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenInstanceConfigDTO.class); - } - - /** - * Convert an instance of OpenInstanceConfigDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenInstanceDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenInstanceDTO.java deleted file mode 100644 index 0e94e1c9..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenInstanceDTO.java +++ /dev/null @@ -1,411 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.OpenInstanceConfigDTO; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.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; - -/** - * OpenInstanceDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenInstanceDTO { - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private Long id; - - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - private String appId; - - public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; - @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - private String clusterName; - - public static final String SERIALIZED_NAME_DATA_CENTER = "dataCenter"; - @SerializedName(SERIALIZED_NAME_DATA_CENTER) - private String dataCenter; - - public static final String SERIALIZED_NAME_IP = "ip"; - @SerializedName(SERIALIZED_NAME_IP) - private String ip; - - public static final String SERIALIZED_NAME_CONFIGS = "configs"; - @SerializedName(SERIALIZED_NAME_CONFIGS) - private List configs; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - private String dataChangeCreatedTime; - - public OpenInstanceDTO() { - } - - public OpenInstanceDTO id(Long id) { - - this.id = id; - return this; - } - - /** - * 实例ID - * @return id - **/ - @javax.annotation.Nullable - public Long getId() { - return id; - } - - - public void setId(Long id) { - this.id = id; - } - - - public OpenInstanceDTO appId(String appId) { - - this.appId = appId; - return this; - } - - /** - * 实例所属应用ID - * @return appId - **/ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - - public void setAppId(String appId) { - this.appId = appId; - } - - - public OpenInstanceDTO clusterName(String clusterName) { - - this.clusterName = clusterName; - return this; - } - - /** - * 实例所属集群名称 - * @return clusterName - **/ - @javax.annotation.Nullable - public String getClusterName() { - return clusterName; - } - - - public void setClusterName(String clusterName) { - this.clusterName = clusterName; - } - - - public OpenInstanceDTO dataCenter(String dataCenter) { - - this.dataCenter = dataCenter; - return this; - } - - /** - * 数据中心/机房标识 - * @return dataCenter - **/ - @javax.annotation.Nullable - public String getDataCenter() { - return dataCenter; - } - - - public void setDataCenter(String dataCenter) { - this.dataCenter = dataCenter; - } - - - public OpenInstanceDTO ip(String ip) { - - this.ip = ip; - return this; - } - - /** - * 实例IP地址 - * @return ip - **/ - @javax.annotation.Nullable - public String getIp() { - return ip; - } - - - public void setIp(String ip) { - this.ip = ip; - } - - - public OpenInstanceDTO configs(List configs) { - - this.configs = configs; - return this; - } - - public OpenInstanceDTO addConfigsItem(OpenInstanceConfigDTO configsItem) { - if (this.configs == null) { - this.configs = new ArrayList<>(); - } - this.configs.add(configsItem); - return this; - } - - /** - * 实例当前生效的配置列表 - * @return configs - **/ - @javax.annotation.Nullable - public List getConfigs() { - return configs; - } - - - public void setConfigs(List configs) { - this.configs = configs; - } - - - 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(String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenInstanceDTO openInstanceDTO = (OpenInstanceDTO) o; - return Objects.equals(this.id, openInstanceDTO.id) && - Objects.equals(this.appId, openInstanceDTO.appId) && - Objects.equals(this.clusterName, openInstanceDTO.clusterName) && - Objects.equals(this.dataCenter, openInstanceDTO.dataCenter) && - Objects.equals(this.ip, openInstanceDTO.ip) && - Objects.equals(this.configs, openInstanceDTO.configs) && - Objects.equals(this.dataChangeCreatedTime, openInstanceDTO.dataChangeCreatedTime); - } - - @Override - public int hashCode() { - return Objects.hash(id, appId, clusterName, dataCenter, ip, configs, dataChangeCreatedTime); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenInstanceDTO {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" dataCenter: ").append(toIndentedString(dataCenter)).append("\n"); - sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); - sb.append(" configs: ").append(toIndentedString(configs)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - 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(); - } - - /** - * 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - 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(), jsonObj.toString())); - } - } - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("clusterName") != null && !jsonObj.get("clusterName").isJsonNull()) && !jsonObj.get("clusterName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `clusterName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clusterName").toString())); - } - if ((jsonObj.get("dataCenter") != null && !jsonObj.get("dataCenter").isJsonNull()) && !jsonObj.get("dataCenter").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataCenter` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataCenter").toString())); - } - if ((jsonObj.get("ip") != null && !jsonObj.get("ip").isJsonNull()) && !jsonObj.get("ip").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ip").toString())); - } - if (jsonObj.get("configs") != null && !jsonObj.get("configs").isJsonNull()) { - JsonArray jsonArrayconfigs = jsonObj.getAsJsonArray("configs"); - if (jsonArrayconfigs != null) { - // ensure the json data is an array - if (!jsonObj.get("configs").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `configs` to be an array in the JSON string but got `%s`", jsonObj.get("configs").toString())); - } - - // validate the optional field `configs` (array) - for (int i = 0; i < jsonArrayconfigs.size(); i++) { - OpenInstanceConfigDTO.validateJsonObject(jsonArrayconfigs.get(i).getAsJsonObject()); - }; - } - } - if ((jsonObj.get("dataChangeCreatedTime") != null && !jsonObj.get("dataChangeCreatedTime").isJsonNull()) && !jsonObj.get("dataChangeCreatedTime").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedTime` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedTime").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenInstanceDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenInstanceDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenInstanceDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenInstanceDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenInstanceDTO read(JsonReader in) throws IOException { - 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 - */ - public static OpenInstanceDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenInstanceDTO.class); - } - - /** - * Convert an instance of OpenInstanceDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenInstancePageDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenInstancePageDTO.java deleted file mode 100644 index a88a4221..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenInstancePageDTO.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.OpenInstanceDTO; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * 分页实例数据传输对象,用于返回分页查询的实例列表结果 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenInstancePageDTO { - public static final String SERIALIZED_NAME_PAGE = "page"; - @SerializedName(SERIALIZED_NAME_PAGE) - private Integer page; - - public static final String SERIALIZED_NAME_SIZE = "size"; - @SerializedName(SERIALIZED_NAME_SIZE) - private Integer size; - - public static final String SERIALIZED_NAME_TOTAL = "total"; - @SerializedName(SERIALIZED_NAME_TOTAL) - private Long total; - - public static final String SERIALIZED_NAME_INSTANCES = "instances"; - @SerializedName(SERIALIZED_NAME_INSTANCES) - private List instances; - - public OpenInstancePageDTO() { - } - - public OpenInstancePageDTO page(Integer page) { - - this.page = page; - return this; - } - - /** - * 当前页码,从0开始计数 - * @return page - **/ - @javax.annotation.Nullable - public Integer getPage() { - return page; - } - - - public void setPage(Integer page) { - this.page = page; - } - - - public OpenInstancePageDTO size(Integer size) { - - this.size = size; - return this; - } - - /** - * 每页显示的记录数量 - * @return size - **/ - @javax.annotation.Nullable - public Integer getSize() { - return size; - } - - - public void setSize(Integer size) { - this.size = size; - } - - - public OpenInstancePageDTO total(Long total) { - - this.total = total; - return this; - } - - /** - * 总记录数,符合查询条件的实例总数量 - * @return total - **/ - @javax.annotation.Nullable - public Long getTotal() { - return total; - } - - - public void setTotal(Long total) { - this.total = total; - } - - - public OpenInstancePageDTO instances(List instances) { - - this.instances = instances; - return this; - } - - public OpenInstancePageDTO addInstancesItem(OpenInstanceDTO instancesItem) { - if (this.instances == null) { - this.instances = new ArrayList<>(); - } - this.instances.add(instancesItem); - return this; - } - - /** - * 当前页的实例列表,包含具体的实例数据 - * @return instances - **/ - @javax.annotation.Nullable - public List getInstances() { - return instances; - } - - - public void setInstances(List instances) { - this.instances = instances; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenInstancePageDTO openInstancePageDTO = (OpenInstancePageDTO) o; - return Objects.equals(this.page, openInstancePageDTO.page) && - Objects.equals(this.size, openInstancePageDTO.size) && - Objects.equals(this.total, openInstancePageDTO.total) && - Objects.equals(this.instances, openInstancePageDTO.instances); - } - - @Override - public int hashCode() { - return Objects.hash(page, size, total, instances); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenInstancePageDTO {\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" size: ").append(toIndentedString(size)).append("\n"); - sb.append(" total: ").append(toIndentedString(total)).append("\n"); - sb.append(" instances: ").append(toIndentedString(instances)).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("page"); - openapiFields.add("size"); - openapiFields.add("total"); - openapiFields.add("instances"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OpenInstancePageDTO - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OpenInstancePageDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenInstancePageDTO is not found in the empty JSON string", OpenInstancePageDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OpenInstancePageDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenInstancePageDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("instances") != null && !jsonObj.get("instances").isJsonNull()) { - JsonArray jsonArrayinstances = jsonObj.getAsJsonArray("instances"); - if (jsonArrayinstances != null) { - // ensure the json data is an array - if (!jsonObj.get("instances").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `instances` to be an array in the JSON string but got `%s`", jsonObj.get("instances").toString())); - } - - // validate the optional field `instances` (array) - for (int i = 0; i < jsonArrayinstances.size(); i++) { - OpenInstanceDTO.validateJsonObject(jsonArrayinstances.get(i).getAsJsonObject()); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenInstancePageDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenInstancePageDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenInstancePageDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenInstancePageDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenInstancePageDTO read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenInstancePageDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenInstancePageDTO - * @throws IOException if the JSON string is invalid with respect to OpenInstancePageDTO - */ - public static OpenInstancePageDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenInstancePageDTO.class); - } - - /** - * Convert an instance of OpenInstancePageDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenItemDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenItemDTO.java deleted file mode 100644 index 3e38e2ef..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenItemDTO.java +++ /dev/null @@ -1,543 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 org.openapitools.client.model.OpenItemExtendDTO; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Apollo配置项核心数据对象,仅包含键值及基础审计信息 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenItemDTO { - public static final String SERIALIZED_NAME_KEY = "key"; - @SerializedName(SERIALIZED_NAME_KEY) - private String key; - - public static final String SERIALIZED_NAME_VALUE = "value"; - @SerializedName(SERIALIZED_NAME_VALUE) - private String value; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - private Integer type; - - public static final String SERIALIZED_NAME_COMMENT = "comment"; - @SerializedName(SERIALIZED_NAME_COMMENT) - private String comment; - - public static final String SERIALIZED_NAME_LINE_NUM = "lineNum"; - @SerializedName(SERIALIZED_NAME_LINE_NUM) - private Integer lineNum; - - public static final String SERIALIZED_NAME_EXTEND_INFO = "extendInfo"; - @SerializedName(SERIALIZED_NAME_EXTEND_INFO) - private OpenItemExtendDTO extendInfo; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME = "dataChangeCreatedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME) - private String dataChangeCreatedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME = "dataChangeLastModifiedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME) - private String dataChangeLastModifiedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - private String dataChangeLastModifiedTime; - - public OpenItemDTO() { - } - - public OpenItemDTO key(String key) { - - this.key = key; - return this; - } - - /** - * 配置项的键名,在同一命名空间内唯一标识一个配置项 - * @return key - **/ - @javax.annotation.Nullable - public String getKey() { - return key; - } - - - public void setKey(String key) { - this.key = key; - } - - - public OpenItemDTO value(String value) { - - this.value = value; - return this; - } - - /** - * 配置项的值,可以是字符串、数字、JSON等格式 - * @return value - **/ - @javax.annotation.Nullable - public String getValue() { - return value; - } - - - public void setValue(String value) { - this.value = value; - } - - - public OpenItemDTO type(Integer type) { - - this.type = type; - return this; - } - - /** - * 配置项类型 - * @return type - **/ - @javax.annotation.Nullable - public Integer getType() { - return type; - } - - - public void setType(Integer type) { - this.type = type; - } - - - public OpenItemDTO comment(String comment) { - - this.comment = comment; - return this; - } - - /** - * 配置项的注释说明,用于描述配置项的用途和含义 - * @return comment - **/ - @javax.annotation.Nullable - public String getComment() { - return comment; - } - - - public void setComment(String comment) { - this.comment = comment; - } - - - public OpenItemDTO lineNum(Integer lineNum) { - - this.lineNum = lineNum; - return this; - } - - /** - * 配置项在命名空间中的行号,用于保持和旧版 Portal 配置项列表一致的默认展示顺序 - * @return lineNum - **/ - @javax.annotation.Nullable - public Integer getLineNum() { - return lineNum; - } - - - public void setLineNum(Integer lineNum) { - this.lineNum = lineNum; - } - - - public OpenItemDTO extendInfo(OpenItemExtendDTO extendInfo) { - - this.extendInfo = extendInfo; - return this; - } - - /** - * Get extendInfo - * @return extendInfo - **/ - @javax.annotation.Nullable - public OpenItemExtendDTO getExtendInfo() { - return extendInfo; - } - - - public void setExtendInfo(OpenItemExtendDTO extendInfo) { - this.extendInfo = extendInfo; - } - - - public OpenItemDTO dataChangeCreatedBy(String dataChangeCreatedBy) { - - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * 配置项创建者用户名,记录是谁创建了这个配置项 - * @return dataChangeCreatedBy - **/ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - - public void setDataChangeCreatedBy(String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public OpenItemDTO dataChangeCreatedByDisplayName(String dataChangeCreatedByDisplayName) { - - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * 配置项创建者显示名称,用于展示创建者的友好名称 - * @return dataChangeCreatedByDisplayName - **/ - @javax.annotation.Nullable - public String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - - public void setDataChangeCreatedByDisplayName(String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - - public OpenItemDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { - - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * 配置项最后修改者用户名,记录最后一次修改配置的用户 - * @return dataChangeLastModifiedBy - **/ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - - public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public OpenItemDTO dataChangeLastModifiedByDisplayName(String dataChangeLastModifiedByDisplayName) { - - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * 配置项最后修改者显示名称,用于展示最后修改者的友好名称 - * @return dataChangeLastModifiedByDisplayName - **/ - @javax.annotation.Nullable - public String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - - public void setDataChangeLastModifiedByDisplayName(String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - - 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(String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - 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(String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenItemDTO openItemDTO = (OpenItemDTO) o; - return Objects.equals(this.key, openItemDTO.key) && - Objects.equals(this.value, openItemDTO.value) && - Objects.equals(this.type, openItemDTO.type) && - Objects.equals(this.comment, openItemDTO.comment) && - Objects.equals(this.lineNum, openItemDTO.lineNum) && - Objects.equals(this.extendInfo, openItemDTO.extendInfo) && - Objects.equals(this.dataChangeCreatedBy, openItemDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, openItemDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedBy, openItemDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, openItemDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, openItemDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openItemDTO.dataChangeLastModifiedTime); - } - - @Override - public int hashCode() { - return Objects.hash(key, value, type, comment, lineNum, extendInfo, dataChangeCreatedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedBy, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenItemDTO {\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append(" lineNum: ").append(toIndentedString(lineNum)).append("\n"); - sb.append(" extendInfo: ").append(toIndentedString(extendInfo)).append("\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).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("}"); - 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("key"); - openapiFields.add("value"); - openapiFields.add("type"); - openapiFields.add("comment"); - openapiFields.add("lineNum"); - openapiFields.add("extendInfo"); - openapiFields.add("dataChangeCreatedBy"); - openapiFields.add("dataChangeCreatedByDisplayName"); - openapiFields.add("dataChangeLastModifiedBy"); - openapiFields.add("dataChangeLastModifiedByDisplayName"); - openapiFields.add("dataChangeCreatedTime"); - openapiFields.add("dataChangeLastModifiedTime"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - 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(), jsonObj.toString())); - } - } - if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString())); - } - if ((jsonObj.get("value") != null && !jsonObj.get("value").isJsonNull()) && !jsonObj.get("value").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `value` to be a primitive type in the JSON string but got `%s`", jsonObj.get("value").toString())); - } - if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); - } - // validate the optional field `extendInfo` - if (jsonObj.get("extendInfo") != null && !jsonObj.get("extendInfo").isJsonNull()) { - OpenItemExtendDTO.validateJsonObject(jsonObj.getAsJsonObject("extendInfo")); - } - if ((jsonObj.get("dataChangeCreatedBy") != null && !jsonObj.get("dataChangeCreatedBy").isJsonNull()) && !jsonObj.get("dataChangeCreatedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `dataChangeCreatedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("dataChangeCreatedBy").toString())); - } - 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("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("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())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenItemDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenItemDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenItemDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenItemDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenItemDTO read(JsonReader in) throws IOException { - 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 - */ - public static OpenItemDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenItemDTO.class); - } - - /** - * Convert an instance of OpenItemDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenItemDiffDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenItemDiffDTO.java deleted file mode 100644 index ff7c10aa..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenItemDiffDTO.java +++ /dev/null @@ -1,420 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.OpenItemDTO; -import org.openapitools.client.model.OpenNamespaceIdentifier; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OpenItemDiffDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenItemDiffDTO { - public static final String SERIALIZED_NAME_CODE = "code"; - @SerializedName(SERIALIZED_NAME_CODE) - private Integer code; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - private String message; - - public static final String SERIALIZED_NAME_NAMESPACE = "namespace"; - @SerializedName(SERIALIZED_NAME_NAMESPACE) - private OpenNamespaceIdentifier namespace; - - public static final String SERIALIZED_NAME_CREATE_ITEMS = "createItems"; - @SerializedName(SERIALIZED_NAME_CREATE_ITEMS) - private List createItems; - - public static final String SERIALIZED_NAME_DELETE_ITEMS = "deleteItems"; - @SerializedName(SERIALIZED_NAME_DELETE_ITEMS) - private List deleteItems; - - public static final String SERIALIZED_NAME_UPDATE_ITEMS = "updateItems"; - @SerializedName(SERIALIZED_NAME_UPDATE_ITEMS) - private List updateItems; - - public OpenItemDiffDTO() { - } - - public OpenItemDiffDTO code(Integer code) { - - this.code = code; - return this; - } - - /** - * 查找结果 - * @return code - **/ - @javax.annotation.Nullable - public Integer getCode() { - return code; - } - - - public void setCode(Integer code) { - this.code = code; - } - - - public OpenItemDiffDTO message(String message) { - - this.message = message; - return this; - } - - /** - * 查找结果信息 - * @return message - **/ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - - public void setMessage(String message) { - this.message = message; - } - - - public OpenItemDiffDTO namespace(OpenNamespaceIdentifier namespace) { - - this.namespace = namespace; - return this; - } - - /** - * Get namespace - * @return namespace - **/ - @javax.annotation.Nullable - public OpenNamespaceIdentifier getNamespace() { - return namespace; - } - - - public void setNamespace(OpenNamespaceIdentifier namespace) { - this.namespace = namespace; - } - - - public OpenItemDiffDTO createItems(List createItems) { - - this.createItems = createItems; - return this; - } - - public OpenItemDiffDTO addCreateItemsItem(OpenItemDTO createItemsItem) { - if (this.createItems == null) { - this.createItems = new ArrayList<>(); - } - this.createItems.add(createItemsItem); - return this; - } - - /** - * Get createItems - * @return createItems - **/ - @javax.annotation.Nullable - public List getCreateItems() { - return createItems; - } - - - public void setCreateItems(List createItems) { - this.createItems = createItems; - } - - - public OpenItemDiffDTO deleteItems(List deleteItems) { - - this.deleteItems = deleteItems; - return this; - } - - public OpenItemDiffDTO addDeleteItemsItem(OpenItemDTO deleteItemsItem) { - if (this.deleteItems == null) { - this.deleteItems = new ArrayList<>(); - } - this.deleteItems.add(deleteItemsItem); - return this; - } - - /** - * Get deleteItems - * @return deleteItems - **/ - @javax.annotation.Nullable - public List getDeleteItems() { - return deleteItems; - } - - - public void setDeleteItems(List deleteItems) { - this.deleteItems = deleteItems; - } - - - public OpenItemDiffDTO updateItems(List updateItems) { - - this.updateItems = updateItems; - return this; - } - - public OpenItemDiffDTO addUpdateItemsItem(OpenItemDTO updateItemsItem) { - if (this.updateItems == null) { - this.updateItems = new ArrayList<>(); - } - this.updateItems.add(updateItemsItem); - return this; - } - - /** - * Get updateItems - * @return updateItems - **/ - @javax.annotation.Nullable - public List getUpdateItems() { - return updateItems; - } - - - public void setUpdateItems(List updateItems) { - this.updateItems = updateItems; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenItemDiffDTO openItemDiffDTO = (OpenItemDiffDTO) o; - return Objects.equals(this.code, openItemDiffDTO.code) && - Objects.equals(this.message, openItemDiffDTO.message) && - Objects.equals(this.namespace, openItemDiffDTO.namespace) && - Objects.equals(this.createItems, openItemDiffDTO.createItems) && - Objects.equals(this.deleteItems, openItemDiffDTO.deleteItems) && - Objects.equals(this.updateItems, openItemDiffDTO.updateItems); - } - - @Override - public int hashCode() { - return Objects.hash(code, message, namespace, createItems, deleteItems, updateItems); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenItemDiffDTO {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); - sb.append(" createItems: ").append(toIndentedString(createItems)).append("\n"); - sb.append(" deleteItems: ").append(toIndentedString(deleteItems)).append("\n"); - sb.append(" updateItems: ").append(toIndentedString(updateItems)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("code"); - openapiFields.add("message"); - openapiFields.add("namespace"); - openapiFields.add("createItems"); - openapiFields.add("deleteItems"); - openapiFields.add("updateItems"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OpenItemDiffDTO - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OpenItemDiffDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenItemDiffDTO is not found in the empty JSON string", OpenItemDiffDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OpenItemDiffDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenItemDiffDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - // validate the optional field `namespace` - if (jsonObj.get("namespace") != null && !jsonObj.get("namespace").isJsonNull()) { - OpenNamespaceIdentifier.validateJsonObject(jsonObj.getAsJsonObject("namespace")); - } - if (jsonObj.get("createItems") != null && !jsonObj.get("createItems").isJsonNull()) { - JsonArray jsonArraycreateItems = jsonObj.getAsJsonArray("createItems"); - if (jsonArraycreateItems != null) { - // ensure the json data is an array - if (!jsonObj.get("createItems").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `createItems` to be an array in the JSON string but got `%s`", jsonObj.get("createItems").toString())); - } - - // validate the optional field `createItems` (array) - for (int i = 0; i < jsonArraycreateItems.size(); i++) { - OpenItemDTO.validateJsonObject(jsonArraycreateItems.get(i).getAsJsonObject()); - }; - } - } - if (jsonObj.get("deleteItems") != null && !jsonObj.get("deleteItems").isJsonNull()) { - JsonArray jsonArraydeleteItems = jsonObj.getAsJsonArray("deleteItems"); - if (jsonArraydeleteItems != null) { - // ensure the json data is an array - if (!jsonObj.get("deleteItems").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `deleteItems` to be an array in the JSON string but got `%s`", jsonObj.get("deleteItems").toString())); - } - - // validate the optional field `deleteItems` (array) - for (int i = 0; i < jsonArraydeleteItems.size(); i++) { - OpenItemDTO.validateJsonObject(jsonArraydeleteItems.get(i).getAsJsonObject()); - }; - } - } - if (jsonObj.get("updateItems") != null && !jsonObj.get("updateItems").isJsonNull()) { - JsonArray jsonArrayupdateItems = jsonObj.getAsJsonArray("updateItems"); - if (jsonArrayupdateItems != null) { - // ensure the json data is an array - if (!jsonObj.get("updateItems").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `updateItems` to be an array in the JSON string but got `%s`", jsonObj.get("updateItems").toString())); - } - - // validate the optional field `updateItems` (array) - for (int i = 0; i < jsonArrayupdateItems.size(); i++) { - OpenItemDTO.validateJsonObject(jsonArrayupdateItems.get(i).getAsJsonObject()); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenItemDiffDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenItemDiffDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenItemDiffDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenItemDiffDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenItemDiffDTO read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenItemDiffDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenItemDiffDTO - * @throws IOException if the JSON string is invalid with respect to OpenItemDiffDTO - */ - public static OpenItemDiffDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenItemDiffDTO.class); - } - - /** - * Convert an instance of OpenItemDiffDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenItemExtendDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenItemExtendDTO.java deleted file mode 100644 index 9c3d19f3..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenItemExtendDTO.java +++ /dev/null @@ -1,349 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenItemExtendDTO { - public static final String SERIALIZED_NAME_NAMESPACE_ID = "namespaceId"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_ID) - private Long namespaceId; - - public static final String SERIALIZED_NAME_IS_MODIFIED = "isModified"; - @SerializedName(SERIALIZED_NAME_IS_MODIFIED) - private Boolean isModified; - - public static final String SERIALIZED_NAME_IS_DELETED = "isDeleted"; - @SerializedName(SERIALIZED_NAME_IS_DELETED) - private Boolean isDeleted; - - public static final String SERIALIZED_NAME_IS_NEWLY_ADDED = "isNewlyAdded"; - @SerializedName(SERIALIZED_NAME_IS_NEWLY_ADDED) - private Boolean isNewlyAdded; - - public static final String SERIALIZED_NAME_NEW_VALUE = "newValue"; - @SerializedName(SERIALIZED_NAME_NEW_VALUE) - private String newValue; - - public static final String SERIALIZED_NAME_OLD_VALUE = "oldValue"; - @SerializedName(SERIALIZED_NAME_OLD_VALUE) - private String oldValue; - - public OpenItemExtendDTO() { - } - - public OpenItemExtendDTO namespaceId(Long namespaceId) { - - this.namespaceId = namespaceId; - return this; - } - - /** - * 所属命名空间的ID - * @return namespaceId - **/ - @javax.annotation.Nullable - public Long getNamespaceId() { - return namespaceId; - } - - - public void setNamespaceId(Long namespaceId) { - this.namespaceId = namespaceId; - } - - - public OpenItemExtendDTO isModified(Boolean isModified) { - - this.isModified = isModified; - return this; - } - - /** - * 是否有未发布的修改 - * @return isModified - **/ - @javax.annotation.Nullable - public Boolean getIsModified() { - return isModified; - } - - - public void setIsModified(Boolean isModified) { - this.isModified = isModified; - } - - - public OpenItemExtendDTO isDeleted(Boolean isDeleted) { - - this.isDeleted = isDeleted; - return this; - } - - /** - * 是否被标记为删除(未发布) - * @return isDeleted - **/ - @javax.annotation.Nullable - public Boolean getIsDeleted() { - return isDeleted; - } - - - public void setIsDeleted(Boolean isDeleted) { - this.isDeleted = isDeleted; - } - - - public OpenItemExtendDTO isNewlyAdded(Boolean isNewlyAdded) { - - this.isNewlyAdded = isNewlyAdded; - return this; - } - - /** - * 是否为新添加的配置项(未发布) - * @return isNewlyAdded - **/ - @javax.annotation.Nullable - public Boolean getIsNewlyAdded() { - return isNewlyAdded; - } - - - public void setIsNewlyAdded(Boolean isNewlyAdded) { - this.isNewlyAdded = isNewlyAdded; - } - - - public OpenItemExtendDTO newValue(String newValue) { - - this.newValue = newValue; - return this; - } - - /** - * 新的值 - * @return newValue - **/ - @javax.annotation.Nullable - public String getNewValue() { - return newValue; - } - - - public void setNewValue(String newValue) { - this.newValue = newValue; - } - - - public OpenItemExtendDTO oldValue(String oldValue) { - - this.oldValue = oldValue; - return this; - } - - /** - * 上一次发布的值,用于对比变更 - * @return oldValue - **/ - @javax.annotation.Nullable - public String getOldValue() { - return oldValue; - } - - - public void setOldValue(String oldValue) { - this.oldValue = oldValue; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenItemExtendDTO openItemExtendDTO = (OpenItemExtendDTO) o; - return Objects.equals(this.namespaceId, openItemExtendDTO.namespaceId) && - Objects.equals(this.isModified, openItemExtendDTO.isModified) && - Objects.equals(this.isDeleted, openItemExtendDTO.isDeleted) && - Objects.equals(this.isNewlyAdded, openItemExtendDTO.isNewlyAdded) && - Objects.equals(this.newValue, openItemExtendDTO.newValue) && - Objects.equals(this.oldValue, openItemExtendDTO.oldValue); - } - - @Override - public int hashCode() { - return Objects.hash(namespaceId, isModified, isDeleted, isNewlyAdded, newValue, oldValue); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenItemExtendDTO {\n"); - sb.append(" namespaceId: ").append(toIndentedString(namespaceId)).append("\n"); - sb.append(" isModified: ").append(toIndentedString(isModified)).append("\n"); - sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); - sb.append(" isNewlyAdded: ").append(toIndentedString(isNewlyAdded)).append("\n"); - sb.append(" newValue: ").append(toIndentedString(newValue)).append("\n"); - sb.append(" oldValue: ").append(toIndentedString(oldValue)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("namespaceId"); - openapiFields.add("isModified"); - openapiFields.add("isDeleted"); - openapiFields.add("isNewlyAdded"); - openapiFields.add("newValue"); - openapiFields.add("oldValue"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OpenItemExtendDTO - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OpenItemExtendDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenItemExtendDTO is not found in the empty JSON string", OpenItemExtendDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OpenItemExtendDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenItemExtendDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("newValue") != null && !jsonObj.get("newValue").isJsonNull()) && !jsonObj.get("newValue").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `newValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("newValue").toString())); - } - if ((jsonObj.get("oldValue") != null && !jsonObj.get("oldValue").isJsonNull()) && !jsonObj.get("oldValue").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `oldValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("oldValue").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenItemExtendDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenItemExtendDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenItemExtendDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenItemExtendDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenItemExtendDTO read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenItemExtendDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenItemExtendDTO - * @throws IOException if the JSON string is invalid with respect to OpenItemExtendDTO - */ - public static OpenItemExtendDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenItemExtendDTO.class); - } - - /** - * Convert an instance of OpenItemExtendDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenItemPageDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenItemPageDTO.java deleted file mode 100644 index 38d3bb86..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenItemPageDTO.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.OpenItemDTO; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenItemPageDTO { - public static final String SERIALIZED_NAME_PAGE = "page"; - @SerializedName(SERIALIZED_NAME_PAGE) - private Integer page; - - public static final String SERIALIZED_NAME_SIZE = "size"; - @SerializedName(SERIALIZED_NAME_SIZE) - private Integer size; - - public static final String SERIALIZED_NAME_TOTAL = "total"; - @SerializedName(SERIALIZED_NAME_TOTAL) - private Long total; - - public static final String SERIALIZED_NAME_CONTENT = "content"; - @SerializedName(SERIALIZED_NAME_CONTENT) - private List content; - - public OpenItemPageDTO() { - } - - public OpenItemPageDTO page(Integer page) { - - this.page = page; - return this; - } - - /** - * 当前页码,从0开始计数 - * @return page - **/ - @javax.annotation.Nullable - public Integer getPage() { - return page; - } - - - public void setPage(Integer page) { - this.page = page; - } - - - public OpenItemPageDTO size(Integer size) { - - this.size = size; - return this; - } - - /** - * 每页显示的记录数量 - * @return size - **/ - @javax.annotation.Nullable - public Integer getSize() { - return size; - } - - - public void setSize(Integer size) { - this.size = size; - } - - - public OpenItemPageDTO total(Long total) { - - this.total = total; - return this; - } - - /** - * 总记录数,符合查询条件的配置项总数量 - * @return total - **/ - @javax.annotation.Nullable - public Long getTotal() { - return total; - } - - - public void setTotal(Long total) { - this.total = total; - } - - - public OpenItemPageDTO content(List content) { - - this.content = content; - return this; - } - - public OpenItemPageDTO addContentItem(OpenItemDTO contentItem) { - if (this.content == null) { - this.content = new ArrayList<>(); - } - this.content.add(contentItem); - return this; - } - - /** - * 当前页的配置项列表,包含具体的配置项数据 - * @return content - **/ - @javax.annotation.Nullable - public List getContent() { - return content; - } - - - public void setContent(List content) { - this.content = content; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenItemPageDTO openItemPageDTO = (OpenItemPageDTO) o; - return Objects.equals(this.page, openItemPageDTO.page) && - Objects.equals(this.size, openItemPageDTO.size) && - Objects.equals(this.total, openItemPageDTO.total) && - Objects.equals(this.content, openItemPageDTO.content); - } - - @Override - public int hashCode() { - return Objects.hash(page, size, total, content); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenItemPageDTO {\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" size: ").append(toIndentedString(size)).append("\n"); - sb.append(" total: ").append(toIndentedString(total)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("page"); - openapiFields.add("size"); - openapiFields.add("total"); - openapiFields.add("content"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OpenItemPageDTO - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OpenItemPageDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenItemPageDTO is not found in the empty JSON string", OpenItemPageDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OpenItemPageDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenItemPageDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("content") != null && !jsonObj.get("content").isJsonNull()) { - JsonArray jsonArraycontent = jsonObj.getAsJsonArray("content"); - if (jsonArraycontent != null) { - // ensure the json data is an array - if (!jsonObj.get("content").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `content` to be an array in the JSON string but got `%s`", jsonObj.get("content").toString())); - } - - // validate the optional field `content` (array) - for (int i = 0; i < jsonArraycontent.size(); i++) { - OpenItemDTO.validateJsonObject(jsonArraycontent.get(i).getAsJsonObject()); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenItemPageDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenItemPageDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenItemPageDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenItemPageDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenItemPageDTO read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenItemPageDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenItemPageDTO - * @throws IOException if the JSON string is invalid with respect to OpenItemPageDTO - */ - public static OpenItemPageDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenItemPageDTO.class); - } - - /** - * Convert an instance of OpenItemPageDTO 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/OpenMissEnvDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenMissEnvDTO.java deleted file mode 100644 index b5b20358..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenMissEnvDTO.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OpenMissEnvDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenMissEnvDTO { - public static final String SERIALIZED_NAME_CODE = "code"; - @SerializedName(SERIALIZED_NAME_CODE) - private Integer code; - - public static final String SERIALIZED_NAME_MESSAGE = "message"; - @SerializedName(SERIALIZED_NAME_MESSAGE) - private String message; - - public OpenMissEnvDTO() { - } - - public OpenMissEnvDTO code(Integer code) { - - this.code = code; - return this; - } - - /** - * 查询状态码 - * @return code - **/ - @javax.annotation.Nullable - public Integer getCode() { - return code; - } - - - public void setCode(Integer code) { - this.code = code; - } - - - public OpenMissEnvDTO message(String message) { - - this.message = message; - return this; - } - - /** - * Get message - * @return message - **/ - @javax.annotation.Nullable - public String getMessage() { - return message; - } - - - public void setMessage(String message) { - this.message = message; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenMissEnvDTO openMissEnvDTO = (OpenMissEnvDTO) o; - return Objects.equals(this.code, openMissEnvDTO.code) && - Objects.equals(this.message, openMissEnvDTO.message); - } - - @Override - public int hashCode() { - return Objects.hash(code, message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenMissEnvDTO {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("code"); - openapiFields.add("message"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OpenMissEnvDTO - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OpenMissEnvDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenMissEnvDTO is not found in the empty JSON string", OpenMissEnvDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OpenMissEnvDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenMissEnvDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenMissEnvDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenMissEnvDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenMissEnvDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenMissEnvDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenMissEnvDTO read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenMissEnvDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenMissEnvDTO - * @throws IOException if the JSON string is invalid with respect to OpenMissEnvDTO - */ - public static OpenMissEnvDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenMissEnvDTO.class); - } - - /** - * Convert an instance of OpenMissEnvDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceDTO.java deleted file mode 100644 index 77b8038d..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceDTO.java +++ /dev/null @@ -1,630 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.OpenItemDTO; -import org.openapitools.client.model.OpenNamespaceExtendDTO; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenNamespaceDTO { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME = "dataChangeCreatedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME) - private String dataChangeCreatedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME = "dataChangeLastModifiedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME) - private String dataChangeLastModifiedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - private String appId; - - public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; - @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - private String clusterName; - - public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - private String namespaceName; - - public static final String SERIALIZED_NAME_COMMENT = "comment"; - @SerializedName(SERIALIZED_NAME_COMMENT) - private String comment; - - public static final String SERIALIZED_NAME_FORMAT = "format"; - @SerializedName(SERIALIZED_NAME_FORMAT) - private String format; - - public static final String SERIALIZED_NAME_IS_PUBLIC = "isPublic"; - @SerializedName(SERIALIZED_NAME_IS_PUBLIC) - private Boolean isPublic; - - public static final String SERIALIZED_NAME_ITEMS = "items"; - @SerializedName(SERIALIZED_NAME_ITEMS) - private List items; - - public static final String SERIALIZED_NAME_EXTEND_INFO = "extendInfo"; - @SerializedName(SERIALIZED_NAME_EXTEND_INFO) - private OpenNamespaceExtendDTO extendInfo; - - public OpenNamespaceDTO() { - } - - public OpenNamespaceDTO dataChangeCreatedBy(String dataChangeCreatedBy) { - - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * 命名空间创建者用户名,记录是谁创建了这个命名空间 - * @return dataChangeCreatedBy - **/ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - - public void setDataChangeCreatedBy(String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public OpenNamespaceDTO dataChangeCreatedByDisplayName(String dataChangeCreatedByDisplayName) { - - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * 命名空间创建者显示名称,用于展示创建者的友好名称 - * @return dataChangeCreatedByDisplayName - **/ - @javax.annotation.Nullable - public String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - - public void setDataChangeCreatedByDisplayName(String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - - public OpenNamespaceDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { - - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 - * @return dataChangeLastModifiedBy - **/ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - - public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public OpenNamespaceDTO dataChangeLastModifiedByDisplayName(String dataChangeLastModifiedByDisplayName) { - - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * 命名空间最后修改者显示名称,用于展示最后修改者的友好名称 - * @return dataChangeLastModifiedByDisplayName - **/ - @javax.annotation.Nullable - public String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - - public void setDataChangeLastModifiedByDisplayName(String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - - 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(String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - 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(String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public OpenNamespaceDTO appId(String appId) { - - this.appId = appId; - return this; - } - - /** - * 所属应用的唯一标识符 - * @return appId - **/ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - - public void setAppId(String appId) { - this.appId = appId; - } - - - public OpenNamespaceDTO clusterName(String clusterName) { - - this.clusterName = clusterName; - return this; - } - - /** - * 所属集群的名称 - * @return clusterName - **/ - @javax.annotation.Nullable - public String getClusterName() { - return clusterName; - } - - - public void setClusterName(String clusterName) { - this.clusterName = clusterName; - } - - - public OpenNamespaceDTO namespaceName(String namespaceName) { - - this.namespaceName = namespaceName; - return this; - } - - /** - * 命名空间名称,在同一应用和集群下唯一标识一个命名空间 - * @return namespaceName - **/ - @javax.annotation.Nullable - public String getNamespaceName() { - return namespaceName; - } - - - public void setNamespaceName(String namespaceName) { - this.namespaceName = namespaceName; - } - - - public OpenNamespaceDTO comment(String comment) { - - this.comment = comment; - return this; - } - - /** - * 命名空间备注说明,描述命名空间的用途 - * @return comment - **/ - @javax.annotation.Nullable - public String getComment() { - return comment; - } - - - public void setComment(String comment) { - this.comment = comment; - } - - - 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(String format) { - this.format = format; - } - - - public OpenNamespaceDTO isPublic(Boolean isPublic) { - - this.isPublic = isPublic; - return this; - } - - /** - * 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - * @return isPublic - **/ - @javax.annotation.Nullable - public Boolean getIsPublic() { - return isPublic; - } - - - public void setIsPublic(Boolean isPublic) { - this.isPublic = isPublic; - } - - - public OpenNamespaceDTO items(List items) { - - this.items = items; - return this; - } - - public OpenNamespaceDTO addItemsItem(OpenItemDTO itemsItem) { - if (this.items == null) { - this.items = new ArrayList<>(); - } - this.items.add(itemsItem); - return this; - } - - /** - * 命名空间包含的配置项列表 - * @return items - **/ - @javax.annotation.Nullable - public List getItems() { - return items; - } - - - public void setItems(List items) { - this.items = items; - } - - - public OpenNamespaceDTO extendInfo(OpenNamespaceExtendDTO extendInfo) { - - this.extendInfo = extendInfo; - return this; - } - - /** - * Get extendInfo - * @return extendInfo - **/ - @javax.annotation.Nullable - public OpenNamespaceExtendDTO getExtendInfo() { - return extendInfo; - } - - - public void setExtendInfo(OpenNamespaceExtendDTO extendInfo) { - this.extendInfo = extendInfo; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenNamespaceDTO openNamespaceDTO = (OpenNamespaceDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openNamespaceDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, openNamespaceDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedBy, openNamespaceDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, openNamespaceDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, openNamespaceDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openNamespaceDTO.dataChangeLastModifiedTime) && - Objects.equals(this.appId, openNamespaceDTO.appId) && - Objects.equals(this.clusterName, openNamespaceDTO.clusterName) && - Objects.equals(this.namespaceName, openNamespaceDTO.namespaceName) && - Objects.equals(this.comment, openNamespaceDTO.comment) && - Objects.equals(this.format, openNamespaceDTO.format) && - Objects.equals(this.isPublic, openNamespaceDTO.isPublic) && - Objects.equals(this.items, openNamespaceDTO.items) && - Objects.equals(this.extendInfo, openNamespaceDTO.extendInfo); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedBy, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, appId, clusterName, namespaceName, comment, format, isPublic, items, extendInfo); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenNamespaceDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).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(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append(" format: ").append(toIndentedString(format)).append("\n"); - sb.append(" isPublic: ").append(toIndentedString(isPublic)).append("\n"); - sb.append(" items: ").append(toIndentedString(items)).append("\n"); - sb.append(" extendInfo: ").append(toIndentedString(extendInfo)).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("dataChangeCreatedBy"); - openapiFields.add("dataChangeCreatedByDisplayName"); - openapiFields.add("dataChangeLastModifiedBy"); - openapiFields.add("dataChangeLastModifiedByDisplayName"); - 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"); - openapiFields.add("extendInfo"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - 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(), jsonObj.toString())); - } - } - 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("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("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("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("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("clusterName") != null && !jsonObj.get("clusterName").isJsonNull()) && !jsonObj.get("clusterName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `clusterName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clusterName").toString())); - } - if ((jsonObj.get("namespaceName") != null && !jsonObj.get("namespaceName").isJsonNull()) && !jsonObj.get("namespaceName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `namespaceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespaceName").toString())); - } - if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); - } - if ((jsonObj.get("format") != null && !jsonObj.get("format").isJsonNull()) && !jsonObj.get("format").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("format").toString())); - } - if (jsonObj.get("items") != null && !jsonObj.get("items").isJsonNull()) { - JsonArray jsonArrayitems = jsonObj.getAsJsonArray("items"); - if (jsonArrayitems != null) { - // ensure the json data is an array - if (!jsonObj.get("items").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `items` to be an array in the JSON string but got `%s`", jsonObj.get("items").toString())); - } - - // validate the optional field `items` (array) - for (int i = 0; i < jsonArrayitems.size(); i++) { - OpenItemDTO.validateJsonObject(jsonArrayitems.get(i).getAsJsonObject()); - }; - } - } - // validate the optional field `extendInfo` - if (jsonObj.get("extendInfo") != null && !jsonObj.get("extendInfo").isJsonNull()) { - OpenNamespaceExtendDTO.validateJsonObject(jsonObj.getAsJsonObject("extendInfo")); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenNamespaceDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenNamespaceDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenNamespaceDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenNamespaceDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenNamespaceDTO read(JsonReader in) throws IOException { - 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 - */ - public static OpenNamespaceDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenNamespaceDTO.class); - } - - /** - * Convert an instance of OpenNamespaceDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceExtendDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceExtendDTO.java deleted file mode 100644 index 1f0832ba..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceExtendDTO.java +++ /dev/null @@ -1,262 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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; - -/** - * OpenNamespaceExtendDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenNamespaceExtendDTO { - public static final String SERIALIZED_NAME_IS_CONFIG_HIDDEN = "isConfigHidden"; - @SerializedName(SERIALIZED_NAME_IS_CONFIG_HIDDEN) - private Boolean isConfigHidden; - - public static final String SERIALIZED_NAME_PARENT_APP_ID = "parentAppId"; - @SerializedName(SERIALIZED_NAME_PARENT_APP_ID) - private String parentAppId; - - public static final String SERIALIZED_NAME_ITEM_MODIFIED_CNT = "itemModifiedCnt"; - @SerializedName(SERIALIZED_NAME_ITEM_MODIFIED_CNT) - private Integer itemModifiedCnt; - - public OpenNamespaceExtendDTO() { - } - - public OpenNamespaceExtendDTO isConfigHidden(Boolean isConfigHidden) { - - this.isConfigHidden = isConfigHidden; - return this; - } - - /** - * 当当前用户无权限查看配置时置为 true - * @return isConfigHidden - **/ - @javax.annotation.Nullable - public Boolean getIsConfigHidden() { - return isConfigHidden; - } - - - public void setIsConfigHidden(Boolean isConfigHidden) { - this.isConfigHidden = isConfigHidden; - } - - - public OpenNamespaceExtendDTO parentAppId(String parentAppId) { - - this.parentAppId = parentAppId; - return this; - } - - /** - * 公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转 - * @return parentAppId - **/ - @javax.annotation.Nullable - public String getParentAppId() { - return parentAppId; - } - - - public void setParentAppId(String parentAppId) { - this.parentAppId = parentAppId; - } - - - public OpenNamespaceExtendDTO itemModifiedCnt(Integer itemModifiedCnt) { - - this.itemModifiedCnt = itemModifiedCnt; - return this; - } - - /** - * 未发布变更数 - * @return itemModifiedCnt - **/ - @javax.annotation.Nullable - public Integer getItemModifiedCnt() { - return itemModifiedCnt; - } - - - public void setItemModifiedCnt(Integer itemModifiedCnt) { - this.itemModifiedCnt = itemModifiedCnt; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenNamespaceExtendDTO openNamespaceExtendDTO = (OpenNamespaceExtendDTO) o; - return Objects.equals(this.isConfigHidden, openNamespaceExtendDTO.isConfigHidden) && - Objects.equals(this.parentAppId, openNamespaceExtendDTO.parentAppId) && - Objects.equals(this.itemModifiedCnt, openNamespaceExtendDTO.itemModifiedCnt); - } - - @Override - public int hashCode() { - return Objects.hash(isConfigHidden, parentAppId, itemModifiedCnt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenNamespaceExtendDTO {\n"); - sb.append(" isConfigHidden: ").append(toIndentedString(isConfigHidden)).append("\n"); - sb.append(" parentAppId: ").append(toIndentedString(parentAppId)).append("\n"); - sb.append(" itemModifiedCnt: ").append(toIndentedString(itemModifiedCnt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("isConfigHidden"); - openapiFields.add("parentAppId"); - openapiFields.add("itemModifiedCnt"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OpenNamespaceExtendDTO - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OpenNamespaceExtendDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenNamespaceExtendDTO is not found in the empty JSON string", OpenNamespaceExtendDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OpenNamespaceExtendDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenNamespaceExtendDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("parentAppId") != null && !jsonObj.get("parentAppId").isJsonNull()) && !jsonObj.get("parentAppId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `parentAppId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("parentAppId").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenNamespaceExtendDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenNamespaceExtendDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenNamespaceExtendDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenNamespaceExtendDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenNamespaceExtendDTO read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenNamespaceExtendDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenNamespaceExtendDTO - * @throws IOException if the JSON string is invalid with respect to OpenNamespaceExtendDTO - */ - public static OpenNamespaceExtendDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenNamespaceExtendDTO.class); - } - - /** - * Convert an instance of OpenNamespaceExtendDTO 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/OpenNamespaceIdentifier.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceIdentifier.java deleted file mode 100644 index 6f0f57bb..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceIdentifier.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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; - -/** - * OpenNamespaceIdentifier - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenNamespaceIdentifier { - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - private String appId; - - public static final String SERIALIZED_NAME_ENV = "env"; - @SerializedName(SERIALIZED_NAME_ENV) - private String env; - - public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; - @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - private String clusterName; - - public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - private String namespaceName; - - public OpenNamespaceIdentifier() { - } - - public OpenNamespaceIdentifier appId(String appId) { - - this.appId = appId; - return this; - } - - /** - * 应用唯一标识 - * @return appId - **/ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - - public void setAppId(String appId) { - this.appId = appId; - } - - - public OpenNamespaceIdentifier env(String env) { - - this.env = env; - return this; - } - - /** - * 环境标识 - * @return env - **/ - @javax.annotation.Nullable - public String getEnv() { - return env; - } - - - public void setEnv(String env) { - this.env = env; - } - - - public OpenNamespaceIdentifier clusterName(String clusterName) { - - this.clusterName = clusterName; - return this; - } - - /** - * 集群名称 - * @return clusterName - **/ - @javax.annotation.Nullable - public String getClusterName() { - return clusterName; - } - - - public void setClusterName(String clusterName) { - this.clusterName = clusterName; - } - - - public OpenNamespaceIdentifier namespaceName(String namespaceName) { - - this.namespaceName = namespaceName; - return this; - } - - /** - * 命名空间名称 - * @return namespaceName - **/ - @javax.annotation.Nullable - public String getNamespaceName() { - return namespaceName; - } - - - public void setNamespaceName(String namespaceName) { - this.namespaceName = namespaceName; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - 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 - public int hashCode() { - return Objects.hash(appId, env, clusterName, namespaceName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - 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"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("appId"); - openapiFields.add("env"); - openapiFields.add("clusterName"); - openapiFields.add("namespaceName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - 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())); - } - } - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("env") != null && !jsonObj.get("env").isJsonNull()) && !jsonObj.get("env").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `env` to be a primitive type in the JSON string but got `%s`", jsonObj.get("env").toString())); - } - if ((jsonObj.get("clusterName") != null && !jsonObj.get("clusterName").isJsonNull()) && !jsonObj.get("clusterName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `clusterName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clusterName").toString())); - } - if ((jsonObj.get("namespaceName") != null && !jsonObj.get("namespaceName").isJsonNull()) && !jsonObj.get("namespaceName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `namespaceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespaceName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!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(OpenNamespaceIdentifier.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenNamespaceIdentifier value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenNamespaceIdentifier read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * 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 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 deleted file mode 100644 index 53e2ff36..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceLockDTO.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Apollo命名空间锁状态数据传输对象 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenNamespaceLockDTO { - public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - private String namespaceName; - - public static final String SERIALIZED_NAME_IS_LOCKED = "isLocked"; - @SerializedName(SERIALIZED_NAME_IS_LOCKED) - private Boolean isLocked; - - public static final String SERIALIZED_NAME_LOCKED_BY = "lockedBy"; - @SerializedName(SERIALIZED_NAME_LOCKED_BY) - private String lockedBy; - - public static final String SERIALIZED_NAME_IS_EMERGENCY_PUBLISH_ALLOWED = "isEmergencyPublishAllowed"; - @SerializedName(SERIALIZED_NAME_IS_EMERGENCY_PUBLISH_ALLOWED) - private Boolean isEmergencyPublishAllowed; - - public OpenNamespaceLockDTO() { - } - - public OpenNamespaceLockDTO namespaceName(String namespaceName) { - - this.namespaceName = namespaceName; - return this; - } - - /** - * 命名空间名称 - * @return namespaceName - **/ - @javax.annotation.Nullable - public String getNamespaceName() { - return namespaceName; - } - - - public void setNamespaceName(String namespaceName) { - this.namespaceName = namespaceName; - } - - - public OpenNamespaceLockDTO isLocked(Boolean isLocked) { - - this.isLocked = isLocked; - return this; - } - - /** - * 是否被锁定 - * @return isLocked - **/ - @javax.annotation.Nullable - public Boolean getIsLocked() { - return isLocked; - } - - - public void setIsLocked(Boolean isLocked) { - this.isLocked = isLocked; - } - - - public OpenNamespaceLockDTO lockedBy(String lockedBy) { - - this.lockedBy = lockedBy; - return this; - } - - /** - * 锁定者用户名 - * @return lockedBy - **/ - @javax.annotation.Nullable - public String getLockedBy() { - return lockedBy; - } - - - public void setLockedBy(String lockedBy) { - this.lockedBy = lockedBy; - } - - - public OpenNamespaceLockDTO isEmergencyPublishAllowed(Boolean isEmergencyPublishAllowed) { - - this.isEmergencyPublishAllowed = isEmergencyPublishAllowed; - return this; - } - - /** - * 是否允许紧急发布 - * @return isEmergencyPublishAllowed - **/ - @javax.annotation.Nullable - public Boolean getIsEmergencyPublishAllowed() { - return isEmergencyPublishAllowed; - } - - - public void setIsEmergencyPublishAllowed(Boolean isEmergencyPublishAllowed) { - this.isEmergencyPublishAllowed = isEmergencyPublishAllowed; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenNamespaceLockDTO openNamespaceLockDTO = (OpenNamespaceLockDTO) o; - return Objects.equals(this.namespaceName, openNamespaceLockDTO.namespaceName) && - Objects.equals(this.isLocked, openNamespaceLockDTO.isLocked) && - Objects.equals(this.lockedBy, openNamespaceLockDTO.lockedBy) && - Objects.equals(this.isEmergencyPublishAllowed, openNamespaceLockDTO.isEmergencyPublishAllowed); - } - - @Override - public int hashCode() { - return Objects.hash(namespaceName, isLocked, lockedBy, isEmergencyPublishAllowed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenNamespaceLockDTO {\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" isLocked: ").append(toIndentedString(isLocked)).append("\n"); - sb.append(" lockedBy: ").append(toIndentedString(lockedBy)).append("\n"); - sb.append(" isEmergencyPublishAllowed: ").append(toIndentedString(isEmergencyPublishAllowed)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("namespaceName"); - openapiFields.add("isLocked"); - openapiFields.add("lockedBy"); - openapiFields.add("isEmergencyPublishAllowed"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - 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(), jsonObj.toString())); - } - } - if ((jsonObj.get("namespaceName") != null && !jsonObj.get("namespaceName").isJsonNull()) && !jsonObj.get("namespaceName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `namespaceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespaceName").toString())); - } - if ((jsonObj.get("lockedBy") != null && !jsonObj.get("lockedBy").isJsonNull()) && !jsonObj.get("lockedBy").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `lockedBy` to be a primitive type in the JSON string but got `%s`", jsonObj.get("lockedBy").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenNamespaceLockDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenNamespaceLockDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenNamespaceLockDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenNamespaceLockDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenNamespaceLockDTO read(JsonReader in) throws IOException { - 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 - */ - public static OpenNamespaceLockDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenNamespaceLockDTO.class); - } - - /** - * Convert an instance of OpenNamespaceLockDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceRoleUserDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceRoleUserDTO.java deleted file mode 100644 index ddfcba59..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceRoleUserDTO.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.OpenUserInfoDTO; - -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; - -/** - * OpenNamespaceRoleUserDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenNamespaceRoleUserDTO { - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - private String appId; - - public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - private String namespaceName; - - public static final String SERIALIZED_NAME_MODIFY_ROLE_USERS = "modifyRoleUsers"; - @SerializedName(SERIALIZED_NAME_MODIFY_ROLE_USERS) - private List modifyRoleUsers; - - public static final String SERIALIZED_NAME_RELEASE_ROLE_USERS = "releaseRoleUsers"; - @SerializedName(SERIALIZED_NAME_RELEASE_ROLE_USERS) - private List releaseRoleUsers; - - public OpenNamespaceRoleUserDTO() { - } - - public OpenNamespaceRoleUserDTO appId(String appId) { - - this.appId = appId; - return this; - } - - /** - * - * @return appId - **/ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - - public void setAppId(String appId) { - this.appId = appId; - } - - - public OpenNamespaceRoleUserDTO namespaceName(String namespaceName) { - - this.namespaceName = namespaceName; - return this; - } - - /** - * - * @return namespaceName - **/ - @javax.annotation.Nullable - public String getNamespaceName() { - return namespaceName; - } - - - public void setNamespaceName(String namespaceName) { - this.namespaceName = namespaceName; - } - - - public OpenNamespaceRoleUserDTO modifyRoleUsers(List modifyRoleUsers) { - - this.modifyRoleUsers = modifyRoleUsers; - return this; - } - - public OpenNamespaceRoleUserDTO addModifyRoleUsersItem(OpenUserInfoDTO modifyRoleUsersItem) { - if (this.modifyRoleUsers == null) { - this.modifyRoleUsers = new ArrayList<>(); - } - this.modifyRoleUsers.add(modifyRoleUsersItem); - return this; - } - - /** - * - * @return modifyRoleUsers - **/ - @javax.annotation.Nullable - public List getModifyRoleUsers() { - return modifyRoleUsers; - } - - - public void setModifyRoleUsers(List modifyRoleUsers) { - this.modifyRoleUsers = modifyRoleUsers; - } - - - public OpenNamespaceRoleUserDTO releaseRoleUsers(List releaseRoleUsers) { - - this.releaseRoleUsers = releaseRoleUsers; - return this; - } - - public OpenNamespaceRoleUserDTO addReleaseRoleUsersItem(OpenUserInfoDTO releaseRoleUsersItem) { - if (this.releaseRoleUsers == null) { - this.releaseRoleUsers = new ArrayList<>(); - } - this.releaseRoleUsers.add(releaseRoleUsersItem); - return this; - } - - /** - * - * @return releaseRoleUsers - **/ - @javax.annotation.Nullable - public List getReleaseRoleUsers() { - return releaseRoleUsers; - } - - - public void setReleaseRoleUsers(List releaseRoleUsers) { - this.releaseRoleUsers = releaseRoleUsers; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenNamespaceRoleUserDTO openNamespaceRoleUserDTO = (OpenNamespaceRoleUserDTO) o; - return Objects.equals(this.appId, openNamespaceRoleUserDTO.appId) && - Objects.equals(this.namespaceName, openNamespaceRoleUserDTO.namespaceName) && - Objects.equals(this.modifyRoleUsers, openNamespaceRoleUserDTO.modifyRoleUsers) && - Objects.equals(this.releaseRoleUsers, openNamespaceRoleUserDTO.releaseRoleUsers); - } - - @Override - public int hashCode() { - return Objects.hash(appId, namespaceName, modifyRoleUsers, releaseRoleUsers); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenNamespaceRoleUserDTO {\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" modifyRoleUsers: ").append(toIndentedString(modifyRoleUsers)).append("\n"); - sb.append(" releaseRoleUsers: ").append(toIndentedString(releaseRoleUsers)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("appId"); - openapiFields.add("namespaceName"); - openapiFields.add("modifyRoleUsers"); - openapiFields.add("releaseRoleUsers"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OpenNamespaceRoleUserDTO - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OpenNamespaceRoleUserDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenNamespaceRoleUserDTO is not found in the empty JSON string", OpenNamespaceRoleUserDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OpenNamespaceRoleUserDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenNamespaceRoleUserDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("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("modifyRoleUsers") != null && !jsonObj.get("modifyRoleUsers").isJsonNull()) { - JsonArray jsonArraymodifyRoleUsers = jsonObj.getAsJsonArray("modifyRoleUsers"); - if (jsonArraymodifyRoleUsers != null) { - // ensure the json data is an array - if (!jsonObj.get("modifyRoleUsers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `modifyRoleUsers` to be an array in the JSON string but got `%s`", jsonObj.get("modifyRoleUsers").toString())); - } - - // validate the optional field `modifyRoleUsers` (array) - for (int i = 0; i < jsonArraymodifyRoleUsers.size(); i++) { - OpenUserInfoDTO.validateJsonObject(jsonArraymodifyRoleUsers.get(i).getAsJsonObject()); - }; - } - } - if (jsonObj.get("releaseRoleUsers") != null && !jsonObj.get("releaseRoleUsers").isJsonNull()) { - JsonArray jsonArrayreleaseRoleUsers = jsonObj.getAsJsonArray("releaseRoleUsers"); - if (jsonArrayreleaseRoleUsers != null) { - // ensure the json data is an array - if (!jsonObj.get("releaseRoleUsers").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `releaseRoleUsers` to be an array in the JSON string but got `%s`", jsonObj.get("releaseRoleUsers").toString())); - } - - // validate the optional field `releaseRoleUsers` (array) - for (int i = 0; i < jsonArrayreleaseRoleUsers.size(); i++) { - OpenUserInfoDTO.validateJsonObject(jsonArrayreleaseRoleUsers.get(i).getAsJsonObject()); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenNamespaceRoleUserDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenNamespaceRoleUserDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenNamespaceRoleUserDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenNamespaceRoleUserDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenNamespaceRoleUserDTO read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenNamespaceRoleUserDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenNamespaceRoleUserDTO - * @throws IOException if the JSON string is invalid with respect to OpenNamespaceRoleUserDTO - */ - public static OpenNamespaceRoleUserDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenNamespaceRoleUserDTO.class); - } - - /** - * Convert an instance of OpenNamespaceRoleUserDTO 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/OpenNamespaceSyncDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceSyncDTO.java deleted file mode 100644 index 92b2b082..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceSyncDTO.java +++ /dev/null @@ -1,279 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import java.util.Objects; -import java.util.Arrays; -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.OpenItemDTO; -import org.openapitools.client.model.OpenNamespaceIdentifier; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * OpenNamespaceSyncDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenNamespaceSyncDTO { - public static final String SERIALIZED_NAME_SYNC_TO_NAMESPACES = "syncToNamespaces"; - @SerializedName(SERIALIZED_NAME_SYNC_TO_NAMESPACES) - private List syncToNamespaces; - - public static final String SERIALIZED_NAME_SYNC_ITEMS = "syncItems"; - @SerializedName(SERIALIZED_NAME_SYNC_ITEMS) - private List syncItems; - - public OpenNamespaceSyncDTO() { - } - - public OpenNamespaceSyncDTO syncToNamespaces(List syncToNamespaces) { - - this.syncToNamespaces = syncToNamespaces; - return this; - } - - public OpenNamespaceSyncDTO addSyncToNamespacesItem(OpenNamespaceIdentifier syncToNamespacesItem) { - if (this.syncToNamespaces == null) { - this.syncToNamespaces = new ArrayList<>(); - } - this.syncToNamespaces.add(syncToNamespacesItem); - return this; - } - - /** - * 目标命名空间标识列表 - * @return syncToNamespaces - **/ - @javax.annotation.Nullable - public List getSyncToNamespaces() { - return syncToNamespaces; - } - - - public void setSyncToNamespaces(List syncToNamespaces) { - this.syncToNamespaces = syncToNamespaces; - } - - - public OpenNamespaceSyncDTO syncItems(List syncItems) { - - this.syncItems = syncItems; - return this; - } - - public OpenNamespaceSyncDTO addSyncItemsItem(OpenItemDTO syncItemsItem) { - if (this.syncItems == null) { - this.syncItems = new ArrayList<>(); - } - this.syncItems.add(syncItemsItem); - return this; - } - - /** - * 需要修改的配置项列表 - * @return syncItems - **/ - @javax.annotation.Nullable - public List getSyncItems() { - return syncItems; - } - - - public void setSyncItems(List syncItems) { - this.syncItems = syncItems; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenNamespaceSyncDTO openNamespaceSyncDTO = (OpenNamespaceSyncDTO) o; - return Objects.equals(this.syncToNamespaces, openNamespaceSyncDTO.syncToNamespaces) && - Objects.equals(this.syncItems, openNamespaceSyncDTO.syncItems); - } - - @Override - public int hashCode() { - return Objects.hash(syncToNamespaces, syncItems); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenNamespaceSyncDTO {\n"); - sb.append(" syncToNamespaces: ").append(toIndentedString(syncToNamespaces)).append("\n"); - sb.append(" syncItems: ").append(toIndentedString(syncItems)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("syncToNamespaces"); - openapiFields.add("syncItems"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OpenNamespaceSyncDTO - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OpenNamespaceSyncDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenNamespaceSyncDTO is not found in the empty JSON string", OpenNamespaceSyncDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OpenNamespaceSyncDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenNamespaceSyncDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if (jsonObj.get("syncToNamespaces") != null && !jsonObj.get("syncToNamespaces").isJsonNull()) { - JsonArray jsonArraysyncToNamespaces = jsonObj.getAsJsonArray("syncToNamespaces"); - if (jsonArraysyncToNamespaces != null) { - // ensure the json data is an array - if (!jsonObj.get("syncToNamespaces").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `syncToNamespaces` to be an array in the JSON string but got `%s`", jsonObj.get("syncToNamespaces").toString())); - } - - // validate the optional field `syncToNamespaces` (array) - for (int i = 0; i < jsonArraysyncToNamespaces.size(); i++) { - OpenNamespaceIdentifier.validateJsonObject(jsonArraysyncToNamespaces.get(i).getAsJsonObject()); - }; - } - } - if (jsonObj.get("syncItems") != null && !jsonObj.get("syncItems").isJsonNull()) { - JsonArray jsonArraysyncItems = jsonObj.getAsJsonArray("syncItems"); - if (jsonArraysyncItems != null) { - // ensure the json data is an array - if (!jsonObj.get("syncItems").isJsonArray()) { - throw new IllegalArgumentException(String.format("Expected the field `syncItems` to be an array in the JSON string but got `%s`", jsonObj.get("syncItems").toString())); - } - - // validate the optional field `syncItems` (array) - for (int i = 0; i < jsonArraysyncItems.size(); i++) { - OpenItemDTO.validateJsonObject(jsonArraysyncItems.get(i).getAsJsonObject()); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenNamespaceSyncDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenNamespaceSyncDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenNamespaceSyncDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenNamespaceSyncDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenNamespaceSyncDTO read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenNamespaceSyncDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenNamespaceSyncDTO - * @throws IOException if the JSON string is invalid with respect to OpenNamespaceSyncDTO - */ - public static OpenNamespaceSyncDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenNamespaceSyncDTO.class); - } - - /** - * Convert an instance of OpenNamespaceSyncDTO 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/OpenNamespaceTextModel.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceTextModel.java deleted file mode 100644 index c143293f..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceTextModel.java +++ /dev/null @@ -1,420 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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; - -/** - * OpenNamespaceTextModel - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenNamespaceTextModel { - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - private String appId; - - public static final String SERIALIZED_NAME_ENV = "env"; - @SerializedName(SERIALIZED_NAME_ENV) - private String env; - - public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; - @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - private String clusterName; - - public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - private String namespaceName; - - public static final String SERIALIZED_NAME_NAMESPACE_ID = "namespaceId"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_ID) - private Long namespaceId; - - public static final String SERIALIZED_NAME_FORMAT = "format"; - @SerializedName(SERIALIZED_NAME_FORMAT) - private String format; - - public static final String SERIALIZED_NAME_CONFIG_TEXT = "configText"; - @SerializedName(SERIALIZED_NAME_CONFIG_TEXT) - private String configText; - - public static final String SERIALIZED_NAME_OPERATOR = "operator"; - @SerializedName(SERIALIZED_NAME_OPERATOR) - private String operator; - - public OpenNamespaceTextModel() { - } - - public OpenNamespaceTextModel appId(String appId) { - - this.appId = appId; - return this; - } - - /** - * 应用唯一标识 - * @return appId - **/ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - - public void setAppId(String appId) { - this.appId = appId; - } - - - public OpenNamespaceTextModel env(String env) { - - this.env = env; - return this; - } - - /** - * 环境标识 - * @return env - **/ - @javax.annotation.Nullable - public String getEnv() { - return env; - } - - - public void setEnv(String env) { - this.env = env; - } - - - public OpenNamespaceTextModel clusterName(String clusterName) { - - this.clusterName = clusterName; - return this; - } - - /** - * 集群名称 - * @return clusterName - **/ - @javax.annotation.Nullable - public String getClusterName() { - return clusterName; - } - - - public void setClusterName(String clusterName) { - this.clusterName = clusterName; - } - - - public OpenNamespaceTextModel namespaceName(String namespaceName) { - - this.namespaceName = namespaceName; - return this; - } - - /** - * 命名空间名称 - * @return namespaceName - **/ - @javax.annotation.Nullable - public String getNamespaceName() { - return namespaceName; - } - - - public void setNamespaceName(String namespaceName) { - this.namespaceName = namespaceName; - } - - - public OpenNamespaceTextModel namespaceId(Long namespaceId) { - - this.namespaceId = namespaceId; - return this; - } - - /** - * 命名空间ID - * @return namespaceId - **/ - @javax.annotation.Nullable - public Long getNamespaceId() { - return namespaceId; - } - - - public void setNamespaceId(Long namespaceId) { - this.namespaceId = namespaceId; - } - - - public 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(String format) { - this.format = format; - } - - - public OpenNamespaceTextModel configText(String configText) { - - this.configText = configText; - return this; - } - - /** - * 配置内容的原始文本 - * @return configText - **/ - @javax.annotation.Nullable - 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 - **/ - @javax.annotation.Nullable - 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 "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("appId"); - openapiFields.add("env"); - openapiFields.add("clusterName"); - openapiFields.add("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(); - } - - /** - * 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - 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())); - } - } - if ((jsonObj.get("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("env") != null && !jsonObj.get("env").isJsonNull()) && !jsonObj.get("env").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `env` to be a primitive type in the JSON string but got `%s`", jsonObj.get("env").toString())); - } - if ((jsonObj.get("clusterName") != null && !jsonObj.get("clusterName").isJsonNull()) && !jsonObj.get("clusterName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `clusterName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clusterName").toString())); - } - if ((jsonObj.get("namespaceName") != null && !jsonObj.get("namespaceName").isJsonNull()) && !jsonObj.get("namespaceName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `namespaceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespaceName").toString())); - } - if ((jsonObj.get("format") != null && !jsonObj.get("format").isJsonNull()) && !jsonObj.get("format").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `format` to be a primitive type in the JSON string but got `%s`", jsonObj.get("format").toString())); - } - if ((jsonObj.get("configText") != null && !jsonObj.get("configText").isJsonNull()) && !jsonObj.get("configText").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `configText` to be a primitive type in the JSON string but got `%s`", jsonObj.get("configText").toString())); - } - if ((jsonObj.get("operator") != null && !jsonObj.get("operator").isJsonNull()) && !jsonObj.get("operator").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `operator` to be a primitive type in the JSON string but got `%s`", jsonObj.get("operator").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!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(OpenNamespaceTextModel.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenNamespaceTextModel value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenNamespaceTextModel read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * 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 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/OpenNamespaceUsageDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceUsageDTO.java deleted file mode 100644 index df74d4ff..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenNamespaceUsageDTO.java +++ /dev/null @@ -1,383 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

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

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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; - -/** - * OpenOrganizationDto - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenOrganizationDto { - public static final String SERIALIZED_NAME_ORG_ID = "orgId"; - @SerializedName(SERIALIZED_NAME_ORG_ID) - private String orgId; - - public static final String SERIALIZED_NAME_ORG_NAME = "orgName"; - @SerializedName(SERIALIZED_NAME_ORG_NAME) - private String orgName; - - public OpenOrganizationDto() { - } - - public OpenOrganizationDto orgId(String orgId) { - - this.orgId = orgId; - return this; - } - - /** - * 组织ID - * @return orgId - **/ - @javax.annotation.Nullable - public String getOrgId() { - return orgId; - } - - - public void setOrgId(String orgId) { - this.orgId = orgId; - } - - - public OpenOrganizationDto orgName(String orgName) { - - this.orgName = orgName; - return this; - } - - /** - * 组织名称 - * @return orgName - **/ - @javax.annotation.Nullable - public String getOrgName() { - return orgName; - } - - - public void setOrgName(String orgName) { - this.orgName = orgName; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenOrganizationDto openOrganizationDto = (OpenOrganizationDto) o; - return Objects.equals(this.orgId, openOrganizationDto.orgId) && - Objects.equals(this.orgName, openOrganizationDto.orgName); - } - - @Override - public int hashCode() { - return Objects.hash(orgId, orgName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenOrganizationDto {\n"); - sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); - sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("orgId"); - openapiFields.add("orgName"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - 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(), jsonObj.toString())); - } - } - if ((jsonObj.get("orgId") != null && !jsonObj.get("orgId").isJsonNull()) && !jsonObj.get("orgId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `orgId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orgId").toString())); - } - if ((jsonObj.get("orgName") != null && !jsonObj.get("orgName").isJsonNull()) && !jsonObj.get("orgName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `orgName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("orgName").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenOrganizationDto.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenOrganizationDto' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenOrganizationDto.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenOrganizationDto value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenOrganizationDto read(JsonReader in) throws IOException { - 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 - */ - public static OpenOrganizationDto fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenOrganizationDto.class); - } - - /** - * Convert an instance of OpenOrganizationDto to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenPermissionConditionDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenPermissionConditionDTO.java deleted file mode 100644 index 0b7c2d12..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenPermissionConditionDTO.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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; - -/** - * OpenPermissionConditionDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenPermissionConditionDTO { - public static final String SERIALIZED_NAME_HAS_PERMISSION = "hasPermission"; - @SerializedName(SERIALIZED_NAME_HAS_PERMISSION) - private Boolean hasPermission; - - public OpenPermissionConditionDTO() { - } - - public OpenPermissionConditionDTO hasPermission(Boolean hasPermission) { - - this.hasPermission = hasPermission; - return this; - } - - /** - * - * @return hasPermission - **/ - @javax.annotation.Nullable - public Boolean getHasPermission() { - return hasPermission; - } - - - public void setHasPermission(Boolean hasPermission) { - this.hasPermission = hasPermission; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenPermissionConditionDTO openPermissionConditionDTO = (OpenPermissionConditionDTO) o; - return Objects.equals(this.hasPermission, openPermissionConditionDTO.hasPermission); - } - - @Override - public int hashCode() { - return Objects.hash(hasPermission); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenPermissionConditionDTO {\n"); - sb.append(" hasPermission: ").append(toIndentedString(hasPermission)).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("hasPermission"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OpenPermissionConditionDTO - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OpenPermissionConditionDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenPermissionConditionDTO is not found in the empty JSON string", OpenPermissionConditionDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OpenPermissionConditionDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenPermissionConditionDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenPermissionConditionDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenPermissionConditionDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenPermissionConditionDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenPermissionConditionDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenPermissionConditionDTO read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenPermissionConditionDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenPermissionConditionDTO - * @throws IOException if the JSON string is invalid with respect to OpenPermissionConditionDTO - */ - public static OpenPermissionConditionDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenPermissionConditionDTO.class); - } - - /** - * Convert an instance of OpenPermissionConditionDTO 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/OpenReleaseChangeDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenReleaseChangeDTO.java deleted file mode 100644 index d4c91735..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenReleaseChangeDTO.java +++ /dev/null @@ -1,299 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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; - -/** - * OpenReleaseChangeDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenReleaseChangeDTO { - public static final String SERIALIZED_NAME_CHANGE_TYPE = "changeType"; - @SerializedName(SERIALIZED_NAME_CHANGE_TYPE) - private String changeType; - - public static final String SERIALIZED_NAME_KEY = "key"; - @SerializedName(SERIALIZED_NAME_KEY) - private String key; - - public static final String SERIALIZED_NAME_NEW_VALUE = "newValue"; - @SerializedName(SERIALIZED_NAME_NEW_VALUE) - private String newValue; - - public static final String SERIALIZED_NAME_OLD_VALUE = "oldValue"; - @SerializedName(SERIALIZED_NAME_OLD_VALUE) - private String oldValue; - - public OpenReleaseChangeDTO() { - } - - public OpenReleaseChangeDTO changeType(String changeType) { - - this.changeType = changeType; - return this; - } - - /** - * 修改类型 - * @return changeType - **/ - @javax.annotation.Nullable - public String getChangeType() { - return changeType; - } - - - public void setChangeType(String changeType) { - this.changeType = changeType; - } - - - public OpenReleaseChangeDTO key(String key) { - - this.key = key; - return this; - } - - /** - * key - * @return key - **/ - @javax.annotation.Nullable - public String getKey() { - return key; - } - - - public void setKey(String key) { - this.key = key; - } - - - public OpenReleaseChangeDTO newValue(String newValue) { - - this.newValue = newValue; - return this; - } - - /** - * new value - * @return newValue - **/ - @javax.annotation.Nullable - public String getNewValue() { - return newValue; - } - - - public void setNewValue(String newValue) { - this.newValue = newValue; - } - - - public OpenReleaseChangeDTO oldValue(String oldValue) { - - this.oldValue = oldValue; - return this; - } - - /** - * old value - * @return oldValue - **/ - @javax.annotation.Nullable - public String getOldValue() { - return oldValue; - } - - - public void setOldValue(String oldValue) { - this.oldValue = oldValue; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenReleaseChangeDTO openReleaseChangeDTO = (OpenReleaseChangeDTO) o; - return Objects.equals(this.changeType, openReleaseChangeDTO.changeType) && - Objects.equals(this.key, openReleaseChangeDTO.key) && - Objects.equals(this.newValue, openReleaseChangeDTO.newValue) && - Objects.equals(this.oldValue, openReleaseChangeDTO.oldValue); - } - - @Override - public int hashCode() { - return Objects.hash(changeType, key, newValue, oldValue); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenReleaseChangeDTO {\n"); - sb.append(" changeType: ").append(toIndentedString(changeType)).append("\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" newValue: ").append(toIndentedString(newValue)).append("\n"); - sb.append(" oldValue: ").append(toIndentedString(oldValue)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("changeType"); - openapiFields.add("key"); - openapiFields.add("newValue"); - openapiFields.add("oldValue"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OpenReleaseChangeDTO - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OpenReleaseChangeDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenReleaseChangeDTO is not found in the empty JSON string", OpenReleaseChangeDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OpenReleaseChangeDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenReleaseChangeDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("changeType") != null && !jsonObj.get("changeType").isJsonNull()) && !jsonObj.get("changeType").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `changeType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("changeType").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("newValue") != null && !jsonObj.get("newValue").isJsonNull()) && !jsonObj.get("newValue").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `newValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("newValue").toString())); - } - if ((jsonObj.get("oldValue") != null && !jsonObj.get("oldValue").isJsonNull()) && !jsonObj.get("oldValue").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `oldValue` to be a primitive type in the JSON string but got `%s`", jsonObj.get("oldValue").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenReleaseChangeDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenReleaseChangeDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenReleaseChangeDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenReleaseChangeDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenReleaseChangeDTO read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenReleaseChangeDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenReleaseChangeDTO - * @throws IOException if the JSON string is invalid with respect to OpenReleaseChangeDTO - */ - public static OpenReleaseChangeDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenReleaseChangeDTO.class); - } - - /** - * Convert an instance of OpenReleaseChangeDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenReleaseDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenReleaseDTO.java deleted file mode 100644 index 0ebec8b8..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenReleaseDTO.java +++ /dev/null @@ -1,582 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.HashMap; -import java.util.Map; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; -import com.google.gson.JsonArray; -import com.google.gson.JsonDeserializationContext; -import com.google.gson.JsonDeserializer; -import com.google.gson.JsonElement; -import com.google.gson.JsonObject; -import com.google.gson.JsonParseException; -import com.google.gson.TypeAdapterFactory; -import com.google.gson.reflect.TypeToken; -import com.google.gson.TypeAdapter; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; - -import java.lang.reflect.Type; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; -import java.util.Set; - -import org.openapitools.client.JSON; - -/** - * Apollo发布信息数据传输对象,表示一次配置发布的完整信息 - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenReleaseDTO { - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY = "dataChangeCreatedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY) - private String dataChangeCreatedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME = "dataChangeCreatedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_BY_DISPLAY_NAME) - private String dataChangeCreatedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY = "dataChangeLastModifiedBy"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY) - private String dataChangeLastModifiedBy; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME = "dataChangeLastModifiedByDisplayName"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_BY_DISPLAY_NAME) - private String dataChangeLastModifiedByDisplayName; - - public static final String SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME = "dataChangeCreatedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_CREATED_TIME) - private String dataChangeCreatedTime; - - public static final String SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME = "dataChangeLastModifiedTime"; - @SerializedName(SERIALIZED_NAME_DATA_CHANGE_LAST_MODIFIED_TIME) - private String dataChangeLastModifiedTime; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - private Long id; - - public static final String SERIALIZED_NAME_APP_ID = "appId"; - @SerializedName(SERIALIZED_NAME_APP_ID) - private String appId; - - public static final String SERIALIZED_NAME_CLUSTER_NAME = "clusterName"; - @SerializedName(SERIALIZED_NAME_CLUSTER_NAME) - private String clusterName; - - public static final String SERIALIZED_NAME_NAMESPACE_NAME = "namespaceName"; - @SerializedName(SERIALIZED_NAME_NAMESPACE_NAME) - private String namespaceName; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_CONFIGURATIONS = "configurations"; - @SerializedName(SERIALIZED_NAME_CONFIGURATIONS) - private Map configurations = new HashMap<>(); - - public static final String SERIALIZED_NAME_COMMENT = "comment"; - @SerializedName(SERIALIZED_NAME_COMMENT) - private String comment; - - public OpenReleaseDTO() { - } - - public OpenReleaseDTO dataChangeCreatedBy(String dataChangeCreatedBy) { - - this.dataChangeCreatedBy = dataChangeCreatedBy; - return this; - } - - /** - * 发布创建者用户名,记录是谁创建了这次发布 - * @return dataChangeCreatedBy - **/ - @javax.annotation.Nullable - public String getDataChangeCreatedBy() { - return dataChangeCreatedBy; - } - - - public void setDataChangeCreatedBy(String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - } - - - public OpenReleaseDTO dataChangeCreatedByDisplayName(String dataChangeCreatedByDisplayName) { - - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - return this; - } - - /** - * 发布创建者显示名称,用于展示创建者的友好名称 - * @return dataChangeCreatedByDisplayName - **/ - @javax.annotation.Nullable - public String getDataChangeCreatedByDisplayName() { - return dataChangeCreatedByDisplayName; - } - - - public void setDataChangeCreatedByDisplayName(String dataChangeCreatedByDisplayName) { - this.dataChangeCreatedByDisplayName = dataChangeCreatedByDisplayName; - } - - - public OpenReleaseDTO dataChangeLastModifiedBy(String dataChangeLastModifiedBy) { - - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - return this; - } - - /** - * 发布最后修改者用户名,记录最后一次修改发布信息的用户 - * @return dataChangeLastModifiedBy - **/ - @javax.annotation.Nullable - public String getDataChangeLastModifiedBy() { - return dataChangeLastModifiedBy; - } - - - public void setDataChangeLastModifiedBy(String dataChangeLastModifiedBy) { - this.dataChangeLastModifiedBy = dataChangeLastModifiedBy; - } - - - public OpenReleaseDTO dataChangeLastModifiedByDisplayName(String dataChangeLastModifiedByDisplayName) { - - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - return this; - } - - /** - * 发布最后修改者显示名称,用于展示最后修改者的友好名称 - * @return dataChangeLastModifiedByDisplayName - **/ - @javax.annotation.Nullable - public String getDataChangeLastModifiedByDisplayName() { - return dataChangeLastModifiedByDisplayName; - } - - - public void setDataChangeLastModifiedByDisplayName(String dataChangeLastModifiedByDisplayName) { - this.dataChangeLastModifiedByDisplayName = dataChangeLastModifiedByDisplayName; - } - - - 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(String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - - 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(String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - - public OpenReleaseDTO id(Long id) { - - this.id = id; - return this; - } - - /** - * 发布记录的唯一标识符,系统自动生成 - * @return id - **/ - @javax.annotation.Nullable - public Long getId() { - return id; - } - - - public void setId(Long id) { - this.id = id; - } - - - public OpenReleaseDTO appId(String appId) { - - this.appId = appId; - return this; - } - - /** - * 所属应用的唯一标识符 - * @return appId - **/ - @javax.annotation.Nullable - public String getAppId() { - return appId; - } - - - public void setAppId(String appId) { - this.appId = appId; - } - - - public OpenReleaseDTO clusterName(String clusterName) { - - this.clusterName = clusterName; - return this; - } - - /** - * 所属集群的名称 - * @return clusterName - **/ - @javax.annotation.Nullable - public String getClusterName() { - return clusterName; - } - - - public void setClusterName(String clusterName) { - this.clusterName = clusterName; - } - - - public OpenReleaseDTO namespaceName(String namespaceName) { - - this.namespaceName = namespaceName; - return this; - } - - /** - * 所属命名空间的名称 - * @return namespaceName - **/ - @javax.annotation.Nullable - public String getNamespaceName() { - return namespaceName; - } - - - public void setNamespaceName(String namespaceName) { - this.namespaceName = namespaceName; - } - - - public OpenReleaseDTO name(String name) { - - this.name = name; - return this; - } - - /** - * 发布名称,用于标识这次发布的版本或描述 - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - 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 Map getConfigurations() { - return configurations; - } - - - public void setConfigurations(Map configurations) { - this.configurations = configurations; - } - - - public OpenReleaseDTO comment(String comment) { - - this.comment = comment; - return this; - } - - /** - * 发布备注,描述本次发布的变更内容和目的 - * @return comment - **/ - @javax.annotation.Nullable - public String getComment() { - return comment; - } - - - public void setComment(String comment) { - this.comment = comment; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenReleaseDTO openReleaseDTO = (OpenReleaseDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openReleaseDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, openReleaseDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedBy, openReleaseDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, openReleaseDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, openReleaseDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openReleaseDTO.dataChangeLastModifiedTime) && - Objects.equals(this.id, openReleaseDTO.id) && - Objects.equals(this.appId, openReleaseDTO.appId) && - Objects.equals(this.clusterName, openReleaseDTO.clusterName) && - Objects.equals(this.namespaceName, openReleaseDTO.namespaceName) && - Objects.equals(this.name, openReleaseDTO.name) && - Objects.equals(this.configurations, openReleaseDTO.configurations) && - Objects.equals(this.comment, openReleaseDTO.comment); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedBy, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, id, appId, clusterName, namespaceName, name, configurations, comment); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenReleaseDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).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(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" configurations: ").append(toIndentedString(configurations)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } - - - public static HashSet openapiFields; - public static HashSet openapiRequiredFields; - - static { - // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(); - openapiFields.add("dataChangeCreatedBy"); - openapiFields.add("dataChangeCreatedByDisplayName"); - openapiFields.add("dataChangeLastModifiedBy"); - openapiFields.add("dataChangeLastModifiedByDisplayName"); - 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(); - } - - /** - * 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 = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - 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(), jsonObj.toString())); - } - } - 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("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("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("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("appId") != null && !jsonObj.get("appId").isJsonNull()) && !jsonObj.get("appId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `appId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("appId").toString())); - } - if ((jsonObj.get("clusterName") != null && !jsonObj.get("clusterName").isJsonNull()) && !jsonObj.get("clusterName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `clusterName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("clusterName").toString())); - } - if ((jsonObj.get("namespaceName") != null && !jsonObj.get("namespaceName").isJsonNull()) && !jsonObj.get("namespaceName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `namespaceName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("namespaceName").toString())); - } - if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); - } - if ((jsonObj.get("comment") != null && !jsonObj.get("comment").isJsonNull()) && !jsonObj.get("comment").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenReleaseDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenReleaseDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenReleaseDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenReleaseDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenReleaseDTO read(JsonReader in) throws IOException { - 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 - */ - public static OpenReleaseDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenReleaseDTO.class); - } - - /** - * Convert an instance of OpenReleaseDTO to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} diff --git a/java-client/src/main/java/org/openapitools/client/model/OpenReleaseDiffDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenReleaseDiffDTO.java deleted file mode 100644 index 4e8c7767..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenReleaseDiffDTO.java +++ /dev/null @@ -1,228 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.OpenReleaseChangeDTO; - -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; - -/** - * OpenReleaseDiffDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenReleaseDiffDTO { - public static final String SERIALIZED_NAME_CHANGES = "changes"; - @SerializedName(SERIALIZED_NAME_CHANGES) - private List changes; - - public OpenReleaseDiffDTO() { - } - - public OpenReleaseDiffDTO changes(List changes) { - - this.changes = changes; - return this; - } - - public OpenReleaseDiffDTO addChangesItem(OpenReleaseChangeDTO changesItem) { - if (this.changes == null) { - this.changes = new ArrayList<>(); - } - this.changes.add(changesItem); - return this; - } - - /** - * A list of changes, ensuring order if necessary. - * @return changes - **/ - @javax.annotation.Nullable - public List getChanges() { - return changes; - } - - - public void setChanges(List changes) { - this.changes = changes; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenReleaseDiffDTO openReleaseDiffDTO = (OpenReleaseDiffDTO) o; - return Objects.equals(this.changes, openReleaseDiffDTO.changes); - } - - @Override - public int hashCode() { - return Objects.hash(changes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenReleaseDiffDTO {\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(); - openapiFields.add("changes"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OpenReleaseDiffDTO - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OpenReleaseDiffDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenReleaseDiffDTO is not found in the empty JSON string", OpenReleaseDiffDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OpenReleaseDiffDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenReleaseDiffDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - 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++) { - OpenReleaseChangeDTO.validateJsonObject(jsonArraychanges.get(i).getAsJsonObject()); - }; - } - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenReleaseDiffDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenReleaseDiffDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenReleaseDiffDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenReleaseDiffDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenReleaseDiffDTO read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenReleaseDiffDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenReleaseDiffDTO - * @throws IOException if the JSON string is invalid with respect to OpenReleaseDiffDTO - */ - public static OpenReleaseDiffDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenReleaseDiffDTO.class); - } - - /** - * Convert an instance of OpenReleaseDiffDTO 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/OpenUserDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenUserDTO.java deleted file mode 100644 index 73f44a74..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenUserDTO.java +++ /dev/null @@ -1,327 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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; - -/** - * OpenUserDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenUserDTO { - public static final String SERIALIZED_NAME_USERNAME = "username"; - @SerializedName(SERIALIZED_NAME_USERNAME) - private String username; - - public static final String SERIALIZED_NAME_USER_DISPLAY_NAME = "userDisplayName"; - @SerializedName(SERIALIZED_NAME_USER_DISPLAY_NAME) - private String userDisplayName; - - public static final String SERIALIZED_NAME_PASSWORD = "password"; - @SerializedName(SERIALIZED_NAME_PASSWORD) - private String password; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ENABLED = "enabled"; - @SerializedName(SERIALIZED_NAME_ENABLED) - private Integer enabled; - - public OpenUserDTO() { - } - - public OpenUserDTO username(String username) { - - this.username = username; - return this; - } - - /** - * 用户名 - * @return username - **/ - @javax.annotation.Nullable - public String getUsername() { - return username; - } - - - public void setUsername(String username) { - this.username = username; - } - - - public OpenUserDTO userDisplayName(String userDisplayName) { - - this.userDisplayName = userDisplayName; - return this; - } - - /** - * 用户显示名 - * @return userDisplayName - **/ - @javax.annotation.Nullable - public String getUserDisplayName() { - return userDisplayName; - } - - - public void setUserDisplayName(String userDisplayName) { - this.userDisplayName = userDisplayName; - } - - - public OpenUserDTO password(String password) { - - this.password = password; - return this; - } - - /** - * 用户密码 - * @return password - **/ - @javax.annotation.Nullable - public String getPassword() { - return password; - } - - - public void setPassword(String password) { - this.password = password; - } - - - public OpenUserDTO email(String email) { - - this.email = email; - return this; - } - - /** - * 用户邮箱 - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public OpenUserDTO enabled(Integer enabled) { - - this.enabled = enabled; - return this; - } - - /** - * 是否启用,1 表示启用,0 表示禁用 - * @return enabled - **/ - @javax.annotation.Nullable - public Integer getEnabled() { - return enabled; - } - - - public void setEnabled(Integer enabled) { - this.enabled = enabled; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenUserDTO openUserDTO = (OpenUserDTO) o; - return Objects.equals(this.username, openUserDTO.username) && - Objects.equals(this.userDisplayName, openUserDTO.userDisplayName) && - Objects.equals(this.password, openUserDTO.password) && - Objects.equals(this.email, openUserDTO.email) && - Objects.equals(this.enabled, openUserDTO.enabled); - } - - @Override - public int hashCode() { - return Objects.hash(username, userDisplayName, password, email, enabled); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenUserDTO {\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" userDisplayName: ").append(toIndentedString(userDisplayName)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).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("username"); - openapiFields.add("userDisplayName"); - openapiFields.add("password"); - openapiFields.add("email"); - openapiFields.add("enabled"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OpenUserDTO - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OpenUserDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenUserDTO is not found in the empty JSON string", OpenUserDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OpenUserDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenUserDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("username") != null && !jsonObj.get("username").isJsonNull()) && !jsonObj.get("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); - } - if ((jsonObj.get("userDisplayName") != null && !jsonObj.get("userDisplayName").isJsonNull()) && !jsonObj.get("userDisplayName").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userDisplayName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userDisplayName").toString())); - } - if ((jsonObj.get("password") != null && !jsonObj.get("password").isJsonNull()) && !jsonObj.get("password").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `password` to be a primitive type in the JSON string but got `%s`", jsonObj.get("password").toString())); - } - if ((jsonObj.get("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenUserDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenUserDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenUserDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenUserDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenUserDTO read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenUserDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenUserDTO - * @throws IOException if the JSON string is invalid with respect to OpenUserDTO - */ - public static OpenUserDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenUserDTO.class); - } - - /** - * Convert an instance of OpenUserDTO 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/OpenUserInfoDTO.java b/java-client/src/main/java/org/openapitools/client/model/OpenUserInfoDTO.java deleted file mode 100644 index ee297fc6..00000000 --- a/java-client/src/main/java/org/openapitools/client/model/OpenUserInfoDTO.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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; - -/** - * OpenUserInfoDTO - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class OpenUserInfoDTO { - public static final String SERIALIZED_NAME_USER_ID = "userId"; - @SerializedName(SERIALIZED_NAME_USER_ID) - private String userId; - - public static final String SERIALIZED_NAME_NAME = "name"; - @SerializedName(SERIALIZED_NAME_NAME) - private String name; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - private String email; - - public static final String SERIALIZED_NAME_ENABLED = "enabled"; - @SerializedName(SERIALIZED_NAME_ENABLED) - private Integer enabled; - - public OpenUserInfoDTO() { - } - - public OpenUserInfoDTO userId(String userId) { - - this.userId = userId; - return this; - } - - /** - * - * @return userId - **/ - @javax.annotation.Nullable - public String getUserId() { - return userId; - } - - - public void setUserId(String userId) { - this.userId = userId; - } - - - public OpenUserInfoDTO name(String name) { - - this.name = name; - return this; - } - - /** - * - * @return name - **/ - @javax.annotation.Nullable - public String getName() { - return name; - } - - - public void setName(String name) { - this.name = name; - } - - - public OpenUserInfoDTO email(String email) { - - this.email = email; - return this; - } - - /** - * - * @return email - **/ - @javax.annotation.Nullable - public String getEmail() { - return email; - } - - - public void setEmail(String email) { - this.email = email; - } - - - public OpenUserInfoDTO enabled(Integer enabled) { - - this.enabled = enabled; - return this; - } - - /** - * - * @return enabled - **/ - @javax.annotation.Nullable - public Integer getEnabled() { - return enabled; - } - - - public void setEnabled(Integer enabled) { - this.enabled = enabled; - } - - - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenUserInfoDTO openUserInfoDTO = (OpenUserInfoDTO) o; - return Objects.equals(this.userId, openUserInfoDTO.userId) && - Objects.equals(this.name, openUserInfoDTO.name) && - Objects.equals(this.email, openUserInfoDTO.email) && - Objects.equals(this.enabled, openUserInfoDTO.enabled); - } - - @Override - public int hashCode() { - return Objects.hash(userId, name, email, enabled); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenUserInfoDTO {\n"); - sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).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("userId"); - openapiFields.add("name"); - openapiFields.add("email"); - openapiFields.add("enabled"); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(); - } - - /** - * Validates the JSON Object and throws an exception if issues found - * - * @param jsonObj JSON Object - * @throws IOException if the JSON Object is invalid with respect to OpenUserInfoDTO - */ - public static void validateJsonObject(JsonObject jsonObj) throws IOException { - if (jsonObj == null) { - if (!OpenUserInfoDTO.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null - throw new IllegalArgumentException(String.format("The required field(s) %s in OpenUserInfoDTO is not found in the empty JSON string", OpenUserInfoDTO.openapiRequiredFields.toString())); - } - } - - Set> entries = jsonObj.entrySet(); - // check to see if the JSON string contains additional fields - for (Entry entry : entries) { - if (!OpenUserInfoDTO.openapiFields.contains(entry.getKey())) { - throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OpenUserInfoDTO` properties. JSON: %s", entry.getKey(), jsonObj.toString())); - } - } - if ((jsonObj.get("userId") != null && !jsonObj.get("userId").isJsonNull()) && !jsonObj.get("userId").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `userId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("userId").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("email") != null && !jsonObj.get("email").isJsonNull()) && !jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format("Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!OpenUserInfoDTO.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'OpenUserInfoDTO' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(OpenUserInfoDTO.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, OpenUserInfoDTO value) throws IOException { - JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); - elementAdapter.write(out, obj); - } - - @Override - public OpenUserInfoDTO read(JsonReader in) throws IOException { - JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject(); - validateJsonObject(jsonObj); - return thisAdapter.fromJsonTree(jsonObj); - } - - }.nullSafe(); - } - } - - /** - * Create an instance of OpenUserInfoDTO given an JSON string - * - * @param jsonString JSON string - * @return An instance of OpenUserInfoDTO - * @throws IOException if the JSON string is invalid with respect to OpenUserInfoDTO - */ - public static OpenUserInfoDTO fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, OpenUserInfoDTO.class); - } - - /** - * Convert an instance of OpenUserInfoDTO 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/AccessKeyManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/AccessKeyManagementApiTest.java deleted file mode 100644 index 3720a79f..00000000 --- a/java-client/src/test/java/org/openapitools/client/api/AccessKeyManagementApiTest.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.OpenAccessKeyDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for AccessKeyManagementApi - */ -@Disabled -public class AccessKeyManagementApiTest { - - private final AccessKeyManagementApi api = new AccessKeyManagementApi(); - - /** - * 创建AccessKey - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void createAccessKeyTest() throws ApiException { - String appId = null; - String env = null; - String operator = null; - OpenAccessKeyDTO response = api.createAccessKey(appId, env, operator); - // TODO: test validations - } - - /** - * 删除AccessKey - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteAccessKeyTest() throws ApiException { - String appId = null; - String env = null; - Long accessKeyId = null; - String operator = null; - api.deleteAccessKey(appId, env, accessKeyId, operator); - // TODO: test validations - } - - /** - * 禁用AccessKey - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void disableAccessKeyTest() throws ApiException { - String appId = null; - String env = null; - Long accessKeyId = null; - String operator = null; - api.disableAccessKey(appId, env, accessKeyId, operator); - // TODO: test validations - } - - /** - * 启用AccessKey - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void enableAccessKeyTest() throws ApiException { - String appId = null; - String env = null; - Long accessKeyId = null; - Integer mode = null; - String operator = null; - api.enableAccessKey(appId, env, accessKeyId, mode, operator); - // TODO: test validations - } - - /** - * 查找AccessKey - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void findAccessKeysTest() throws ApiException { - String appId = null; - String env = null; - List response = api.findAccessKeys(appId, env); - // TODO: test validations - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/api/AppManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/AppManagementApiTest.java deleted file mode 100644 index 25a71f35..00000000 --- a/java-client/src/test/java/org/openapitools/client/api/AppManagementApiTest.java +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.ExceptionResponse; -import org.openapitools.client.model.OpenAppDTO; -import org.openapitools.client.model.OpenCreateAppDTO; -import org.openapitools.client.model.OpenEnvClusterDTO; -import org.openapitools.client.model.OpenEnvClusterInfo; -import org.openapitools.client.model.OpenMissEnvDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for AppManagementApi - */ -@Disabled -public class AppManagementApiTest { - - private final AppManagementApi api = new AppManagementApi(); - - /** - * 创建应用 (original openapi) - * - * POST /openapi/v1/apps - * - * @throws ApiException if the Api call fails - */ - @Test - public void createAppTest() throws ApiException { - OpenCreateAppDTO openCreateAppDTO = null; - api.createApp(openCreateAppDTO); - // TODO: test validations - } - - /** - * 在指定环境创建应用(new added) - * - * POST /openapi/v1/apps/envs/{env} - * - * @throws ApiException if the Api call fails - */ - @Test - public void createAppInEnvTest() throws ApiException { - String env = null; - OpenAppDTO openAppDTO = null; - String operator = null; - api.createAppInEnv(env, openAppDTO, operator); - // TODO: test validations - } - - /** - * 删除应用(new added) - * - * DELETE /openapi/v1/apps/{appId} - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteAppTest() throws ApiException { - String appId = null; - String operator = null; - api.deleteApp(appId, operator); - // TODO: test validations - } - - /** - * 查找应用 (original openapi) - * - * POST /openapi/v1/apps - * - * @throws ApiException if the Api call fails - */ - @Test - public void findAppsTest() throws ApiException { - String appIds = null; - List response = api.findApps(appIds); - // TODO: test validations - } - - /** - * 获取当前Consumer授权的应用列表 (original openapi) - * - * GET /openapi/v1/apps/authorized - * - * @throws ApiException if the Api call fails - */ - @Test - 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 findMissEnvsTest() throws ApiException { - String appId = null; - List response = api.findMissEnvs(appId); - // TODO: test validations - } - - /** - * 获取单个应用信息(new added) - * - * GET /openapi/v1/apps/{appId} - * - * @throws ApiException if the Api call fails - */ - @Test - public void getAppTest() throws ApiException { - String appId = null; - OpenAppDTO response = api.getApp(appId); - // TODO: test validations - } - - /** - * 获取当前Consumer/User的应用列表(分页)(new added) - * - * GET /openapi/v1/apps/by-self - * - * @throws ApiException if the Api call fails - */ - @Test - public void getAppsBySelfTest() throws ApiException { - Integer page = null; - Integer size = null; - List response = api.getAppsBySelf(page, size); - // TODO: test validations - } - - /** - * 获取应用环境集群详情(new added) - * - * /openapi/v1/apps/{appId}/env-cluster-info - * - * @throws ApiException if the Api call fails - */ - @Test - public void getEnvClusterInfoTest() throws ApiException { - String appId = null; - List response = api.getEnvClusterInfo(appId); - // TODO: test validations - } - - /** - * 获取应用的环境集群信息 (original openapi) - * - * GET /openapi/v1/apps/{appId}/envclusters - * - * @throws ApiException if the Api call fails - */ - @Test - public void getEnvClustersTest() throws ApiException { - String appId = null; - List response = api.getEnvClusters(appId); - // TODO: test validations - } - - /** - * 更新应用(new added) - * - * PUT /openapi/v1/apps/{appId} - * - * @throws ApiException if the Api call fails - */ - @Test - public void updateAppTest() throws ApiException { - String appId = null; - OpenAppDTO openAppDTO = null; - String operator = null; - api.updateApp(appId, openAppDTO, operator); - // TODO: test validations - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/api/AppNamespaceManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/AppNamespaceManagementApiTest.java deleted file mode 100644 index 8955d752..00000000 --- a/java-client/src/test/java/org/openapitools/client/api/AppNamespaceManagementApiTest.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.ExceptionResponse; -import org.openapitools.client.model.OpenAppNamespaceDTO; -import org.openapitools.client.model.OpenNamespaceDTO; -import org.openapitools.client.model.OpenNamespaceUsageDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for AppNamespaceManagementApi - */ -@Disabled -public class AppNamespaceManagementApiTest { - - private final AppNamespaceManagementApi api = new AppNamespaceManagementApi(); - - /** - * 创建AppNamespace (original openapi) - * - * POST /openapi/v1/apps/{appId}/appnamespaces - * - * @throws ApiException if the Api call fails - */ - @Test - public void createAppNamespaceTest() throws ApiException { - String appId = null; - OpenAppNamespaceDTO openAppNamespaceDTO = null; - String operator = null; - OpenAppNamespaceDTO response = api.createAppNamespace(appId, openAppNamespaceDTO, operator); - // TODO: test validations - } - - /** - * 删除AppNamespace (new added) - * - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteAppNamespaceTest() throws ApiException { - String appId = null; - String namespaceName = null; - String operator = null; - api.deleteAppNamespace(appId, namespaceName, operator); - // TODO: test validations - } - - /** - * 获取指定的AppNamespace (new added) - * - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * - * @throws ApiException if the Api call fails - */ - @Test - public void findAppNamespaceTest() throws ApiException { - String appId = null; - String namespaceName = null; - Boolean extendInfo = null; - OpenAppNamespaceDTO response = api.findAppNamespace(appId, namespaceName, extendInfo); - // TODO: test validations - } - - /** - * 查询appnamespace使用情况(new added) - * - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage - * - * @throws ApiException if the Api call fails - */ - @Test - public void findAppNamespaceUsageTest() throws ApiException { - String appId = null; - String namespaceName = null; - List response = api.findAppNamespaceUsage(appId, namespaceName); - // TODO: test validations - } - - /** - * 获取所有公共AppNamespace (new added) - * - * GET /openapi/v1/appnamespaces/public - * - * @throws ApiException if the Api call fails - */ - @Test - public void getAppNamespacesTest() throws ApiException { - List response = api.getAppNamespaces(); - // TODO: test validations - } - - /** - * 获取指定应用的AppNamespace (new added) - * - * GET /openapi/v1/apps/{appId}/appnamespaces - * - * @throws ApiException if the Api call fails - */ - @Test - public void getAppNamespacesByAppIdTest() throws ApiException { - String appId = null; - List response = api.getAppNamespacesByAppId(appId); - // TODO: test validations - } - - /** - * 获取公共AppNamespace的所有实例 (new added) - * - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * - * @throws ApiException if the Api call fails - */ - @Test - public void getPublicAppNamespaceInstancesTest() throws ApiException { - String env = null; - String publicNamespaceName = null; - Integer page = null; - Integer size = null; - List response = api.getPublicAppNamespaceInstances(env, publicNamespaceName, page, size); - // TODO: test validations - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/api/ClusterManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/ClusterManagementApiTest.java deleted file mode 100644 index d9ff5e00..00000000 --- a/java-client/src/test/java/org/openapitools/client/api/ClusterManagementApiTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.ExceptionResponse; -import org.openapitools.client.model.OpenClusterDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for ClusterManagementApi - */ -@Disabled -public class ClusterManagementApiTest { - - private final ClusterManagementApi api = new ClusterManagementApi(); - - /** - * 创建集群 (original openapi) - * - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters - * - * @throws ApiException if the Api call fails - */ - @Test - public void createClusterTest() throws ApiException { - String appId = null; - String env = null; - OpenClusterDTO openClusterDTO = null; - 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 deleteClusterTest() throws ApiException { - String env = null; - String appId = null; - String clusterName = null; - String operator = null; - api.deleteCluster(env, appId, clusterName, operator); - // TODO: test validations - } - - /** - * 获取指定集群信息 (original openapi) - * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - * - * @throws ApiException if the Api call fails - */ - @Test - public void getClusterTest() throws ApiException { - String appId = null; - String clusterName = null; - String env = null; - OpenClusterDTO response = api.getCluster(appId, clusterName, env); - // TODO: test validations - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/api/EnvironmentManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/EnvironmentManagementApiTest.java deleted file mode 100644 index 23606892..00000000 --- a/java-client/src/test/java/org/openapitools/client/api/EnvironmentManagementApiTest.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for EnvironmentManagementApi - */ -@Disabled -public class EnvironmentManagementApiTest { - - private final EnvironmentManagementApi api = new EnvironmentManagementApi(); - - /** - * 获取所有环境 - * - * GET /openapi/v1/envs - * - * @throws ApiException if the Api call fails - */ - @Test - public void getEnvsTest() throws ApiException { - List response = api.getEnvs(); - // TODO: test validations - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/api/InstanceManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/InstanceManagementApiTest.java deleted file mode 100644 index 9df8c1be..00000000 --- a/java-client/src/test/java/org/openapitools/client/api/InstanceManagementApiTest.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.OpenInstanceDTO; -import org.openapitools.client.model.OpenInstancePageDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for InstanceManagementApi - */ -@Disabled -public class InstanceManagementApiTest { - - private final InstanceManagementApi api = new InstanceManagementApi(); - - /** - * 根据namespaceName查询实例(new added) - * - * @throws ApiException if the Api call fails - */ - @Test - public void getByNamespaceTest() throws ApiException { - String env = null; - String appId = null; - String clusterName = null; - String namespaceName = null; - Integer page = null; - Integer size = null; - String instanceAppId = null; - OpenInstancePageDTO response = api.getByNamespace(env, appId, clusterName, namespaceName, page, size, instanceAppId); - // TODO: test validations - } - - /** - * 根据发布版本查询实例(支持分页) (new added) - * - * GET /openapi/v1/envs/{env}/instances/by-release - * - * @throws ApiException if the Api call fails - */ - @Test - public void getByReleaseTest() throws ApiException { - String env = null; - Long releaseId = null; - Integer page = null; - Integer size = null; - OpenInstancePageDTO response = api.getByRelease(env, releaseId, page, size); - // TODO: test validations - } - - /** - * 查询不在指定发布版本中的实例 (new added) - * - * @throws ApiException if the Api call fails - */ - @Test - public void getByReleasesAndNamespaceNotInTest() throws ApiException { - String env = null; - String appId = null; - String clusterName = null; - String namespaceName = null; - String releaseIds = null; - List response = api.getByReleasesAndNamespaceNotIn(env, appId, clusterName, namespaceName, releaseIds); - // TODO: test validations - } - - /** - * 获取命名空间下的实例数量 (original openapi) - * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - * - * @throws ApiException if the Api call fails - */ - @Test - public void getInstanceCountByNamespaceTest() throws ApiException { - String env = null; - 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/api/ItemManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/ItemManagementApiTest.java deleted file mode 100644 index cf83fca0..00000000 --- a/java-client/src/test/java/org/openapitools/client/api/ItemManagementApiTest.java +++ /dev/null @@ -1,302 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.ExceptionResponse; -import org.openapitools.client.model.OpenItemDTO; -import org.openapitools.client.model.OpenItemDiffDTO; -import org.openapitools.client.model.OpenItemPageDTO; -import org.openapitools.client.model.OpenNamespaceSyncDTO; -import org.openapitools.client.model.OpenNamespaceTextModel; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for ItemManagementApi - */ -@Disabled -public class ItemManagementApiTest { - - private final ItemManagementApi api = new ItemManagementApi(); - - /** - * 通过文本批量修改配置项 (new added) - * - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: - * - * @throws ApiException if the Api call fails - */ - @Test - public void batchUpdateItemsByTextTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - OpenNamespaceTextModel openNamespaceTextModel = null; - String operator = null; - api.batchUpdateItemsByText(appId, env, clusterName, namespaceName, openNamespaceTextModel, operator); - // TODO: test validations - } - - /** - * 对比命名空间配置差异 (new added) - * - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff - * - * @throws ApiException if the Api call fails - */ - @Test - public void compareItemsTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - OpenNamespaceSyncDTO openNamespaceSyncDTO = null; - List response = api.compareItems(appId, env, clusterName, namespaceName, openNamespaceSyncDTO); - // TODO: test validations - } - - /** - * 创建新的配置项 (original openapi) - * - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - * - * @throws ApiException if the Api call fails - */ - @Test - public void createItemTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - OpenItemDTO openItemDTO = null; - String operator = null; - OpenItemDTO response = api.createItem(appId, env, clusterName, namespaceName, openItemDTO, operator); - // TODO: test validations - } - - /** - * 删除配置项 (original openapi) - * - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteItemTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String key = null; - String operator = null; - api.deleteItem(appId, env, clusterName, namespaceName, key, operator); - // TODO: test validations - } - - /** - * 通过编码的key删除配置项 (original openapi) - * - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteItemByEncodedKeyTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String key = null; - String operator = null; - api.deleteItemByEncodedKey(appId, env, clusterName, namespaceName, key, operator); - // TODO: test validations - } - - /** - * 获取分支下的配置项 (new added) - * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: - * - * @throws ApiException if the Api call fails - */ - @Test - public void findBranchItemsTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String branchName = null; - List response = api.findBranchItems(appId, env, clusterName, namespaceName, branchName); - // TODO: test validations - } - - /** - * 获取命名空间下的配置项列表 (original openapi) - * - * 获取指定命名空间的配置项列表,支持分页 - * - * @throws ApiException if the Api call fails - */ - @Test - public void findItemsByNamespaceTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - Integer page = null; - Integer size = null; - OpenItemPageDTO response = api.findItemsByNamespace(appId, env, clusterName, namespaceName, page, size); - // TODO: test validations - } - - /** - * 获取单个配置项 (original openapi) - * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * - * @throws ApiException if the Api call fails - */ - @Test - public void getItemTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String key = null; - OpenItemDTO response = api.getItem(appId, env, clusterName, namespaceName, key); - // TODO: test validations - } - - /** - * 通过查询参数获取配置项(支持编码的key) (original openapi) - * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * - * @throws ApiException if the Api call fails - */ - @Test - public void getItemByEncodedKeyTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String key = null; - OpenItemDTO response = api.getItemByEncodedKey(appId, env, clusterName, namespaceName, key); - // TODO: test validations - } - - /** - * 撤销配置项更改 (new added) - * - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation - * - * @throws ApiException if the Api call fails - */ - @Test - public void revertItemsTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String operator = null; - api.revertItems(appId, env, clusterName, namespaceName, operator); - // TODO: test validations - } - - /** - * 同步配置项到多个命名空间 (new added) - * - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: - * - * @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; - OpenNamespaceSyncDTO openNamespaceSyncDTO = null; - String operator = null; - api.syncItems(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, operator); - // TODO: test validations - } - - /** - * 验证配置文本语法 (new added) - * - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation - * - * @throws ApiException if the Api call fails - */ - @Test - public void syntaxCheckTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - OpenNamespaceTextModel openNamespaceTextModel = null; - api.syntaxCheck(appId, env, clusterName, namespaceName, openNamespaceTextModel); - // TODO: test validations - } - - /** - * 更新配置项 (original openapi) - * - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * - * @throws ApiException if the Api call fails - */ - @Test - public void updateItemTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String key = null; - Boolean createIfNotExists = null; - OpenItemDTO openItemDTO = null; - String operator = null; - api.updateItem(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator); - // TODO: test validations - } - - /** - * 通过编码的key更新配置项 (original openapi) - * - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * - * @throws ApiException if the Api call fails - */ - @Test - public void updateItemByEncodedKeyTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String key = null; - Boolean createIfNotExists = null; - OpenItemDTO openItemDTO = null; - String operator = null; - api.updateItemByEncodedKey(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator); - // TODO: test validations - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/api/NamespaceBranchManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/NamespaceBranchManagementApiTest.java deleted file mode 100644 index b596bd20..00000000 --- a/java-client/src/test/java/org/openapitools/client/api/NamespaceBranchManagementApiTest.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.ExceptionResponse; -import org.openapitools.client.model.NamespaceReleaseDTO; -import org.openapitools.client.model.OpenGrayReleaseRuleDTO; -import org.openapitools.client.model.OpenNamespaceDTO; -import org.openapitools.client.model.OpenReleaseDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for NamespaceBranchManagementApi - */ -@Disabled -public class NamespaceBranchManagementApiTest { - - private final NamespaceBranchManagementApi api = new NamespaceBranchManagementApi(); - - /** - * 创建命名空间分支 (original openapi) - * - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - * - * @throws ApiException if the Api call fails - */ - @Test - public void createBranchTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String operator = null; - 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 deleteBranchTest() throws ApiException { - String env = null; - String appId = null; - String clusterName = null; - String namespaceName = null; - String branchName = null; - String operator = null; - api.deleteBranch(env, appId, clusterName, namespaceName, branchName, operator); - // TODO: test validations - } - - /** - * 获取命名空间分支信息 (original openapi) - * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - * - * @throws ApiException if the Api call fails - */ - @Test - public void findBranchTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - Boolean extendInfo = null; - OpenNamespaceDTO response = api.findBranch(appId, env, clusterName, namespaceName, extendInfo); - // 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 getBranchGrayRulesTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String branchName = null; - OpenGrayReleaseRuleDTO response = api.getBranchGrayRules(appId, env, clusterName, namespaceName, branchName); - // TODO: test validations - } - - /** - * 合并分支 (original openapi) - * - * 合并灰度分支并可选择删除分支 - * - * @throws ApiException if the Api call fails - */ - @Test - public void mergeTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String branchName = null; - Boolean deleteBranch = null; - NamespaceReleaseDTO namespaceReleaseDTO = null; - OpenReleaseDTO response = api.merge(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); - // TODO: test validations - } - - /** - * 合并分支到主分支 (new added) - * - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * - * @throws ApiException if the Api call fails - */ - @Test - public void mergeBranchTest() throws ApiException { - String env = null; - String appId = null; - String clusterName = null; - String namespaceName = null; - String branchName = null; - Boolean deleteBranch = null; - NamespaceReleaseDTO namespaceReleaseDTO = null; - String operator = null; - OpenReleaseDTO response = api.mergeBranch(env, appId, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, operator); - // 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 updateBranchRulesTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String branchName = null; - OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO = null; - String operator = null; - api.updateBranchRules(appId, env, clusterName, namespaceName, branchName, openGrayReleaseRuleDTO, operator); - // TODO: test validations - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/api/NamespaceLockManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/NamespaceLockManagementApiTest.java deleted file mode 100644 index c1be81be..00000000 --- a/java-client/src/test/java/org/openapitools/client/api/NamespaceLockManagementApiTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.OpenNamespaceLockDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for NamespaceLockManagementApi - */ -@Disabled -public class NamespaceLockManagementApiTest { - - private final NamespaceLockManagementApi api = new NamespaceLockManagementApi(); - - /** - * 获取Namespace的锁状态 (original openapi) - * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - * - * @throws ApiException if the Api call fails - */ - @Test - public void getNamespaceLockTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - OpenNamespaceLockDTO response = api.getNamespaceLock(appId, env, clusterName, namespaceName); - // TODO: test validations - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/api/NamespaceManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/NamespaceManagementApiTest.java deleted file mode 100644 index 348403e1..00000000 --- a/java-client/src/test/java/org/openapitools/client/api/NamespaceManagementApiTest.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.OpenCreateNamespaceDTO; -import org.openapitools.client.model.OpenNamespaceDTO; -import org.openapitools.client.model.OpenNamespaceUsageDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for NamespaceManagementApi - */ -@Disabled -public class NamespaceManagementApiTest { - - private final NamespaceManagementApi api = new NamespaceManagementApi(); - - /** - * 创建缺失的Namespace (new added) - * - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces - * - * @throws ApiException if the Api call fails - */ - @Test - public void createMissingNamespacesTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String operator = null; - api.createMissingNamespaces(appId, env, clusterName, operator); - // TODO: test validations - } - - /** - * 创建Namespace (new added) - * - * POST /openapi/v1/apps/{appId}/namespaces - * - * @throws ApiException if the Api call fails - */ - @Test - public void createNamespacesTest() throws ApiException { - List openCreateNamespaceDTO = null; - String operator = null; - api.createNamespaces(openCreateNamespaceDTO, operator); - // TODO: test validations - } - - /** - * 删除指定的Namespace (new added) - * - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteNamespaceTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String operator = null; - api.deleteNamespace(appId, env, clusterName, namespaceName, operator); - // TODO: test validations - } - - /** - * 查找缺失的Namespace (new added) - * - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces - * - * @throws ApiException if the Api call fails - */ - @Test - public void findMissingNamespacesTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - List response = api.findMissingNamespaces(appId, env, clusterName); - // TODO: test validations - } - - /** - * 获取指定的Namespace (original openapi) - * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - * - * @throws ApiException if the Api call fails - */ - @Test - public void findNamespaceTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - Boolean fillItemDetail = null; - Boolean extendInfo = null; - OpenNamespaceDTO response = api.findNamespace(appId, env, clusterName, namespaceName, fillItemDetail, extendInfo); - // TODO: test validations - } - - /** - * 查询namespace使用情况(new added) - * - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage - * - * @throws ApiException if the Api call fails - */ - @Test - public void findNamespaceUsageTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - List response = api.findNamespaceUsage(appId, env, clusterName, namespaceName); - // TODO: test validations - } - - /** - * 获取指定集群下的所有Namespace (original openapi) - * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * - * @throws ApiException if the Api call fails - */ - @Test - public void findNamespacesTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - Boolean fillItemDetail = null; - Boolean extendInfo = null; - List response = api.findNamespaces(appId, env, clusterName, fillItemDetail, extendInfo); - // TODO: test validations - } - - /** - * 查询关联Namespace对应的公共Namespace详情 (new added) - * - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace - * - * @throws ApiException if the Api call fails - */ - @Test - public void findPublicNamespaceForAssociatedNamespaceTest() throws ApiException { - String env = null; - String appId = null; - String clusterName = null; - String namespaceName = null; - Boolean extendInfo = null; - OpenNamespaceDTO response = api.findPublicNamespaceForAssociatedNamespace(env, appId, clusterName, namespaceName, extendInfo); - // TODO: test validations - } - - /** - * 获取应用下所有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 - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/api/OrganizationManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/OrganizationManagementApiTest.java deleted file mode 100644 index 3621c2b7..00000000 --- a/java-client/src/test/java/org/openapitools/client/api/OrganizationManagementApiTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.ExceptionResponse; -import org.openapitools.client.model.OpenOrganizationDto; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for OrganizationManagementApi - */ -@Disabled -public class OrganizationManagementApiTest { - - private final OrganizationManagementApi api = new OrganizationManagementApi(); - - /** - * 获取所有组织信息 (original openapi) - * - * GET /openapi/v1/organizations - * - * @throws ApiException if the Api call fails - */ - @Test - public void getOrganizationTest() throws ApiException { - List response = api.getOrganization(); - // TODO: test validations - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/api/PermissionManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/PermissionManagementApiTest.java deleted file mode 100644 index 4cb1b94f..00000000 --- a/java-client/src/test/java/org/openapitools/client/api/PermissionManagementApiTest.java +++ /dev/null @@ -1,463 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.OpenAppRoleUserDTO; -import org.openapitools.client.model.OpenClusterNamespaceRoleUserDTO; -import org.openapitools.client.model.OpenEnvNamespaceRoleUserDTO; -import org.openapitools.client.model.OpenNamespaceRoleUserDTO; -import org.openapitools.client.model.OpenPermissionConditionDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for PermissionManagementApi - */ -@Disabled -public class PermissionManagementApiTest { - - private final PermissionManagementApi api = new PermissionManagementApi(); - - /** - * 分配建应用角色 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void addCreateApplicationRoleToUsersTest() throws ApiException { - String operator = null; - List requestBody = null; - api.addCreateApplicationRoleToUsers(operator, requestBody); - // TODO: test validations - } - - /** - * 分配AppMaster (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void addManageAppMasterRoleToUserTest() throws ApiException { - String appId = null; - String userId = null; - String operator = null; - api.addManageAppMasterRoleToUser(appId, userId, operator); - // TODO: test validations - } - - /** - * 分配应用角色 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void assignAppRoleToUserTest() throws ApiException { - String appId = null; - String roleType = null; - String userId = null; - String operator = null; - String body = null; - api.assignAppRoleToUser(appId, roleType, userId, operator, body); - // TODO: test validations - } - - /** - * 分配集群Namespace角色 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void assignClusterNamespaceRoleToUserTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String roleType = null; - String userId = null; - String operator = null; - api.assignClusterNamespaceRoleToUser(appId, env, clusterName, roleType, userId, operator); - // TODO: test validations - } - - /** - * 分配环境Namespace角色 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void assignNamespaceEnvRoleToUserTest() throws ApiException { - String appId = null; - String env = null; - String namespaceName = null; - String roleType = null; - String userId = null; - String operator = null; - api.assignNamespaceEnvRoleToUser(appId, env, namespaceName, roleType, userId, operator); - // TODO: test validations - } - - /** - * 分配Namespace角色 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void assignNamespaceRoleToUserTest() throws ApiException { - String appId = null; - String namespaceName = null; - String roleType = null; - String userId = null; - String operator = null; - api.assignNamespaceRoleToUser(appId, namespaceName, roleType, userId, operator); - // TODO: test validations - } - - /** - * 移除建应用角色 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteCreateApplicationRoleFromUserTest() throws ApiException { - String userId = null; - String operator = null; - api.deleteCreateApplicationRoleFromUser(userId, operator); - // TODO: test validations - } - - /** - * 获取应用角色用户 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void getAppRolesTest() throws ApiException { - String appId = null; - OpenAppRoleUserDTO response = api.getAppRoles(appId); - // TODO: test validations - } - - /** - * 获取集群Namespace用户 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void getClusterNamespaceRolesTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - OpenClusterNamespaceRoleUserDTO response = api.getClusterNamespaceRoles(appId, env, clusterName); - // TODO: test validations - } - - /** - * 获取建应用用户 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void getCreateApplicationRoleUsersTest() throws ApiException { - List response = api.getCreateApplicationRoleUsers(); - // TODO: test validations - } - - /** - * 获取环境Namespace用户 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void getNamespaceEnvRoleUsersTest() throws ApiException { - String appId = null; - String env = null; - String namespaceName = null; - OpenEnvNamespaceRoleUserDTO response = api.getNamespaceEnvRoleUsers(appId, env, namespaceName); - // TODO: test validations - } - - /** - * 获取Namespace用户 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void getNamespaceRolesTest() throws ApiException { - String appId = null; - String namespaceName = null; - OpenNamespaceRoleUserDTO response = api.getNamespaceRoles(appId, namespaceName); - // TODO: test validations - } - - /** - * 校验应用权限 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void hasAppPermissionTest() throws ApiException { - String appId = null; - String permissionType = null; - String userId = null; - OpenPermissionConditionDTO response = api.hasAppPermission(appId, permissionType, userId); - // TODO: test validations - } - - /** - * 校验集群Namespace权限 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void hasClusterNamespacePermissionTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String permissionType = null; - String userId = null; - OpenPermissionConditionDTO response = api.hasClusterNamespacePermission(appId, env, clusterName, permissionType, userId); - // TODO: test validations - } - - /** - * 校验建应用权限 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void hasCreateApplicationPermissionTest() throws ApiException { - String userId = null; - Map response = api.hasCreateApplicationPermission(userId); - // TODO: test validations - } - - /** - * 校验环境Namespace权限 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void hasEnvNamespacePermissionTest() throws ApiException { - String appId = null; - String env = null; - String namespaceName = null; - String permissionType = null; - String userId = null; - OpenPermissionConditionDTO response = api.hasEnvNamespacePermission(appId, env, namespaceName, permissionType, userId); - // TODO: test validations - } - - /** - * 校验Namespace权限 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void hasNamespacePermissionTest() throws ApiException { - String appId = null; - String namespaceName = null; - String permissionType = null; - String userId = null; - OpenPermissionConditionDTO response = api.hasNamespacePermission(appId, namespaceName, permissionType, userId); - // TODO: test validations - } - - /** - * 校验Root权限 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void hasRootPermissionTest() throws ApiException { - String userId = null; - OpenPermissionConditionDTO response = api.hasRootPermission(userId); - // TODO: test validations - } - - /** - * 初始化应用权限 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void initAppPermissionTest() throws ApiException { - String appId = null; - String namespaceName = null; - String operator = null; - api.initAppPermission(appId, namespaceName, operator); - // TODO: test validations - } - - /** - * 初始化集群Namespace权限 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void initClusterNamespacePermissionTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String operator = null; - api.initClusterNamespacePermission(appId, env, clusterName, operator); - // TODO: test validations - } - - /** - * 校验AppMaster开关 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void isManageAppMasterPermissionEnabledTest() throws ApiException { - Map response = api.isManageAppMasterPermissionEnabled(); - // TODO: test validations - } - - /** - * 移除应用角色 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void removeAppRoleFromUserTest() throws ApiException { - String appId = null; - String roleType = null; - String userId = null; - String operator = null; - api.removeAppRoleFromUser(appId, roleType, userId, operator); - // TODO: test validations - } - - /** - * 移除集群Namespace角色 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void removeClusterNamespaceRoleFromUserTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String roleType = null; - String userId = null; - String operator = null; - api.removeClusterNamespaceRoleFromUser(appId, env, clusterName, roleType, userId, operator); - // TODO: test validations - } - - /** - * 移除AppMaster (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void removeManageAppMasterRoleFromUserTest() throws ApiException { - String appId = null; - String userId = null; - String operator = null; - api.removeManageAppMasterRoleFromUser(appId, userId, operator); - // TODO: test validations - } - - /** - * 移除环境Namespace角色 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void removeNamespaceEnvRoleFromUserTest() throws ApiException { - String appId = null; - String env = null; - String namespaceName = null; - String roleType = null; - String userId = null; - String operator = null; - api.removeNamespaceEnvRoleFromUser(appId, env, namespaceName, roleType, userId, operator); - // TODO: test validations - } - - /** - * 移除Namespace角色 (new added) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void removeNamespaceRoleFromUserTest() throws ApiException { - String appId = null; - String namespaceName = null; - String roleType = null; - String userId = null; - String operator = null; - api.removeNamespaceRoleFromUser(appId, namespaceName, roleType, userId, operator); - // TODO: test validations - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/api/PortalManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/PortalManagementApiTest.java deleted file mode 100644 index 1be6fc61..00000000 --- a/java-client/src/test/java/org/openapitools/client/api/PortalManagementApiTest.java +++ /dev/null @@ -1,588 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import java.io.File; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for PortalManagementApi - */ -@Disabled -public class PortalManagementApiTest { - - private final PortalManagementApi api = new PortalManagementApi(); - - /** - * 添加收藏(new added) - * - * POST /openapi/v1/favorites - * - * @throws ApiException if the Api call fails - */ - @Test - public void addFavoriteTest() throws ApiException { - Object body = null; - Object response = api.addFavorite(body); - // TODO: test validations - } - - /** - * 给消费者授权(new added) - * - * POST /openapi/v1/consumers/{token}/assign-role - * - * @throws ApiException if the Api call fails - */ - @Test - public void assignRoleToConsumerTest() throws ApiException { - String token = null; - String type = null; - Object body = null; - String envs = null; - List response = api.assignRoleToConsumer(token, type, body, envs); - // TODO: test validations - } - - /** - * 检查应用配置导出权限(new added) - * - * HEAD /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export - * - * @throws ApiException if the Api call fails - */ - @Test - public void checkExportAppConfigTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - api.checkExportAppConfig(appId, env, clusterName); - // TODO: test validations - } - - /** - * 检查系统实例健康状态(new added) - * - * GET /openapi/v1/system-info/health - * - * @throws ApiException if the Api call fails - */ - @Test - public void checkSystemHealthTest() throws ApiException { - String instanceId = null; - Object response = api.checkSystemHealth(instanceId); - // TODO: test validations - } - - /** - * 创建开放平台消费者(new added) - * - * POST /openapi/v1/consumers - * - * @throws ApiException if the Api call fails - */ - @Test - public void createConsumerTest() throws ApiException { - Object body = null; - String expires = null; - Object response = api.createConsumer(body, expires); - // TODO: test validations - } - - /** - * 创建或更新Config DB配置(new added) - * - * POST /openapi/v1/server/envs/{env}/config-db/config - * - * @throws ApiException if the Api call fails - */ - @Test - public void createOrUpdateConfigDBConfigTest() throws ApiException { - String env = null; - Object body = null; - Object response = api.createOrUpdateConfigDBConfig(env, body); - // TODO: test validations - } - - /** - * 创建或更新Portal DB配置(new added) - * - * POST /openapi/v1/server/portal-db/config - * - * @throws ApiException if the Api call fails - */ - @Test - public void createOrUpdatePortalDBConfigTest() throws ApiException { - Object body = null; - Object response = api.createOrUpdatePortalDBConfig(body); - // TODO: test validations - } - - /** - * 删除Config DB配置(new added) - * - * DELETE /openapi/v1/server/envs/{env}/config-db/config - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteConfigDBConfigTest() throws ApiException { - String env = null; - String key = null; - String cluster = null; - api.deleteConfigDBConfig(env, key, cluster); - // TODO: test validations - } - - /** - * 按应用ID删除消费者(new added) - * - * DELETE /openapi/v1/consumers/by-appId - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteConsumerTest() throws ApiException { - String appId = null; - api.deleteConsumer(appId); - // TODO: test validations - } - - /** - * 删除收藏(new added) - * - * DELETE /openapi/v1/favorites/{favoriteId} - * - * @throws ApiException if the Api call fails - */ - @Test - public void deleteFavoriteTest() throws ApiException { - Long favoriteId = null; - api.deleteFavorite(favoriteId); - // TODO: test validations - } - - /** - * 删除Portal DB配置(new added) - * - * DELETE /openapi/v1/server/portal-db/config - * - * @throws ApiException if the Api call fails - */ - @Test - public void deletePortalDBConfigTest() throws ApiException { - String key = null; - api.deletePortalDBConfig(key); - // TODO: test validations - } - - /** - * 导出所有配置(new added) - * - * GET /openapi/v1/configs/export - * - * @throws ApiException if the Api call fails - */ - @Test - public void exportAllConfigsTest() throws ApiException { - String envs = null; - File response = api.exportAllConfigs(envs); - // TODO: test validations - } - - /** - * 导出应用配置(new added) - * - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export - * - * @throws ApiException if the Api call fails - */ - @Test - public void exportAppConfigTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - File response = api.exportAppConfig(appId, env, clusterName); - // TODO: test validations - } - - /** - * 导出命名空间配置项(new added) - * - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export - * - * @throws ApiException if the Api call fails - */ - @Test - public void exportNamespaceItemsTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - File response = api.exportNamespaceItems(appId, env, clusterName, namespaceName); - // TODO: test validations - } - - /** - * 查询指定环境全部Config DB配置(new added) - * - * GET /openapi/v1/server/envs/{env}/config-db/config/find-all-config - * - * @throws ApiException if the Api call fails - */ - @Test - public void findAllConfigDBConfigTest() throws ApiException { - String env = null; - List response = api.findAllConfigDBConfig(env); - // TODO: test validations - } - - /** - * 查询全部Portal DB配置(new added) - * - * GET /openapi/v1/server/portal-db/config/find-all-config - * - * @throws ApiException if the Api call fails - */ - @Test - public void findAllPortalDBConfigTest() throws ApiException { - List response = api.findAllPortalDBConfig(); - // TODO: test validations - } - - /** - * 查询审计数据影响(new added) - * - * GET /openapi/v1/apollo/audit/logs/dataInfluences/field - * - * @throws ApiException if the Api call fails - */ - @Test - public void findAuditDataInfluencesByFieldTest() throws ApiException { - String entityName = null; - String entityId = null; - String fieldName = null; - Integer page = null; - Integer size = null; - List response = api.findAuditDataInfluencesByField(entityName, entityId, fieldName, page, size); - // TODO: test validations - } - - /** - * 查询审计日志(new added) - * - * GET /openapi/v1/apollo/audit/logs - * - * @throws ApiException if the Api call fails - */ - @Test - public void findAuditLogsTest() throws ApiException { - Integer page = null; - Integer size = null; - List response = api.findAuditLogs(page, size); - // TODO: test validations - } - - /** - * 按操作名查询审计日志(new added) - * - * GET /openapi/v1/apollo/audit/logs/opName - * - * @throws ApiException if the Api call fails - */ - @Test - public void findAuditLogsByOpNameTest() throws ApiException { - String opName = null; - Integer page = null; - Integer size = null; - String startDate = null; - String endDate = null; - List response = api.findAuditLogsByOpName(opName, page, size, startDate, endDate); - // TODO: test validations - } - - /** - * 查询审计链路详情(new added) - * - * GET /openapi/v1/apollo/audit/trace - * - * @throws ApiException if the Api call fails - */ - @Test - public void findAuditTraceDetailsTest() throws ApiException { - String traceId = null; - List response = api.findAuditTraceDetails(traceId); - // TODO: test validations - } - - /** - * 查询命名空间提交记录(new added) - * - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits - * - * @throws ApiException if the Api call fails - */ - @Test - public void findCommitsTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String key = null; - Integer page = null; - Integer size = null; - List response = api.findCommits(appId, env, clusterName, namespaceName, key, page, size); - // TODO: test validations - } - - /** - * 查询收藏(new added) - * - * GET /openapi/v1/favorites - * - * @throws ApiException if the Api call fails - */ - @Test - public void findFavoritesTest() throws ApiException { - String userId = null; - String appId = null; - Integer page = null; - Integer size = null; - List response = api.findFavorites(userId, appId, page, size); - // TODO: test validations - } - - /** - * 查询命名空间发布历史(new added) - * - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories - * - * @throws ApiException if the Api call fails - */ - @Test - public void findReleaseHistoriesByNamespaceTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - Integer page = null; - Integer size = null; - List response = api.findReleaseHistoriesByNamespace(appId, env, clusterName, namespaceName, page, size); - // TODO: test validations - } - - /** - * 获取审计配置(new added) - * - * GET /openapi/v1/apollo/audit/properties - * - * @throws ApiException if the Api call fails - */ - @Test - public void getAuditPropertiesTest() throws ApiException { - Object response = api.getAuditProperties(); - // TODO: test validations - } - - /** - * 查询开放平台消费者列表(new added) - * - * GET /openapi/v1/consumers - * - * @throws ApiException if the Api call fails - */ - @Test - public void getConsumerListTest() throws ApiException { - Integer page = null; - Integer size = null; - List response = api.getConsumerList(page, size); - // TODO: test validations - } - - /** - * 按应用ID查询消费者Token(new added) - * - * GET /openapi/v1/consumer-tokens/by-appId - * - * @throws ApiException if the Api call fails - */ - @Test - public void getConsumerTokenByAppIdTest() throws ApiException { - String appId = null; - Object response = api.getConsumerTokenByAppId(appId); - // TODO: test validations - } - - /** - * 获取Portal页面配置(new added) - * - * GET /openapi/v1/page-settings - * - * @throws ApiException if the Api call fails - */ - @Test - public void getPageSettingsTest() throws ApiException { - Object response = api.getPageSettings(); - // TODO: test validations - } - - /** - * 获取系统信息(new added) - * - * GET /openapi/v1/system-info - * - * @throws ApiException if the Api call fails - */ - @Test - public void getSystemInfoTest() throws ApiException { - Object response = api.getSystemInfo(); - // TODO: test validations - } - - /** - * 导入所有配置(new added) - * - * POST /openapi/v1/configs/import - * - * @throws ApiException if the Api call fails - */ - @Test - public void importAllConfigsTest() throws ApiException { - String envs = null; - String conflictAction = null; - File _file = null; - api.importAllConfigs(envs, conflictAction, _file); - // TODO: test validations - } - - /** - * 导入应用配置(new added) - * - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import - * - * @throws ApiException if the Api call fails - */ - @Test - public void importAppConfigTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String conflictAction = null; - File _file = null; - api.importAppConfig(appId, env, clusterName, conflictAction, _file); - // TODO: test validations - } - - /** - * 导入配置兼容入口(new added) - * - * POST /openapi/v1/import - * - * @throws ApiException if the Api call fails - */ - @Test - public void importConfigTest() throws ApiException { - String envs = null; - String conflictAction = null; - File _file = null; - api.importConfig(envs, conflictAction, _file); - // TODO: test validations - } - - /** - * 导入命名空间配置项(new added) - * - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import - * - * @throws ApiException if the Api call fails - */ - @Test - public void importNamespaceItemsTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - File _file = null; - api.importNamespaceItems(appId, env, clusterName, namespaceName, _file); - // TODO: test validations - } - - /** - * 按应用ID或名称搜索应用(new added) - * - * GET /openapi/v1/apps/search/by-appid-or-name - * - * @throws ApiException if the Api call fails - */ - @Test - public void searchAppsByAppIdOrNameTest() throws ApiException { - String query = null; - Integer page = null; - Integer size = null; - Object response = api.searchAppsByAppIdOrName(query, page, size); - // TODO: test validations - } - - /** - * 搜索审计日志(new added) - * - * GET /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator - * - * @throws ApiException if the Api call fails - */ - @Test - public void searchAuditLogsTest() throws ApiException { - String query = null; - Integer page = null; - Integer size = null; - List response = api.searchAuditLogs(query, page, size); - // TODO: test validations - } - - /** - * 按Key或Value全局搜索配置(new added) - * - * GET /openapi/v1/global-search/item-info/by-key-or-value - * - * @throws ApiException if the Api call fails - */ - @Test - public void searchItemInfoByKeyOrValueTest() throws ApiException { - String key = null; - String value = null; - Object response = api.searchItemInfoByKeyOrValue(key, value); - // TODO: test validations - } - - /** - * 收藏置顶(new added) - * - * PUT /openapi/v1/favorites/{favoriteId} - * - * @throws ApiException if the Api call fails - */ - @Test - public void topFavoriteTest() throws ApiException { - Long favoriteId = null; - api.topFavorite(favoriteId); - // TODO: test validations - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/api/ReleaseManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/ReleaseManagementApiTest.java deleted file mode 100644 index 5bd59a15..00000000 --- a/java-client/src/test/java/org/openapitools/client/api/ReleaseManagementApiTest.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.ExceptionResponse; -import org.openapitools.client.model.NamespaceGrayDelReleaseDTO; -import org.openapitools.client.model.NamespaceReleaseDTO; -import org.openapitools.client.model.OpenReleaseDTO; -import org.openapitools.client.model.OpenReleaseDiffDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for ReleaseManagementApi - */ -@Disabled -public class ReleaseManagementApiTest { - - private final ReleaseManagementApi api = new ReleaseManagementApi(); - - /** - * Compare two releases - * - * Get the configuration differences between two releases. - * - * @throws ApiException if the Api call fails - */ - @Test - public void compareReleaseTest() throws ApiException { - String env = null; - Long baseReleaseId = null; - Long toCompareReleaseId = null; - OpenReleaseDiffDTO response = api.compareRelease(env, baseReleaseId, toCompareReleaseId); - // TODO: test validations - } - - /** - * 创建灰度删除发布 (original openapi) - * - * - * - * @throws ApiException if the Api call fails - */ - @Test - public void createGrayDelReleaseTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String branchName = null; - NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO = null; - String operator = null; - OpenReleaseDTO response = api.createGrayDelRelease(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO, operator); - // TODO: test validations - } - - /** - * 创建灰度发布 (original openapi) - * - * 创建灰度发布 - * - * @throws ApiException if the Api call fails - */ - @Test - public void createGrayReleaseTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - String branchName = null; - NamespaceReleaseDTO namespaceReleaseDTO = null; - String operator = null; - OpenReleaseDTO response = api.createGrayRelease(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO, operator); - // TODO: test validations - } - - /** - * 创建发布 (original openapi) - * - * 创建发布 - * - * @throws ApiException if the Api call fails - */ - @Test - public void createReleaseTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - NamespaceReleaseDTO namespaceReleaseDTO = null; - String operator = null; - OpenReleaseDTO response = api.createRelease(appId, env, clusterName, namespaceName, namespaceReleaseDTO, operator); - // 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 findActiveReleasesTest() throws ApiException { - String appId = null; - String env = null; - String clusterName = null; - String namespaceName = null; - 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/{releaseId} - * - * @throws ApiException if the Api call fails - */ - @Test - public void getReleaseByIdTest() throws ApiException { - String env = null; - Long releaseId = null; - OpenReleaseDTO response = api.getReleaseById(env, releaseId); - // TODO: test validations - } - - /** - * 获取最新活跃发布 (original openapi) - * - * 查询命名空间最新活跃发布 - * - * @throws ApiException if the Api call fails - */ - @Test - public void loadLatestActiveReleaseTest() throws ApiException { - String appId = null; - String env = 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 rollbackTest() throws ApiException { - String env = null; - Long releaseId = null; - String operator = null; - Long toReleaseId = null; - api.rollback(env, releaseId, operator, toReleaseId); - // TODO: test validations - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/api/UserManagementApiTest.java b/java-client/src/test/java/org/openapitools/client/api/UserManagementApiTest.java deleted file mode 100644 index 8b2c15b1..00000000 --- a/java-client/src/test/java/org/openapitools/client/api/UserManagementApiTest.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.api; - -import org.openapitools.client.ApiException; -import org.openapitools.client.model.ExceptionResponse; -import org.openapitools.client.model.OpenUserDTO; -import org.openapitools.client.model.OpenUserInfoDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * API tests for UserManagementApi - */ -@Disabled -public class UserManagementApiTest { - - private final UserManagementApi api = new UserManagementApi(); - - /** - * 修改用户启用状态(new added) - * - * PUT /openapi/v1/users/enabled,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - * - * @throws ApiException if the Api call fails - */ - @Test - public void changeUserEnabledTest() throws ApiException { - OpenUserDTO openUserDTO = null; - String operator = null; - api.changeUserEnabled(openUserDTO, operator); - // TODO: test validations - } - - /** - * 创建或更新用户(new added) - * - * POST /openapi/v1/users,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - * - * @throws ApiException if the Api call fails - */ - @Test - public void createOrUpdateUserTest() throws ApiException { - OpenUserDTO openUserDTO = null; - Boolean isCreate = null; - String operator = null; - api.createOrUpdateUser(openUserDTO, isCreate, operator); - // TODO: test validations - } - - /** - * 获取当前Portal用户(new added) - * - * GET /openapi/v1/user - * - * @throws ApiException if the Api call fails - */ - @Test - public void getCurrentUserTest() throws ApiException { - OpenUserInfoDTO response = api.getCurrentUser(); - // TODO: test validations - } - - /** - * 获取指定用户(new added) - * - * GET /openapi/v1/users/{userId},支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - * - * @throws ApiException if the Api call fails - */ - @Test - public void getUserByUserIdTest() throws ApiException { - String userId = null; - OpenUserInfoDTO response = api.getUserByUserId(userId); - // TODO: test validations - } - - /** - * 搜索用户(new added) - * - * GET /openapi/v1/users,支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - * - * @throws ApiException if the Api call fails - */ - @Test - public void searchUsersTest() throws ApiException { - String keyword = null; - Boolean includeInactiveUsers = null; - Integer offset = null; - Integer limit = null; - List response = api.searchUsers(keyword, includeInactiveUsers, offset, limit); - // TODO: test validations - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/ExceptionResponseTest.java b/java-client/src/test/java/org/openapitools/client/model/ExceptionResponseTest.java deleted file mode 100644 index 0f5f83ca..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/ExceptionResponseTest.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.time.OffsetDateTime; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for ExceptionResponse - */ -public class ExceptionResponseTest { - private final ExceptionResponse model = new ExceptionResponse(); - - /** - * Model tests for ExceptionResponse - */ - @Test - public void testExceptionResponse() { - // TODO: test ExceptionResponse - } - - /** - * Test the property 'status' - */ - @Test - public void statusTest() { - // TODO: test status - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - - /** - * Test the property 'timestamp' - */ - @Test - public void timestampTest() { - // TODO: test timestamp - } - - /** - * Test the property 'exception' - */ - @Test - public void exceptionTest() { - // TODO: test exception - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTOTest.java deleted file mode 100644 index 4560c21f..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/NamespaceGrayDelReleaseDTOTest.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for NamespaceGrayDelReleaseDTO - */ -public class NamespaceGrayDelReleaseDTOTest { - private final NamespaceGrayDelReleaseDTO model = new NamespaceGrayDelReleaseDTO(); - - /** - * Model tests for NamespaceGrayDelReleaseDTO - */ - @Test - public void testNamespaceGrayDelReleaseDTO() { - // TODO: test NamespaceGrayDelReleaseDTO - } - - /** - * Test the property 'releaseTitle' - */ - @Test - public void releaseTitleTest() { - // TODO: test releaseTitle - } - - /** - * Test the property 'releaseComment' - */ - @Test - public void releaseCommentTest() { - // TODO: test releaseComment - } - - /** - * Test the property 'releasedBy' - */ - @Test - public void releasedByTest() { - // TODO: test releasedBy - } - - /** - * Test the property 'isEmergencyPublish' - */ - @Test - public void isEmergencyPublishTest() { - // TODO: test isEmergencyPublish - } - - /** - * Test the property 'grayDelKeys' - */ - @Test - public void grayDelKeysTest() { - // TODO: test grayDelKeys - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/NamespaceReleaseDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/NamespaceReleaseDTOTest.java deleted file mode 100644 index f7da6e51..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/NamespaceReleaseDTOTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 NamespaceReleaseDTO - */ -public class NamespaceReleaseDTOTest { - private final NamespaceReleaseDTO model = new NamespaceReleaseDTO(); - - /** - * Model tests for NamespaceReleaseDTO - */ - @Test - public void testNamespaceReleaseDTO() { - // TODO: test NamespaceReleaseDTO - } - - /** - * Test the property 'releaseTitle' - */ - @Test - public void releaseTitleTest() { - // TODO: test releaseTitle - } - - /** - * Test the property 'releaseComment' - */ - @Test - public void releaseCommentTest() { - // TODO: test releaseComment - } - - /** - * Test the property 'releasedBy' - */ - @Test - public void releasedByTest() { - // TODO: test releasedBy - } - - /** - * Test the property 'isEmergencyPublish' - */ - @Test - public void isEmergencyPublishTest() { - // TODO: test isEmergencyPublish - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenAccessKeyDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenAccessKeyDTOTest.java deleted file mode 100644 index d7da6d68..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenAccessKeyDTOTest.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenAccessKeyDTO - */ -public class OpenAccessKeyDTOTest { - private final OpenAccessKeyDTO model = new OpenAccessKeyDTO(); - - /** - * Model tests for OpenAccessKeyDTO - */ - @Test - public void testOpenAccessKeyDTO() { - // TODO: test OpenAccessKeyDTO - } - - /** - * 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 'secret' - */ - @Test - public void secretTest() { - // TODO: test secret - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'mode' - */ - @Test - public void modeTest() { - // TODO: test mode - } - - /** - * Test the property 'enabled' - */ - @Test - public void enabledTest() { - // TODO: test enabled - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenAppDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenAppDTOTest.java deleted file mode 100644 index f73edd67..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenAppDTOTest.java +++ /dev/null @@ -1,143 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenAppDTO - */ -public class OpenAppDTOTest { - private final OpenAppDTO model = new OpenAppDTO(); - - /** - * Model tests for OpenAppDTO - */ - @Test - public void testOpenAppDTO() { - // TODO: test OpenAppDTO - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeCreatedByDisplayName' - */ - @Test - public void dataChangeCreatedByDisplayNameTest() { - // TODO: test dataChangeCreatedByDisplayName - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * 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 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'orgId' - */ - @Test - public void orgIdTest() { - // TODO: test orgId - } - - /** - * Test the property 'orgName' - */ - @Test - public void orgNameTest() { - // TODO: test orgName - } - - /** - * Test the property 'ownerName' - */ - @Test - public void ownerNameTest() { - // TODO: test ownerName - } - - /** - * Test the property 'ownerEmail' - */ - @Test - public void ownerEmailTest() { - // TODO: test ownerEmail - } - - /** - * Test the property 'ownerDisplayName' - */ - @Test - public void ownerDisplayNameTest() { - // TODO: test ownerDisplayName - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenAppNamespaceDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenAppNamespaceDTOTest.java deleted file mode 100644 index 6dc17631..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenAppNamespaceDTOTest.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenAppNamespaceDTO - */ -public class OpenAppNamespaceDTOTest { - private final OpenAppNamespaceDTO model = new OpenAppNamespaceDTO(); - - /** - * Model tests for OpenAppNamespaceDTO - */ - @Test - public void testOpenAppNamespaceDTO() { - // TODO: test OpenAppNamespaceDTO - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeCreatedByDisplayName' - */ - @Test - public void dataChangeCreatedByDisplayNameTest() { - // TODO: test dataChangeCreatedByDisplayName - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * 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 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'format' - */ - @Test - public void formatTest() { - // TODO: test format - } - - /** - * Test the property 'isPublic' - */ - @Test - public void isPublicTest() { - // TODO: test isPublic - } - - /** - * Test the property 'appendNamespacePrefix' - */ - @Test - public void appendNamespacePrefixTest() { - // TODO: test appendNamespacePrefix - } - - /** - * Test the property 'comment' - */ - @Test - public void commentTest() { - // TODO: test comment - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenAppRoleUserDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenAppRoleUserDTOTest.java deleted file mode 100644 index 6b369d36..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenAppRoleUserDTOTest.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.OpenUserInfoDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for OpenAppRoleUserDTO - */ -public class OpenAppRoleUserDTOTest { - private final OpenAppRoleUserDTO model = new OpenAppRoleUserDTO(); - - /** - * Model tests for OpenAppRoleUserDTO - */ - @Test - public void testOpenAppRoleUserDTO() { - // TODO: test OpenAppRoleUserDTO - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'masterUsers' - */ - @Test - public void masterUsersTest() { - // TODO: test masterUsers - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenClusterDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenClusterDTOTest.java deleted file mode 100644 index b0bba2f1..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenClusterDTOTest.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenClusterDTO - */ -public class OpenClusterDTOTest { - private final OpenClusterDTO model = new OpenClusterDTO(); - - /** - * Model tests for OpenClusterDTO - */ - @Test - public void testOpenClusterDTO() { - // TODO: test OpenClusterDTO - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeCreatedByDisplayName' - */ - @Test - public void dataChangeCreatedByDisplayNameTest() { - // TODO: test dataChangeCreatedByDisplayName - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * 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 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * 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/OpenClusterNamespaceRoleUserDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenClusterNamespaceRoleUserDTOTest.java deleted file mode 100644 index adf69022..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenClusterNamespaceRoleUserDTOTest.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.OpenUserInfoDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for OpenClusterNamespaceRoleUserDTO - */ -public class OpenClusterNamespaceRoleUserDTOTest { - private final OpenClusterNamespaceRoleUserDTO model = new OpenClusterNamespaceRoleUserDTO(); - - /** - * Model tests for OpenClusterNamespaceRoleUserDTO - */ - @Test - public void testOpenClusterNamespaceRoleUserDTO() { - // TODO: test OpenClusterNamespaceRoleUserDTO - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'env' - */ - @Test - public void envTest() { - // TODO: test env - } - - /** - * Test the property 'cluster' - */ - @Test - public void clusterTest() { - // TODO: test cluster - } - - /** - * Test the property 'modifyRoleUsers' - */ - @Test - public void modifyRoleUsersTest() { - // TODO: test modifyRoleUsers - } - - /** - * Test the property 'releaseRoleUsers' - */ - @Test - public void releaseRoleUsersTest() { - // TODO: test releaseRoleUsers - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenCreateAppDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenCreateAppDTOTest.java deleted file mode 100644 index 892d4744..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenCreateAppDTOTest.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.LinkedHashSet; -import java.util.Set; -import org.openapitools.client.model.OpenAppDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for OpenCreateAppDTO - */ -public class OpenCreateAppDTOTest { - private final OpenCreateAppDTO model = new OpenCreateAppDTO(); - - /** - * Model tests for OpenCreateAppDTO - */ - @Test - public void testOpenCreateAppDTO() { - // TODO: test OpenCreateAppDTO - } - - /** - * Test the property 'assignAppRoleToSelf' - */ - @Test - public void assignAppRoleToSelfTest() { - // TODO: test assignAppRoleToSelf - } - - /** - * Test the property 'admins' - */ - @Test - public void adminsTest() { - // TODO: test admins - } - - /** - * Test the property 'app' - */ - @Test - public void appTest() { - // TODO: test app - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenCreateNamespaceDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenCreateNamespaceDTOTest.java deleted file mode 100644 index 45d06c2b..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenCreateNamespaceDTOTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenCreateNamespaceDTO - */ -public class OpenCreateNamespaceDTOTest { - private final OpenCreateNamespaceDTO model = new OpenCreateNamespaceDTO(); - - /** - * Model tests for OpenCreateNamespaceDTO - */ - @Test - public void testOpenCreateNamespaceDTO() { - // TODO: test OpenCreateNamespaceDTO - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'env' - */ - @Test - public void envTest() { - // TODO: test env - } - - /** - * Test the property 'clusterName' - */ - @Test - public void clusterNameTest() { - // TODO: test clusterName - } - - /** - * Test the property 'appNamespaceName' - */ - @Test - public void appNamespaceNameTest() { - // TODO: test appNamespaceName - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterDTOTest.java deleted file mode 100644 index 878808b3..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterDTOTest.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for OpenEnvClusterDTO - */ -public class OpenEnvClusterDTOTest { - private final OpenEnvClusterDTO model = new OpenEnvClusterDTO(); - - /** - * Model tests for OpenEnvClusterDTO - */ - @Test - public void testOpenEnvClusterDTO() { - // TODO: test OpenEnvClusterDTO - } - - /** - * Test the property 'env' - */ - @Test - public void envTest() { - // TODO: test env - } - - /** - * Test the property 'clusters' - */ - @Test - public void clustersTest() { - // TODO: test clusters - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterInfoTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterInfoTest.java deleted file mode 100644 index d4676ac2..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenEnvClusterInfoTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 'code' - */ - @Test - public void codeTest() { - // TODO: test code - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - - /** - * 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/OpenEnvNamespaceRoleUserDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenEnvNamespaceRoleUserDTOTest.java deleted file mode 100644 index e9a967bb..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenEnvNamespaceRoleUserDTOTest.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.OpenUserInfoDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for OpenEnvNamespaceRoleUserDTO - */ -public class OpenEnvNamespaceRoleUserDTOTest { - private final OpenEnvNamespaceRoleUserDTO model = new OpenEnvNamespaceRoleUserDTO(); - - /** - * Model tests for OpenEnvNamespaceRoleUserDTO - */ - @Test - public void testOpenEnvNamespaceRoleUserDTO() { - // TODO: test OpenEnvNamespaceRoleUserDTO - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'namespaceName' - */ - @Test - public void namespaceNameTest() { - // TODO: test namespaceName - } - - /** - * Test the property 'modifyRoleUsers' - */ - @Test - public void modifyRoleUsersTest() { - // TODO: test modifyRoleUsers - } - - /** - * Test the property 'releaseRoleUsers' - */ - @Test - public void releaseRoleUsersTest() { - // TODO: test releaseRoleUsers - } - - /** - * Test the property 'env' - */ - @Test - public void envTest() { - // TODO: test env - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleDTOTest.java deleted file mode 100644 index 24743b5a..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleDTOTest.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.LinkedHashSet; -import java.util.Set; -import org.openapitools.client.model.OpenGrayReleaseRuleItemDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for OpenGrayReleaseRuleDTO - */ -public class OpenGrayReleaseRuleDTOTest { - private final OpenGrayReleaseRuleDTO model = new OpenGrayReleaseRuleDTO(); - - /** - * Model tests for OpenGrayReleaseRuleDTO - */ - @Test - public void testOpenGrayReleaseRuleDTO() { - // TODO: test OpenGrayReleaseRuleDTO - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeCreatedByDisplayName' - */ - @Test - public void dataChangeCreatedByDisplayNameTest() { - // TODO: test dataChangeCreatedByDisplayName - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * 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 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'clusterName' - */ - @Test - public void clusterNameTest() { - // TODO: test clusterName - } - - /** - * Test the property 'namespaceName' - */ - @Test - public void namespaceNameTest() { - // TODO: test namespaceName - } - - /** - * Test the property 'branchName' - */ - @Test - public void branchNameTest() { - // TODO: test branchName - } - - /** - * Test the property 'ruleItems' - */ - @Test - public void ruleItemsTest() { - // TODO: test ruleItems - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTOTest.java deleted file mode 100644 index 81b6dcea..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenGrayReleaseRuleItemDTOTest.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.LinkedHashSet; -import java.util.Set; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for OpenGrayReleaseRuleItemDTO - */ -public class OpenGrayReleaseRuleItemDTOTest { - private final OpenGrayReleaseRuleItemDTO model = new OpenGrayReleaseRuleItemDTO(); - - /** - * Model tests for OpenGrayReleaseRuleItemDTO - */ - @Test - public void testOpenGrayReleaseRuleItemDTO() { - // TODO: test OpenGrayReleaseRuleItemDTO - } - - /** - * Test the property 'clientAppId' - */ - @Test - public void clientAppIdTest() { - // TODO: test clientAppId - } - - /** - * Test the property 'clientIpList' - */ - @Test - public void clientIpListTest() { - // TODO: test clientIpList - } - - /** - * Test the property 'clientLabelList' - */ - @Test - public void clientLabelListTest() { - // TODO: test clientLabelList - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenInstanceConfigDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenInstanceConfigDTOTest.java deleted file mode 100644 index 65832a23..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenInstanceConfigDTOTest.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.OpenReleaseDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for OpenInstanceConfigDTO - */ -public class OpenInstanceConfigDTOTest { - private final OpenInstanceConfigDTO model = new OpenInstanceConfigDTO(); - - /** - * Model tests for OpenInstanceConfigDTO - */ - @Test - public void testOpenInstanceConfigDTO() { - // TODO: test OpenInstanceConfigDTO - } - - /** - * Test the property 'release' - */ - @Test - public void releaseTest() { - // TODO: test release - } - - /** - * Test the property 'releaseDeliveryTime' - */ - @Test - public void releaseDeliveryTimeTest() { - // TODO: test releaseDeliveryTime - } - - /** - * Test the property 'dataChangeLastModifiedTime' - */ - @Test - public void dataChangeLastModifiedTimeTest() { - // TODO: test dataChangeLastModifiedTime - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenInstanceDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenInstanceDTOTest.java deleted file mode 100644 index 60c0460e..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenInstanceDTOTest.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.OpenInstanceConfigDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for OpenInstanceDTO - */ -public class OpenInstanceDTOTest { - private final OpenInstanceDTO model = new OpenInstanceDTO(); - - /** - * Model tests for OpenInstanceDTO - */ - @Test - public void testOpenInstanceDTO() { - // TODO: test OpenInstanceDTO - } - - /** - * Test the property 'id' - */ - @Test - public void idTest() { - // TODO: test id - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'clusterName' - */ - @Test - public void clusterNameTest() { - // TODO: test clusterName - } - - /** - * Test the property 'dataCenter' - */ - @Test - public void dataCenterTest() { - // TODO: test dataCenter - } - - /** - * Test the property 'ip' - */ - @Test - public void ipTest() { - // TODO: test ip - } - - /** - * Test the property 'configs' - */ - @Test - public void configsTest() { - // TODO: test configs - } - - /** - * Test the property 'dataChangeCreatedTime' - */ - @Test - public void dataChangeCreatedTimeTest() { - // TODO: test dataChangeCreatedTime - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenInstancePageDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenInstancePageDTOTest.java deleted file mode 100644 index 27e7b8c8..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenInstancePageDTOTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.OpenInstanceDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for OpenInstancePageDTO - */ -public class OpenInstancePageDTOTest { - private final OpenInstancePageDTO model = new OpenInstancePageDTO(); - - /** - * Model tests for OpenInstancePageDTO - */ - @Test - public void testOpenInstancePageDTO() { - // TODO: test OpenInstancePageDTO - } - - /** - * Test the property 'page' - */ - @Test - public void pageTest() { - // TODO: test page - } - - /** - * Test the property 'size' - */ - @Test - public void sizeTest() { - // TODO: test size - } - - /** - * Test the property 'total' - */ - @Test - public void totalTest() { - // TODO: test total - } - - /** - * Test the property 'instances' - */ - @Test - public void instancesTest() { - // TODO: test instances - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenItemDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenItemDTOTest.java deleted file mode 100644 index 18526a06..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenItemDTOTest.java +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.OpenItemExtendDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for OpenItemDTO - */ -public class OpenItemDTOTest { - private final OpenItemDTO model = new OpenItemDTO(); - - /** - * Model tests for OpenItemDTO - */ - @Test - public void testOpenItemDTO() { - // TODO: test OpenItemDTO - } - - /** - * Test the property 'key' - */ - @Test - public void keyTest() { - // TODO: test key - } - - /** - * Test the property 'value' - */ - @Test - public void valueTest() { - // TODO: test value - } - - /** - * Test the property 'type' - */ - @Test - public void typeTest() { - // TODO: test type - } - - /** - * Test the property 'comment' - */ - @Test - public void commentTest() { - // TODO: test comment - } - - /** - * Test the property 'lineNum' - */ - @Test - public void lineNumTest() { - // TODO: test lineNum - } - - /** - * Test the property 'extendInfo' - */ - @Test - public void extendInfoTest() { - // TODO: test extendInfo - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeCreatedByDisplayName' - */ - @Test - public void dataChangeCreatedByDisplayNameTest() { - // TODO: test dataChangeCreatedByDisplayName - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * 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 - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenItemDiffDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenItemDiffDTOTest.java deleted file mode 100644 index 0f2b6a1d..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenItemDiffDTOTest.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.client.model.OpenItemDTO; -import org.openapitools.client.model.OpenNamespaceIdentifier; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for OpenItemDiffDTO - */ -public class OpenItemDiffDTOTest { - private final OpenItemDiffDTO model = new OpenItemDiffDTO(); - - /** - * Model tests for OpenItemDiffDTO - */ - @Test - public void testOpenItemDiffDTO() { - // TODO: test OpenItemDiffDTO - } - - /** - * Test the property 'code' - */ - @Test - public void codeTest() { - // TODO: test code - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - - /** - * Test the property 'namespace' - */ - @Test - public void namespaceTest() { - // TODO: test namespace - } - - /** - * Test the property 'createItems' - */ - @Test - public void createItemsTest() { - // TODO: test createItems - } - - /** - * Test the property 'deleteItems' - */ - @Test - public void deleteItemsTest() { - // TODO: test deleteItems - } - - /** - * Test the property 'updateItems' - */ - @Test - public void updateItemsTest() { - // TODO: test updateItems - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenItemExtendDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenItemExtendDTOTest.java deleted file mode 100644 index a12ffa34..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenItemExtendDTOTest.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for OpenItemExtendDTO - */ -public class OpenItemExtendDTOTest { - private final OpenItemExtendDTO model = new OpenItemExtendDTO(); - - /** - * Model tests for OpenItemExtendDTO - */ - @Test - public void testOpenItemExtendDTO() { - // TODO: test OpenItemExtendDTO - } - - /** - * Test the property 'namespaceId' - */ - @Test - public void namespaceIdTest() { - // TODO: test namespaceId - } - - /** - * Test the property 'isModified' - */ - @Test - public void isModifiedTest() { - // TODO: test isModified - } - - /** - * Test the property 'isDeleted' - */ - @Test - public void isDeletedTest() { - // TODO: test isDeleted - } - - /** - * Test the property 'isNewlyAdded' - */ - @Test - public void isNewlyAddedTest() { - // TODO: test isNewlyAdded - } - - /** - * Test the property 'newValue' - */ - @Test - public void newValueTest() { - // TODO: test newValue - } - - /** - * Test the property 'oldValue' - */ - @Test - public void oldValueTest() { - // TODO: test oldValue - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenItemPageDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenItemPageDTOTest.java deleted file mode 100644 index 273ec66c..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenItemPageDTOTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for OpenItemPageDTO - */ -public class OpenItemPageDTOTest { - private final OpenItemPageDTO model = new OpenItemPageDTO(); - - /** - * Model tests for OpenItemPageDTO - */ - @Test - public void testOpenItemPageDTO() { - // TODO: test OpenItemPageDTO - } - - /** - * Test the property 'page' - */ - @Test - public void pageTest() { - // TODO: test page - } - - /** - * Test the property 'size' - */ - @Test - public void sizeTest() { - // TODO: test size - } - - /** - * Test the property 'total' - */ - @Test - public void totalTest() { - // TODO: test total - } - - /** - * Test the property 'content' - */ - @Test - public void contentTest() { - // TODO: test content - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenMissEnvDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenMissEnvDTOTest.java deleted file mode 100644 index 765c555b..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenMissEnvDTOTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for OpenMissEnvDTO - */ -public class OpenMissEnvDTOTest { - private final OpenMissEnvDTO model = new OpenMissEnvDTO(); - - /** - * Model tests for OpenMissEnvDTO - */ - @Test - public void testOpenMissEnvDTO() { - // TODO: test OpenMissEnvDTO - } - - /** - * Test the property 'code' - */ - @Test - public void codeTest() { - // TODO: test code - } - - /** - * Test the property 'message' - */ - @Test - public void messageTest() { - // TODO: test message - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceDTOTest.java deleted file mode 100644 index 2f58dc90..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceDTOTest.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.OpenNamespaceExtendDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for OpenNamespaceDTO - */ -public class OpenNamespaceDTOTest { - private final OpenNamespaceDTO model = new OpenNamespaceDTO(); - - /** - * Model tests for OpenNamespaceDTO - */ - @Test - public void testOpenNamespaceDTO() { - // TODO: test OpenNamespaceDTO - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeCreatedByDisplayName' - */ - @Test - public void dataChangeCreatedByDisplayNameTest() { - // TODO: test dataChangeCreatedByDisplayName - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * 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 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'clusterName' - */ - @Test - public void clusterNameTest() { - // TODO: test clusterName - } - - /** - * Test the property 'namespaceName' - */ - @Test - public void namespaceNameTest() { - // TODO: test namespaceName - } - - /** - * Test the property 'comment' - */ - @Test - public void commentTest() { - // TODO: test comment - } - - /** - * Test the property 'format' - */ - @Test - public void formatTest() { - // TODO: test format - } - - /** - * Test the property 'isPublic' - */ - @Test - public void isPublicTest() { - // TODO: test isPublic - } - - /** - * Test the property 'items' - */ - @Test - public void itemsTest() { - // TODO: test items - } - - /** - * Test the property 'extendInfo' - */ - @Test - public void extendInfoTest() { - // TODO: test extendInfo - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceExtendDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceExtendDTOTest.java deleted file mode 100644 index 602a8e74..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceExtendDTOTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenNamespaceExtendDTO - */ -public class OpenNamespaceExtendDTOTest { - private final OpenNamespaceExtendDTO model = new OpenNamespaceExtendDTO(); - - /** - * Model tests for OpenNamespaceExtendDTO - */ - @Test - public void testOpenNamespaceExtendDTO() { - // TODO: test OpenNamespaceExtendDTO - } - - /** - * Test the property 'isConfigHidden' - */ - @Test - public void isConfigHiddenTest() { - // TODO: test isConfigHidden - } - - /** - * Test the property 'parentAppId' - */ - @Test - public void parentAppIdTest() { - // TODO: test parentAppId - } - - /** - * Test the property 'itemModifiedCnt' - */ - @Test - public void itemModifiedCntTest() { - // TODO: test itemModifiedCnt - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceIdentifierTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceIdentifierTest.java deleted file mode 100644 index 93e2b513..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceIdentifierTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenNamespaceIdentifier - */ -public class OpenNamespaceIdentifierTest { - private final OpenNamespaceIdentifier model = new OpenNamespaceIdentifier(); - - /** - * Model tests for OpenNamespaceIdentifier - */ - @Test - public void testOpenNamespaceIdentifier() { - // TODO: test OpenNamespaceIdentifier - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'env' - */ - @Test - public void envTest() { - // TODO: test env - } - - /** - * Test the property 'clusterName' - */ - @Test - public void clusterNameTest() { - // TODO: test clusterName - } - - /** - * Test the property 'namespaceName' - */ - @Test - public void namespaceNameTest() { - // TODO: test namespaceName - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceLockDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceLockDTOTest.java deleted file mode 100644 index a2675195..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceLockDTOTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenNamespaceLockDTO - */ -public class OpenNamespaceLockDTOTest { - private final OpenNamespaceLockDTO model = new OpenNamespaceLockDTO(); - - /** - * Model tests for OpenNamespaceLockDTO - */ - @Test - public void testOpenNamespaceLockDTO() { - // TODO: test OpenNamespaceLockDTO - } - - /** - * Test the property 'namespaceName' - */ - @Test - public void namespaceNameTest() { - // TODO: test namespaceName - } - - /** - * Test the property 'isLocked' - */ - @Test - public void isLockedTest() { - // TODO: test isLocked - } - - /** - * Test the property 'lockedBy' - */ - @Test - public void lockedByTest() { - // TODO: test lockedBy - } - - /** - * Test the property 'isEmergencyPublishAllowed' - */ - @Test - public void isEmergencyPublishAllowedTest() { - // TODO: test isEmergencyPublishAllowed - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceRoleUserDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceRoleUserDTOTest.java deleted file mode 100644 index 6487a57e..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceRoleUserDTOTest.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.OpenUserInfoDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for OpenNamespaceRoleUserDTO - */ -public class OpenNamespaceRoleUserDTOTest { - private final OpenNamespaceRoleUserDTO model = new OpenNamespaceRoleUserDTO(); - - /** - * Model tests for OpenNamespaceRoleUserDTO - */ - @Test - public void testOpenNamespaceRoleUserDTO() { - // TODO: test OpenNamespaceRoleUserDTO - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'namespaceName' - */ - @Test - public void namespaceNameTest() { - // TODO: test namespaceName - } - - /** - * Test the property 'modifyRoleUsers' - */ - @Test - public void modifyRoleUsersTest() { - // TODO: test modifyRoleUsers - } - - /** - * Test the property 'releaseRoleUsers' - */ - @Test - public void releaseRoleUsersTest() { - // TODO: test releaseRoleUsers - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceSyncDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceSyncDTOTest.java deleted file mode 100644 index 52dc7deb..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceSyncDTOTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenNamespaceSyncDTO - */ -public class OpenNamespaceSyncDTOTest { - private final OpenNamespaceSyncDTO model = new OpenNamespaceSyncDTO(); - - /** - * Model tests for OpenNamespaceSyncDTO - */ - @Test - public void testOpenNamespaceSyncDTO() { - // TODO: test OpenNamespaceSyncDTO - } - - /** - * 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/OpenNamespaceTextModelTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceTextModelTest.java deleted file mode 100644 index 1ea5c760..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceTextModelTest.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenNamespaceTextModel - */ -public class OpenNamespaceTextModelTest { - private final OpenNamespaceTextModel model = new OpenNamespaceTextModel(); - - /** - * Model tests for OpenNamespaceTextModel - */ - @Test - public void testOpenNamespaceTextModel() { - // TODO: test OpenNamespaceTextModel - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'env' - */ - @Test - public void envTest() { - // TODO: test env - } - - /** - * Test the property 'clusterName' - */ - @Test - public void clusterNameTest() { - // TODO: test clusterName - } - - /** - * Test the property 'namespaceName' - */ - @Test - public void namespaceNameTest() { - // TODO: test namespaceName - } - - /** - * Test the property 'namespaceId' - */ - @Test - public void namespaceIdTest() { - // TODO: test namespaceId - } - - /** - * Test the property 'format' - */ - @Test - public void formatTest() { - // TODO: test format - } - - /** - * Test the property 'configText' - */ - @Test - public void configTextTest() { - // TODO: test configText - } - - /** - * Test the property 'operator' - */ - @Test - public void operatorTest() { - // TODO: test operator - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceUsageDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceUsageDTOTest.java deleted file mode 100644 index 7f825eea..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenNamespaceUsageDTOTest.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package org.openapitools.client.model; - -import com.google.gson.TypeAdapter; -import com.google.gson.annotations.JsonAdapter; -import com.google.gson.annotations.SerializedName; -import com.google.gson.stream.JsonReader; -import com.google.gson.stream.JsonWriter; -import java.io.IOException; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for OpenNamespaceUsageDTO - */ -public class OpenNamespaceUsageDTOTest { - private final OpenNamespaceUsageDTO model = new OpenNamespaceUsageDTO(); - - /** - * Model tests for OpenNamespaceUsageDTO - */ - @Test - public void testOpenNamespaceUsageDTO() { - // TODO: test OpenNamespaceUsageDTO - } - - /** - * Test the property 'namespaceName' - */ - @Test - public void namespaceNameTest() { - // TODO: test namespaceName - } - - /** - * Test the property 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'clusterName' - */ - @Test - public void clusterNameTest() { - // TODO: test clusterName - } - - /** - * Test the property 'envName' - */ - @Test - public void envNameTest() { - // TODO: test envName - } - - /** - * Test the property 'instanceCount' - */ - @Test - public void instanceCountTest() { - // TODO: test instanceCount - } - - /** - * Test the property 'branchInstanceCount' - */ - @Test - public void branchInstanceCountTest() { - // TODO: test branchInstanceCount - } - - /** - * Test the property 'linkedNamespaceCount' - */ - @Test - public void linkedNamespaceCountTest() { - // TODO: test linkedNamespaceCount - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenOrganizationDtoTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenOrganizationDtoTest.java deleted file mode 100644 index 45bb75bf..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenOrganizationDtoTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenOrganizationDto - */ -public class OpenOrganizationDtoTest { - private final OpenOrganizationDto model = new OpenOrganizationDto(); - - /** - * Model tests for OpenOrganizationDto - */ - @Test - public void testOpenOrganizationDto() { - // TODO: test OpenOrganizationDto - } - - /** - * Test the property 'orgId' - */ - @Test - public void orgIdTest() { - // TODO: test orgId - } - - /** - * Test the property 'orgName' - */ - @Test - public void orgNameTest() { - // TODO: test orgName - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenPermissionConditionDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenPermissionConditionDTOTest.java deleted file mode 100644 index 05452ab1..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenPermissionConditionDTOTest.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenPermissionConditionDTO - */ -public class OpenPermissionConditionDTOTest { - private final OpenPermissionConditionDTO model = new OpenPermissionConditionDTO(); - - /** - * Model tests for OpenPermissionConditionDTO - */ - @Test - public void testOpenPermissionConditionDTO() { - // TODO: test OpenPermissionConditionDTO - } - - /** - * Test the property 'hasPermission' - */ - @Test - public void hasPermissionTest() { - // TODO: test hasPermission - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenReleaseChangeDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenReleaseChangeDTOTest.java deleted file mode 100644 index 5580e99f..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenReleaseChangeDTOTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenReleaseChangeDTO - */ -public class OpenReleaseChangeDTOTest { - private final OpenReleaseChangeDTO model = new OpenReleaseChangeDTO(); - - /** - * Model tests for OpenReleaseChangeDTO - */ - @Test - public void testOpenReleaseChangeDTO() { - // TODO: test OpenReleaseChangeDTO - } - - /** - * Test the property 'changeType' - */ - @Test - public void changeTypeTest() { - // TODO: test changeType - } - - /** - * Test the property 'key' - */ - @Test - public void keyTest() { - // TODO: test key - } - - /** - * Test the property 'newValue' - */ - @Test - public void newValueTest() { - // TODO: test newValue - } - - /** - * Test the property 'oldValue' - */ - @Test - public void oldValueTest() { - // TODO: test oldValue - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenReleaseDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenReleaseDTOTest.java deleted file mode 100644 index 7a5a4c8f..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenReleaseDTOTest.java +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.HashMap; -import java.util.Map; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for OpenReleaseDTO - */ -public class OpenReleaseDTOTest { - private final OpenReleaseDTO model = new OpenReleaseDTO(); - - /** - * Model tests for OpenReleaseDTO - */ - @Test - public void testOpenReleaseDTO() { - // TODO: test OpenReleaseDTO - } - - /** - * Test the property 'dataChangeCreatedBy' - */ - @Test - public void dataChangeCreatedByTest() { - // TODO: test dataChangeCreatedBy - } - - /** - * Test the property 'dataChangeCreatedByDisplayName' - */ - @Test - public void dataChangeCreatedByDisplayNameTest() { - // TODO: test dataChangeCreatedByDisplayName - } - - /** - * Test the property 'dataChangeLastModifiedBy' - */ - @Test - public void dataChangeLastModifiedByTest() { - // TODO: test dataChangeLastModifiedBy - } - - /** - * 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 'appId' - */ - @Test - public void appIdTest() { - // TODO: test appId - } - - /** - * Test the property 'clusterName' - */ - @Test - public void clusterNameTest() { - // TODO: test clusterName - } - - /** - * Test the property 'namespaceName' - */ - @Test - public void namespaceNameTest() { - // TODO: test namespaceName - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'configurations' - */ - @Test - public void configurationsTest() { - // TODO: test configurations - } - - /** - * Test the property 'comment' - */ - @Test - public void commentTest() { - // TODO: test comment - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenReleaseDiffDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenReleaseDiffDTOTest.java deleted file mode 100644 index d8d5b457..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenReleaseDiffDTOTest.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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.OpenReleaseChangeDTO; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - - -/** - * Model tests for OpenReleaseDiffDTO - */ -public class OpenReleaseDiffDTOTest { - private final OpenReleaseDiffDTO model = new OpenReleaseDiffDTO(); - - /** - * Model tests for OpenReleaseDiffDTO - */ - @Test - public void testOpenReleaseDiffDTO() { - // TODO: test OpenReleaseDiffDTO - } - - /** - * Test the property 'changes' - */ - @Test - public void changesTest() { - // TODO: test changes - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenUserDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenUserDTOTest.java deleted file mode 100644 index 66569ea8..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenUserDTOTest.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenUserDTO - */ -public class OpenUserDTOTest { - private final OpenUserDTO model = new OpenUserDTO(); - - /** - * Model tests for OpenUserDTO - */ - @Test - public void testOpenUserDTO() { - // TODO: test OpenUserDTO - } - - /** - * Test the property 'username' - */ - @Test - public void usernameTest() { - // TODO: test username - } - - /** - * Test the property 'userDisplayName' - */ - @Test - public void userDisplayNameTest() { - // TODO: test userDisplayName - } - - /** - * Test the property 'password' - */ - @Test - public void passwordTest() { - // TODO: test password - } - - /** - * Test the property 'email' - */ - @Test - public void emailTest() { - // TODO: test email - } - - /** - * Test the property 'enabled' - */ - @Test - public void enabledTest() { - // TODO: test enabled - } - -} diff --git a/java-client/src/test/java/org/openapitools/client/model/OpenUserInfoDTOTest.java b/java-client/src/test/java/org/openapitools/client/model/OpenUserInfoDTOTest.java deleted file mode 100644 index 2368f098..00000000 --- a/java-client/src/test/java/org/openapitools/client/model/OpenUserInfoDTOTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenUserInfoDTO - */ -public class OpenUserInfoDTOTest { - private final OpenUserInfoDTO model = new OpenUserInfoDTO(); - - /** - * Model tests for OpenUserInfoDTO - */ - @Test - public void testOpenUserInfoDTO() { - // TODO: test OpenUserInfoDTO - } - - /** - * Test the property 'userId' - */ - @Test - public void userIdTest() { - // TODO: test userId - } - - /** - * Test the property 'name' - */ - @Test - public void nameTest() { - // TODO: test name - } - - /** - * Test the property 'email' - */ - @Test - public void emailTest() { - // TODO: test email - } - - /** - * Test the property 'enabled' - */ - @Test - public void enabledTest() { - // TODO: test enabled - } - -} diff --git a/openapitools.json b/openapitools.json index cd53ff4c..c1214330 100644 --- a/openapitools.json +++ b/openapitools.json @@ -2,6 +2,6 @@ "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", "spaces": 2, "generator-cli": { - "version": "6.6.0" + "version": "7.20.0" } } diff --git a/python/.gitignore b/python/.gitignore deleted file mode 100644 index a62e8aba..00000000 --- a/python/.gitignore +++ /dev/null @@ -1,67 +0,0 @@ -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -env/ -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -lib/ -lib64/ -parts/ -sdist/ -var/ -*.egg-info/ -.installed.cfg -*.egg - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt -dev-requirements.txt.log - -# Unit test / coverage reports -htmlcov/ -.tox/ -.coverage -.coverage.* -.cache -nosetests.xml -coverage.xml -*,cover -.hypothesis/ -venv/ -.venv/ -.python-version -.pytest_cache - -# Translations -*.mo -*.pot - -# Django stuff: -*.log - -# Sphinx documentation -docs/_build/ - -# PyBuilder -target/ - -#Ipython Notebook -.ipynb_checkpoints diff --git a/python/.gitlab-ci.yml b/python/.gitlab-ci.yml deleted file mode 100644 index aec48a68..00000000 --- a/python/.gitlab-ci.yml +++ /dev/null @@ -1,24 +0,0 @@ -# ref: https://docs.gitlab.com/ee/ci/README.html - -stages: - - test - -.tests: - stage: test - script: - - pip install -r requirements.txt - - pip install -r test-requirements.txt - - pytest --cov=apollo_openapi - -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-ignore b/python/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/python/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/python/.openapi-generator/FILES b/python/.openapi-generator/FILES deleted file mode 100644 index 792eb3a1..00000000 --- a/python/.openapi-generator/FILES +++ /dev/null @@ -1,216 +0,0 @@ -.gitignore -.gitlab-ci.yml -.openapi-generator-ignore -.travis.yml -README.md -apollo_openapi/__init__.py -apollo_openapi/api_client.py -apollo_openapi/apis/__init__.py -apollo_openapi/apis/tags/access_key_management_api.py -apollo_openapi/apis/tags/app_management_api.py -apollo_openapi/apis/tags/app_namespace_management_api.py -apollo_openapi/apis/tags/cluster_management_api.py -apollo_openapi/apis/tags/environment_management_api.py -apollo_openapi/apis/tags/instance_management_api.py -apollo_openapi/apis/tags/item_management_api.py -apollo_openapi/apis/tags/namespace_branch_management_api.py -apollo_openapi/apis/tags/namespace_lock_management_api.py -apollo_openapi/apis/tags/namespace_management_api.py -apollo_openapi/apis/tags/organization_management_api.py -apollo_openapi/apis/tags/permission_management_api.py -apollo_openapi/apis/tags/portal_management_api.py -apollo_openapi/apis/tags/release_management_api.py -apollo_openapi/apis/tags/user_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/map_string.py -apollo_openapi/model/map_string.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_access_key_dto.py -apollo_openapi/model/open_access_key_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_app_role_user_dto.py -apollo_openapi/model/open_app_role_user_dto.pyi -apollo_openapi/model/open_cluster_dto.py -apollo_openapi/model/open_cluster_dto.pyi -apollo_openapi/model/open_cluster_namespace_role_user_dto.py -apollo_openapi/model/open_cluster_namespace_role_user_dto.pyi -apollo_openapi/model/open_create_app_dto.py -apollo_openapi/model/open_create_app_dto.pyi -apollo_openapi/model/open_create_namespace_dto.py -apollo_openapi/model/open_create_namespace_dto.pyi -apollo_openapi/model/open_env_cluster_dto.py -apollo_openapi/model/open_env_cluster_dto.pyi -apollo_openapi/model/open_env_cluster_info.py -apollo_openapi/model/open_env_cluster_info.pyi -apollo_openapi/model/open_env_namespace_role_user_dto.py -apollo_openapi/model/open_env_namespace_role_user_dto.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_instance_page_dto.py -apollo_openapi/model/open_instance_page_dto.pyi -apollo_openapi/model/open_item_diff_dto.py -apollo_openapi/model/open_item_diff_dto.pyi -apollo_openapi/model/open_item_dto.py -apollo_openapi/model/open_item_dto.pyi -apollo_openapi/model/open_item_extend_dto.py -apollo_openapi/model/open_item_extend_dto.pyi -apollo_openapi/model/open_item_page_dto.py -apollo_openapi/model/open_item_page_dto.pyi -apollo_openapi/model/open_miss_env_dto.py -apollo_openapi/model/open_miss_env_dto.pyi -apollo_openapi/model/open_namespace_dto.py -apollo_openapi/model/open_namespace_dto.pyi -apollo_openapi/model/open_namespace_extend_dto.py -apollo_openapi/model/open_namespace_extend_dto.pyi -apollo_openapi/model/open_namespace_identifier.py -apollo_openapi/model/open_namespace_identifier.pyi -apollo_openapi/model/open_namespace_lock_dto.py -apollo_openapi/model/open_namespace_lock_dto.pyi -apollo_openapi/model/open_namespace_role_user_dto.py -apollo_openapi/model/open_namespace_role_user_dto.pyi -apollo_openapi/model/open_namespace_sync_dto.py -apollo_openapi/model/open_namespace_sync_dto.pyi -apollo_openapi/model/open_namespace_text_model.py -apollo_openapi/model/open_namespace_text_model.pyi -apollo_openapi/model/open_namespace_usage_dto.py -apollo_openapi/model/open_namespace_usage_dto.pyi -apollo_openapi/model/open_organization_dto.py -apollo_openapi/model/open_organization_dto.pyi -apollo_openapi/model/open_permission_condition_dto.py -apollo_openapi/model/open_permission_condition_dto.pyi -apollo_openapi/model/open_release_change_dto.py -apollo_openapi/model/open_release_change_dto.pyi -apollo_openapi/model/open_release_diff_dto.py -apollo_openapi/model/open_release_diff_dto.pyi -apollo_openapi/model/open_release_dto.py -apollo_openapi/model/open_release_dto.pyi -apollo_openapi/model/open_user_dto.py -apollo_openapi/model/open_user_dto.pyi -apollo_openapi/model/open_user_info_dto.py -apollo_openapi/model/open_user_info_dto.pyi -apollo_openapi/model/string_to_string_bool_map.py -apollo_openapi/model/string_to_string_bool_map.pyi -apollo_openapi/models/__init__.py -apollo_openapi/rest.py -apollo_openapi/schemas.py -docs/apis/tags/AccessKeyManagementApi.md -docs/apis/tags/AppManagementApi.md -docs/apis/tags/AppNamespaceManagementApi.md -docs/apis/tags/ClusterManagementApi.md -docs/apis/tags/EnvironmentManagementApi.md -docs/apis/tags/InstanceManagementApi.md -docs/apis/tags/ItemManagementApi.md -docs/apis/tags/NamespaceBranchManagementApi.md -docs/apis/tags/NamespaceLockManagementApi.md -docs/apis/tags/NamespaceManagementApi.md -docs/apis/tags/OrganizationManagementApi.md -docs/apis/tags/PermissionManagementApi.md -docs/apis/tags/PortalManagementApi.md -docs/apis/tags/ReleaseManagementApi.md -docs/apis/tags/UserManagementApi.md -docs/models/ExceptionResponse.md -docs/models/MapString.md -docs/models/NamespaceGrayDelReleaseDTO.md -docs/models/NamespaceReleaseDTO.md -docs/models/OpenAccessKeyDTO.md -docs/models/OpenAppDTO.md -docs/models/OpenAppNamespaceDTO.md -docs/models/OpenAppRoleUserDTO.md -docs/models/OpenClusterDTO.md -docs/models/OpenClusterNamespaceRoleUserDTO.md -docs/models/OpenCreateAppDTO.md -docs/models/OpenCreateNamespaceDTO.md -docs/models/OpenEnvClusterDTO.md -docs/models/OpenEnvClusterInfo.md -docs/models/OpenEnvNamespaceRoleUserDTO.md -docs/models/OpenGrayReleaseRuleDTO.md -docs/models/OpenGrayReleaseRuleItemDTO.md -docs/models/OpenInstanceConfigDTO.md -docs/models/OpenInstanceDTO.md -docs/models/OpenInstancePageDTO.md -docs/models/OpenItemDTO.md -docs/models/OpenItemDiffDTO.md -docs/models/OpenItemExtendDTO.md -docs/models/OpenItemPageDTO.md -docs/models/OpenMissEnvDTO.md -docs/models/OpenNamespaceDTO.md -docs/models/OpenNamespaceExtendDTO.md -docs/models/OpenNamespaceIdentifier.md -docs/models/OpenNamespaceLockDTO.md -docs/models/OpenNamespaceRoleUserDTO.md -docs/models/OpenNamespaceSyncDTO.md -docs/models/OpenNamespaceTextModel.md -docs/models/OpenNamespaceUsageDTO.md -docs/models/OpenOrganizationDto.md -docs/models/OpenPermissionConditionDTO.md -docs/models/OpenReleaseChangeDTO.md -docs/models/OpenReleaseDTO.md -docs/models/OpenReleaseDiffDTO.md -docs/models/OpenUserDTO.md -docs/models/OpenUserInfoDTO.md -docs/models/StringToStringBoolMap.md -git_push.sh -requirements.txt -setup.cfg -setup.py -test-requirements.txt -test/__init__.py -test/test_models/__init__.py -test/test_models/test_exception_response.py -test/test_models/test_map_string.py -test/test_models/test_namespace_gray_del_release_dto.py -test/test_models/test_namespace_release_dto.py -test/test_models/test_open_access_key_dto.py -test/test_models/test_open_app_dto.py -test/test_models/test_open_app_namespace_dto.py -test/test_models/test_open_app_role_user_dto.py -test/test_models/test_open_cluster_dto.py -test/test_models/test_open_cluster_namespace_role_user_dto.py -test/test_models/test_open_create_app_dto.py -test/test_models/test_open_create_namespace_dto.py -test/test_models/test_open_env_cluster_dto.py -test/test_models/test_open_env_cluster_info.py -test/test_models/test_open_env_namespace_role_user_dto.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_instance_page_dto.py -test/test_models/test_open_item_diff_dto.py -test/test_models/test_open_item_dto.py -test/test_models/test_open_item_extend_dto.py -test/test_models/test_open_item_page_dto.py -test/test_models/test_open_miss_env_dto.py -test/test_models/test_open_namespace_dto.py -test/test_models/test_open_namespace_extend_dto.py -test/test_models/test_open_namespace_identifier.py -test/test_models/test_open_namespace_lock_dto.py -test/test_models/test_open_namespace_role_user_dto.py -test/test_models/test_open_namespace_sync_dto.py -test/test_models/test_open_namespace_text_model.py -test/test_models/test_open_namespace_usage_dto.py -test/test_models/test_open_organization_dto.py -test/test_models/test_open_permission_condition_dto.py -test/test_models/test_open_release_change_dto.py -test/test_models/test_open_release_diff_dto.py -test/test_models/test_open_release_dto.py -test/test_models/test_open_user_dto.py -test/test_models/test_open_user_info_dto.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 deleted file mode 100644 index 826f5ce0..00000000 --- a/python/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 diff --git a/python/.travis.yml b/python/.travis.yml deleted file mode 100644 index 3704acfe..00000000 --- a/python/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -# ref: https://docs.travis-ci.com/user/languages/python -language: python -python: - - "3.5" - - "3.6" - - "3.7" - - "3.8" -# command to install dependencies -install: - - "pip install -r requirements.txt" - - "pip install -r test-requirements.txt" -# command to run tests -script: pytest --cov=apollo_openapi diff --git a/python/README.md b/python/README.md deleted file mode 100644 index c476934f..00000000 --- a/python/README.md +++ /dev/null @@ -1,428 +0,0 @@ -# apollo-openapi -

Apollo配置中心OpenAPI接口文档

- -

认证方式

-

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

- -

获取 Token 的方式:

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

使用示例

-
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: 0.3.8 -- Package version: 0.3.8 -- Build package: org.openapitools.codegen.languages.PythonClientCodegen - -## Requirements. - -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 - -If the python package is hosted on a repository, you can install directly using: - -```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git -``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) - -Then import the package: -```python -import apollo_openapi -``` - -### Setuptools - -Install via [Setuptools](http://pypi.python.org/pypi/setuptools). - -```sh -python setup.py install --user -``` -(or `sudo python setup.py install` to install the package for all users) - -Then import the package: -```python -import apollo_openapi -``` - -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: - -```python - -import time -import apollo_openapi -from pprint import pprint -from apollo_openapi.apis.tags import access_key_management_api -from apollo_openapi.model.open_access_key_dto import OpenAccessKeyDTO -# 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 = access_key_management_api.AccessKeyManagementApi(api_client) - app_id = "appId_example" # str | -env = "env_example" # str | -operator = "operator_example" # str | 操作人用户名 (optional) - - try: - # 创建AccessKey - api_response = api_instance.create_access_key(app_idenvoperator=operator) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling AccessKeyManagementApi->create_access_key: %s\n" % e) -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AccessKeyManagementApi* | [**create_access_key**](docs/apis/tags/AccessKeyManagementApi.md#create_access_key) | **post** /openapi/v1/apps/{appId}/envs/{env}/accesskeys | 创建AccessKey -*AccessKeyManagementApi* | [**delete_access_key**](docs/apis/tags/AccessKeyManagementApi.md#delete_access_key) | **delete** /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId} | 删除AccessKey -*AccessKeyManagementApi* | [**disable_access_key**](docs/apis/tags/AccessKeyManagementApi.md#disable_access_key) | **put** /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/deactivation | 禁用AccessKey -*AccessKeyManagementApi* | [**enable_access_key**](docs/apis/tags/AccessKeyManagementApi.md#enable_access_key) | **put** /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/activation | 启用AccessKey -*AccessKeyManagementApi* | [**find_access_keys**](docs/apis/tags/AccessKeyManagementApi.md#find_access_keys) | **get** /openapi/v1/apps/{appId}/envs/{env}/accesskeys | 查找AccessKey -*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_apps_by_self**](docs/apis/tags/AppManagementApi.md#get_apps_by_self) | **get** /openapi/v1/apps/by-self | 获取当前Consumer/User的应用列表(分页)(new added) -*AppManagementApi* | [**get_env_cluster_info**](docs/apis/tags/AppManagementApi.md#get_env_cluster_info) | **get** /openapi/v1/apps/{appId}/env-cluster-info | 获取应用环境集群详情(new added) -*AppManagementApi* | [**get_env_clusters**](docs/apis/tags/AppManagementApi.md#get_env_clusters) | **get** /openapi/v1/apps/{appId}/envclusters | 获取应用的环境集群信息 (original openapi) -*AppManagementApi* | [**update_app**](docs/apis/tags/AppManagementApi.md#update_app) | **put** /openapi/v1/apps/{appId} | 更新应用(new added) -*AppNamespaceManagementApi* | [**create_app_namespace**](docs/apis/tags/AppNamespaceManagementApi.md#create_app_namespace) | **post** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace (original openapi) -*AppNamespaceManagementApi* | [**delete_app_namespace**](docs/apis/tags/AppNamespaceManagementApi.md#delete_app_namespace) | **delete** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace (new added) -*AppNamespaceManagementApi* | [**find_app_namespace**](docs/apis/tags/AppNamespaceManagementApi.md#find_app_namespace) | **get** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace (new added) -*AppNamespaceManagementApi* | [**find_app_namespace_usage**](docs/apis/tags/AppNamespaceManagementApi.md#find_app_namespace_usage) | **get** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage | 查询appnamespace使用情况(new added) -*AppNamespaceManagementApi* | [**get_app_namespaces**](docs/apis/tags/AppNamespaceManagementApi.md#get_app_namespaces) | **get** /openapi/v1/appnamespaces | 获取所有公共AppNamespace (new added) -*AppNamespaceManagementApi* | [**get_app_namespaces_by_app_id**](docs/apis/tags/AppNamespaceManagementApi.md#get_app_namespaces_by_app_id) | **get** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace (new added) -*AppNamespaceManagementApi* | [**get_public_app_namespace_instances**](docs/apis/tags/AppNamespaceManagementApi.md#get_public_app_namespace_instances) | **get** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 (new added) -*ClusterManagementApi* | [**create_cluster**](docs/apis/tags/ClusterManagementApi.md#create_cluster) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters | 创建集群 (original openapi) -*ClusterManagementApi* | [**delete_cluster**](docs/apis/tags/ClusterManagementApi.md#delete_cluster) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 删除集群 (new added) -*ClusterManagementApi* | [**get_cluster**](docs/apis/tags/ClusterManagementApi.md#get_cluster) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} | 获取指定集群信息 (original openapi) -*EnvironmentManagementApi* | [**get_envs**](docs/apis/tags/EnvironmentManagementApi.md#get_envs) | **get** /openapi/v1/envs | 获取所有环境 -*InstanceManagementApi* | [**get_by_namespace**](docs/apis/tags/InstanceManagementApi.md#get_by_namespace) | **get** /openapi/v1/envs/{env}/instances/by-namespace | 根据namespaceName查询实例(new added) -*InstanceManagementApi* | [**get_by_release**](docs/apis/tags/InstanceManagementApi.md#get_by_release) | **get** /openapi/v1/envs/{env}/instances/by-release | 根据发布版本查询实例(支持分页) (new added) -*InstanceManagementApi* | [**get_by_releases_and_namespace_not_in**](docs/apis/tags/InstanceManagementApi.md#get_by_releases_and_namespace_not_in) | **get** /openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in | 查询不在指定发布版本中的实例 (new added) -*InstanceManagementApi* | [**get_instance_count_by_namespace**](docs/apis/tags/InstanceManagementApi.md#get_instance_count_by_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 (original openapi) -*ItemManagementApi* | [**batch_update_items_by_text**](docs/apis/tags/ItemManagementApi.md#batch_update_items_by_text) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 通过文本批量修改配置项 (new added) -*ItemManagementApi* | [**compare_items**](docs/apis/tags/ItemManagementApi.md#compare_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff | 对比命名空间配置差异 (new added) -*ItemManagementApi* | [**create_item**](docs/apis/tags/ItemManagementApi.md#create_item) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 (original openapi) -*ItemManagementApi* | [**delete_item**](docs/apis/tags/ItemManagementApi.md#delete_item) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置项 (original openapi) -*ItemManagementApi* | [**delete_item_by_encoded_key**](docs/apis/tags/ItemManagementApi.md#delete_item_by_encoded_key) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key删除配置项 (original openapi) -*ItemManagementApi* | [**find_branch_items**](docs/apis/tags/ItemManagementApi.md#find_branch_items) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 (new added) -*ItemManagementApi* | [**find_items_by_namespace**](docs/apis/tags/ItemManagementApi.md#find_items_by_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 获取命名空间下的配置项列表 (original openapi) -*ItemManagementApi* | [**get_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/revocation | 撤销配置项更改 (new added) -*ItemManagementApi* | [**sync_items**](docs/apis/tags/ItemManagementApi.md#sync_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize | 同步配置项到多个命名空间 (new added) -*ItemManagementApi* | [**syntax_check**](docs/apis/tags/ItemManagementApi.md#syntax_check) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation | 验证配置文本语法 (new added) -*ItemManagementApi* | [**update_item**](docs/apis/tags/ItemManagementApi.md#update_item) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 更新配置项 (original openapi) -*ItemManagementApi* | [**update_item_by_encoded_key**](docs/apis/tags/ItemManagementApi.md#update_item_by_encoded_key) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key更新配置项 (original openapi) -*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**](docs/apis/tags/NamespaceBranchManagementApi.md#merge) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 (original openapi) -*NamespaceBranchManagementApi* | [**merge_branch**](docs/apis/tags/NamespaceBranchManagementApi.md#merge_branch) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 (new added) -*NamespaceBranchManagementApi* | [**update_branch_rules**](docs/apis/tags/NamespaceBranchManagementApi.md#update_branch_rules) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules | 更新分支灰度发布规则 (original openapi) -*NamespaceLockManagementApi* | [**get_namespace_lock**](docs/apis/tags/NamespaceLockManagementApi.md#get_namespace_lock) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 (original openapi) -*NamespaceManagementApi* | [**create_missing_namespaces**](docs/apis/tags/NamespaceManagementApi.md#create_missing_namespaces) | **post** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces | 创建缺失的Namespace (new added) -*NamespaceManagementApi* | [**create_namespaces**](docs/apis/tags/NamespaceManagementApi.md#create_namespaces) | **post** /openapi/v1/namespaces | 创建Namespace (new added) -*NamespaceManagementApi* | [**delete_namespace**](docs/apis/tags/NamespaceManagementApi.md#delete_namespace) | **delete** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} | 删除指定的Namespace (new added) -*NamespaceManagementApi* | [**find_missing_namespaces**](docs/apis/tags/NamespaceManagementApi.md#find_missing_namespaces) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces | 查找缺失的Namespace (new added) -*NamespaceManagementApi* | [**find_namespace**](docs/apis/tags/NamespaceManagementApi.md#find_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace (original openapi) -*NamespaceManagementApi* | [**find_namespace_usage**](docs/apis/tags/NamespaceManagementApi.md#find_namespace_usage) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage | 查询namespace使用情况(new added) -*NamespaceManagementApi* | [**find_namespaces**](docs/apis/tags/NamespaceManagementApi.md#find_namespaces) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取指定集群下的所有Namespace (original openapi) -*NamespaceManagementApi* | [**find_public_namespace_for_associated_namespace**](docs/apis/tags/NamespaceManagementApi.md#find_public_namespace_for_associated_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace | 查询关联Namespace对应的公共Namespace详情 (new added) -*NamespaceManagementApi* | [**get_namespaces_release_status**](docs/apis/tags/NamespaceManagementApi.md#get_namespaces_release_status) | **get** /openapi/v1/apps/{appId}/namespaces/releases/status | 获取应用下所有Namespace的发布状态 (new added) -*OrganizationManagementApi* | [**get_organization**](docs/apis/tags/OrganizationManagementApi.md#get_organization) | **get** /openapi/v1/organizations | 获取所有组织信息 (original openapi) -*PermissionManagementApi* | [**add_create_application_role_to_users**](docs/apis/tags/PermissionManagementApi.md#add_create_application_role_to_users) | **post** /openapi/v1/system/roles/create-application | 分配建应用角色 (new added) -*PermissionManagementApi* | [**add_manage_app_master_role_to_user**](docs/apis/tags/PermissionManagementApi.md#add_manage_app_master_role_to_user) | **post** /openapi/v1/apps/{appId}/roles/master | 分配AppMaster (new added) -*PermissionManagementApi* | [**assign_app_role_to_user**](docs/apis/tags/PermissionManagementApi.md#assign_app_role_to_user) | **post** /openapi/v1/apps/{appId}/roles/{roleType} | 分配应用角色 (new added) -*PermissionManagementApi* | [**assign_cluster_namespace_role_to_user**](docs/apis/tags/PermissionManagementApi.md#assign_cluster_namespace_role_to_user) | **post** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/roles/{roleType} | 分配集群Namespace角色 (new added) -*PermissionManagementApi* | [**assign_namespace_env_role_to_user**](docs/apis/tags/PermissionManagementApi.md#assign_namespace_env_role_to_user) | **post** /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType} | 分配环境Namespace角色 (new added) -*PermissionManagementApi* | [**assign_namespace_role_to_user**](docs/apis/tags/PermissionManagementApi.md#assign_namespace_role_to_user) | **post** /openapi/v1/apps/{appId}/namespaces/{namespaceName}/roles/{roleType} | 分配Namespace角色 (new added) -*PermissionManagementApi* | [**delete_create_application_role_from_user**](docs/apis/tags/PermissionManagementApi.md#delete_create_application_role_from_user) | **delete** /openapi/v1/system/roles/create-application | 移除建应用角色 (new added) -*PermissionManagementApi* | [**get_app_roles**](docs/apis/tags/PermissionManagementApi.md#get_app_roles) | **get** /openapi/v1/apps/{appId}/role-users | 获取应用角色用户 (new added) -*PermissionManagementApi* | [**get_cluster_namespace_roles**](docs/apis/tags/PermissionManagementApi.md#get_cluster_namespace_roles) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/role-users | 获取集群Namespace用户 (new added) -*PermissionManagementApi* | [**get_create_application_role_users**](docs/apis/tags/PermissionManagementApi.md#get_create_application_role_users) | **get** /openapi/v1/system/roles/create-application/role-users | 获取建应用用户 (new added) -*PermissionManagementApi* | [**get_namespace_env_role_users**](docs/apis/tags/PermissionManagementApi.md#get_namespace_env_role_users) | **get** /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/role-users | 获取环境Namespace用户 (new added) -*PermissionManagementApi* | [**get_namespace_roles**](docs/apis/tags/PermissionManagementApi.md#get_namespace_roles) | **get** /openapi/v1/apps/{appId}/namespaces/{namespaceName}/role-users | 获取Namespace用户 (new added) -*PermissionManagementApi* | [**has_app_permission**](docs/apis/tags/PermissionManagementApi.md#has_app_permission) | **get** /openapi/v1/apps/{appId}/permissions/{permissionType} | 校验应用权限 (new added) -*PermissionManagementApi* | [**has_cluster_namespace_permission**](docs/apis/tags/PermissionManagementApi.md#has_cluster_namespace_permission) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permissions/{permissionType} | 校验集群Namespace权限 (new added) -*PermissionManagementApi* | [**has_create_application_permission**](docs/apis/tags/PermissionManagementApi.md#has_create_application_permission) | **get** /openapi/v1/system/roles/create-application | 校验建应用权限 (new added) -*PermissionManagementApi* | [**has_env_namespace_permission**](docs/apis/tags/PermissionManagementApi.md#has_env_namespace_permission) | **get** /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/permissions/{permissionType} | 校验环境Namespace权限 (new added) -*PermissionManagementApi* | [**has_namespace_permission**](docs/apis/tags/PermissionManagementApi.md#has_namespace_permission) | **get** /openapi/v1/apps/{appId}/namespaces/{namespaceName}/permissions/{permissionType} | 校验Namespace权限 (new added) -*PermissionManagementApi* | [**has_root_permission**](docs/apis/tags/PermissionManagementApi.md#has_root_permission) | **get** /openapi/v1/permissions/root | 校验Root权限 (new added) -*PermissionManagementApi* | [**init_app_permission**](docs/apis/tags/PermissionManagementApi.md#init_app_permission) | **post** /openapi/v1/apps/{appId}/namespaces/{namespaceName}/permission-init | 初始化应用权限 (new added) -*PermissionManagementApi* | [**init_cluster_namespace_permission**](docs/apis/tags/PermissionManagementApi.md#init_cluster_namespace_permission) | **post** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permission-init | 初始化集群Namespace权限 (new added) -*PermissionManagementApi* | [**is_manage_app_master_permission_enabled**](docs/apis/tags/PermissionManagementApi.md#is_manage_app_master_permission_enabled) | **get** /openapi/v1/system/role/manage-app-master | 校验AppMaster开关 (new added) -*PermissionManagementApi* | [**remove_app_role_from_user**](docs/apis/tags/PermissionManagementApi.md#remove_app_role_from_user) | **delete** /openapi/v1/apps/{appId}/roles/{roleType} | 移除应用角色 (new added) -*PermissionManagementApi* | [**remove_cluster_namespace_role_from_user**](docs/apis/tags/PermissionManagementApi.md#remove_cluster_namespace_role_from_user) | **delete** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/roles/{roleType} | 移除集群Namespace角色 (new added) -*PermissionManagementApi* | [**remove_manage_app_master_role_from_user**](docs/apis/tags/PermissionManagementApi.md#remove_manage_app_master_role_from_user) | **delete** /openapi/v1/apps/{appId}/roles/master | 移除AppMaster (new added) -*PermissionManagementApi* | [**remove_namespace_env_role_from_user**](docs/apis/tags/PermissionManagementApi.md#remove_namespace_env_role_from_user) | **delete** /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType} | 移除环境Namespace角色 (new added) -*PermissionManagementApi* | [**remove_namespace_role_from_user**](docs/apis/tags/PermissionManagementApi.md#remove_namespace_role_from_user) | **delete** /openapi/v1/apps/{appId}/namespaces/{namespaceName}/roles/{roleType} | 移除Namespace角色 (new added) -*PortalManagementApi* | [**add_favorite**](docs/apis/tags/PortalManagementApi.md#add_favorite) | **post** /openapi/v1/favorites | 添加收藏(new added) -*PortalManagementApi* | [**assign_role_to_consumer**](docs/apis/tags/PortalManagementApi.md#assign_role_to_consumer) | **post** /openapi/v1/consumers/{token}/assign-role | 给消费者授权(new added) -*PortalManagementApi* | [**check_export_app_config**](docs/apis/tags/PortalManagementApi.md#check_export_app_config) | **head** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export | 检查应用配置导出权限(new added) -*PortalManagementApi* | [**check_system_health**](docs/apis/tags/PortalManagementApi.md#check_system_health) | **get** /openapi/v1/system-info/health | 检查系统实例健康状态(new added) -*PortalManagementApi* | [**create_consumer**](docs/apis/tags/PortalManagementApi.md#create_consumer) | **post** /openapi/v1/consumers | 创建开放平台消费者(new added) -*PortalManagementApi* | [**create_or_update_config_db_config**](docs/apis/tags/PortalManagementApi.md#create_or_update_config_db_config) | **post** /openapi/v1/server/envs/{env}/config-db/config | 创建或更新Config DB配置(new added) -*PortalManagementApi* | [**create_or_update_portal_db_config**](docs/apis/tags/PortalManagementApi.md#create_or_update_portal_db_config) | **post** /openapi/v1/server/portal-db/config | 创建或更新Portal DB配置(new added) -*PortalManagementApi* | [**delete_config_db_config**](docs/apis/tags/PortalManagementApi.md#delete_config_db_config) | **delete** /openapi/v1/server/envs/{env}/config-db/config | 删除Config DB配置(new added) -*PortalManagementApi* | [**delete_consumer**](docs/apis/tags/PortalManagementApi.md#delete_consumer) | **delete** /openapi/v1/consumers/by-appId | 按应用ID删除消费者(new added) -*PortalManagementApi* | [**delete_favorite**](docs/apis/tags/PortalManagementApi.md#delete_favorite) | **delete** /openapi/v1/favorites/{favoriteId} | 删除收藏(new added) -*PortalManagementApi* | [**delete_portal_db_config**](docs/apis/tags/PortalManagementApi.md#delete_portal_db_config) | **delete** /openapi/v1/server/portal-db/config | 删除Portal DB配置(new added) -*PortalManagementApi* | [**export_all_configs**](docs/apis/tags/PortalManagementApi.md#export_all_configs) | **get** /openapi/v1/configs/export | 导出所有配置(new added) -*PortalManagementApi* | [**export_app_config**](docs/apis/tags/PortalManagementApi.md#export_app_config) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export | 导出应用配置(new added) -*PortalManagementApi* | [**export_namespace_items**](docs/apis/tags/PortalManagementApi.md#export_namespace_items) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export | 导出命名空间配置项(new added) -*PortalManagementApi* | [**find_all_config_db_config**](docs/apis/tags/PortalManagementApi.md#find_all_config_db_config) | **get** /openapi/v1/server/envs/{env}/config-db/config/find-all-config | 查询指定环境全部Config DB配置(new added) -*PortalManagementApi* | [**find_all_portal_db_config**](docs/apis/tags/PortalManagementApi.md#find_all_portal_db_config) | **get** /openapi/v1/server/portal-db/config/find-all-config | 查询全部Portal DB配置(new added) -*PortalManagementApi* | [**find_audit_data_influences_by_field**](docs/apis/tags/PortalManagementApi.md#find_audit_data_influences_by_field) | **get** /openapi/v1/apollo/audit/logs/dataInfluences/field | 查询审计数据影响(new added) -*PortalManagementApi* | [**find_audit_logs**](docs/apis/tags/PortalManagementApi.md#find_audit_logs) | **get** /openapi/v1/apollo/audit/logs | 查询审计日志(new added) -*PortalManagementApi* | [**find_audit_logs_by_op_name**](docs/apis/tags/PortalManagementApi.md#find_audit_logs_by_op_name) | **get** /openapi/v1/apollo/audit/logs/opName | 按操作名查询审计日志(new added) -*PortalManagementApi* | [**find_audit_trace_details**](docs/apis/tags/PortalManagementApi.md#find_audit_trace_details) | **get** /openapi/v1/apollo/audit/trace | 查询审计链路详情(new added) -*PortalManagementApi* | [**find_commits**](docs/apis/tags/PortalManagementApi.md#find_commits) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits | 查询命名空间提交记录(new added) -*PortalManagementApi* | [**find_favorites**](docs/apis/tags/PortalManagementApi.md#find_favorites) | **get** /openapi/v1/favorites | 查询收藏(new added) -*PortalManagementApi* | [**find_release_histories_by_namespace**](docs/apis/tags/PortalManagementApi.md#find_release_histories_by_namespace) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories | 查询命名空间发布历史(new added) -*PortalManagementApi* | [**get_audit_properties**](docs/apis/tags/PortalManagementApi.md#get_audit_properties) | **get** /openapi/v1/apollo/audit/properties | 获取审计配置(new added) -*PortalManagementApi* | [**get_consumer_list**](docs/apis/tags/PortalManagementApi.md#get_consumer_list) | **get** /openapi/v1/consumers | 查询开放平台消费者列表(new added) -*PortalManagementApi* | [**get_consumer_token_by_app_id**](docs/apis/tags/PortalManagementApi.md#get_consumer_token_by_app_id) | **get** /openapi/v1/consumer-tokens/by-appId | 按应用ID查询消费者Token(new added) -*PortalManagementApi* | [**get_page_settings**](docs/apis/tags/PortalManagementApi.md#get_page_settings) | **get** /openapi/v1/page-settings | 获取Portal页面配置(new added) -*PortalManagementApi* | [**get_system_info**](docs/apis/tags/PortalManagementApi.md#get_system_info) | **get** /openapi/v1/system-info | 获取系统信息(new added) -*PortalManagementApi* | [**import_all_configs**](docs/apis/tags/PortalManagementApi.md#import_all_configs) | **post** /openapi/v1/configs/import | 导入所有配置(new added) -*PortalManagementApi* | [**import_app_config**](docs/apis/tags/PortalManagementApi.md#import_app_config) | **post** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import | 导入应用配置(new added) -*PortalManagementApi* | [**import_config**](docs/apis/tags/PortalManagementApi.md#import_config) | **post** /openapi/v1/import | 导入配置兼容入口(new added) -*PortalManagementApi* | [**import_namespace_items**](docs/apis/tags/PortalManagementApi.md#import_namespace_items) | **post** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import | 导入命名空间配置项(new added) -*PortalManagementApi* | [**search_apps_by_app_id_or_name**](docs/apis/tags/PortalManagementApi.md#search_apps_by_app_id_or_name) | **get** /openapi/v1/apps/search/by-appid-or-name | 按应用ID或名称搜索应用(new added) -*PortalManagementApi* | [**search_audit_logs**](docs/apis/tags/PortalManagementApi.md#search_audit_logs) | **get** /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator | 搜索审计日志(new added) -*PortalManagementApi* | [**search_item_info_by_key_or_value**](docs/apis/tags/PortalManagementApi.md#search_item_info_by_key_or_value) | **get** /openapi/v1/global-search/item-info/by-key-or-value | 按Key或Value全局搜索配置(new added) -*PortalManagementApi* | [**top_favorite**](docs/apis/tags/PortalManagementApi.md#top_favorite) | **put** /openapi/v1/favorites/{favoriteId} | 收藏置顶(new added) -*ReleaseManagementApi* | [**compare_release**](docs/apis/tags/ReleaseManagementApi.md#compare_release) | **get** /openapi/v1/envs/{env}/releases/comparison | Compare two releases -*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* | [**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* | [**rollback**](docs/apis/tags/ReleaseManagementApi.md#rollback) | **put** /openapi/v1/envs/{env}/releases/{releaseId}/rollback | 回滚发布 (original openapi) -*UserManagementApi* | [**change_user_enabled**](docs/apis/tags/UserManagementApi.md#change_user_enabled) | **put** /openapi/v1/users/enabled | 修改用户启用状态(new added) -*UserManagementApi* | [**create_or_update_user**](docs/apis/tags/UserManagementApi.md#create_or_update_user) | **post** /openapi/v1/users | 创建或更新用户(new added) -*UserManagementApi* | [**get_current_user**](docs/apis/tags/UserManagementApi.md#get_current_user) | **get** /openapi/v1/user | 获取当前Portal用户(new added) -*UserManagementApi* | [**get_user_by_user_id**](docs/apis/tags/UserManagementApi.md#get_user_by_user_id) | **get** /openapi/v1/users/{userId} | 获取指定用户(new added) -*UserManagementApi* | [**search_users**](docs/apis/tags/UserManagementApi.md#search_users) | **get** /openapi/v1/users | 搜索用户(new added) - -## Documentation For Models - - - [ExceptionResponse](docs/models/ExceptionResponse.md) - - [MapString](docs/models/MapString.md) - - [NamespaceGrayDelReleaseDTO](docs/models/NamespaceGrayDelReleaseDTO.md) - - [NamespaceReleaseDTO](docs/models/NamespaceReleaseDTO.md) - - [OpenAccessKeyDTO](docs/models/OpenAccessKeyDTO.md) - - [OpenAppDTO](docs/models/OpenAppDTO.md) - - [OpenAppNamespaceDTO](docs/models/OpenAppNamespaceDTO.md) - - [OpenAppRoleUserDTO](docs/models/OpenAppRoleUserDTO.md) - - [OpenClusterDTO](docs/models/OpenClusterDTO.md) - - [OpenClusterNamespaceRoleUserDTO](docs/models/OpenClusterNamespaceRoleUserDTO.md) - - [OpenCreateAppDTO](docs/models/OpenCreateAppDTO.md) - - [OpenCreateNamespaceDTO](docs/models/OpenCreateNamespaceDTO.md) - - [OpenEnvClusterDTO](docs/models/OpenEnvClusterDTO.md) - - [OpenEnvClusterInfo](docs/models/OpenEnvClusterInfo.md) - - [OpenEnvNamespaceRoleUserDTO](docs/models/OpenEnvNamespaceRoleUserDTO.md) - - [OpenGrayReleaseRuleDTO](docs/models/OpenGrayReleaseRuleDTO.md) - - [OpenGrayReleaseRuleItemDTO](docs/models/OpenGrayReleaseRuleItemDTO.md) - - [OpenInstanceConfigDTO](docs/models/OpenInstanceConfigDTO.md) - - [OpenInstanceDTO](docs/models/OpenInstanceDTO.md) - - [OpenInstancePageDTO](docs/models/OpenInstancePageDTO.md) - - [OpenItemDTO](docs/models/OpenItemDTO.md) - - [OpenItemDiffDTO](docs/models/OpenItemDiffDTO.md) - - [OpenItemExtendDTO](docs/models/OpenItemExtendDTO.md) - - [OpenItemPageDTO](docs/models/OpenItemPageDTO.md) - - [OpenMissEnvDTO](docs/models/OpenMissEnvDTO.md) - - [OpenNamespaceDTO](docs/models/OpenNamespaceDTO.md) - - [OpenNamespaceExtendDTO](docs/models/OpenNamespaceExtendDTO.md) - - [OpenNamespaceIdentifier](docs/models/OpenNamespaceIdentifier.md) - - [OpenNamespaceLockDTO](docs/models/OpenNamespaceLockDTO.md) - - [OpenNamespaceRoleUserDTO](docs/models/OpenNamespaceRoleUserDTO.md) - - [OpenNamespaceSyncDTO](docs/models/OpenNamespaceSyncDTO.md) - - [OpenNamespaceTextModel](docs/models/OpenNamespaceTextModel.md) - - [OpenNamespaceUsageDTO](docs/models/OpenNamespaceUsageDTO.md) - - [OpenOrganizationDto](docs/models/OpenOrganizationDto.md) - - [OpenPermissionConditionDTO](docs/models/OpenPermissionConditionDTO.md) - - [OpenReleaseChangeDTO](docs/models/OpenReleaseChangeDTO.md) - - [OpenReleaseDTO](docs/models/OpenReleaseDTO.md) - - [OpenReleaseDiffDTO](docs/models/OpenReleaseDiffDTO.md) - - [OpenUserDTO](docs/models/OpenUserDTO.md) - - [OpenUserInfoDTO](docs/models/OpenUserInfoDTO.md) - - [StringToStringBoolMap](docs/models/StringToStringBoolMap.md) - -## Documentation For Authorization - -Authentication schemes defined for the API: - -### ApiKeyAuth - -- **Type**: API key -- **API key parameter name**: Authorization -- **Location**: HTTP header - - -## Author - - - - - - - - - - - - - - - - - -## 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 deleted file mode 100644 index ff55244e..00000000 --- a/python/apollo_openapi/__init__.py +++ /dev/null @@ -1,27 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -""" - 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 - - Generated by: https://openapi-generator.tech -""" - -__version__ = "0.3.8" - -# import ApiClient -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_client.py b/python/apollo_openapi/api_client.py deleted file mode 100644 index 238e8d97..00000000 --- a/python/apollo_openapi/api_client.py +++ /dev/null @@ -1,1498 +0,0 @@ -# coding: utf-8 -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -from decimal import Decimal -import enum -import email -import json -import os -import io -import atexit -from multiprocessing.pool import ThreadPool -import re -import tempfile -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 - -import frozendict - -from apollo_openapi import rest -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, -) - - -class RequestField(RequestFieldBase): - def __eq__(self, other): - if not isinstance(other, RequestField): - return False - return self.__dict__ == other.__dict__ - - -class JSONEncoder(json.JSONEncoder): - compact_separators = (',', ':') - - 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 __iter__(self): - return self - - def __next__(self): - if self.first: - self.first = False - return self.prefix - return self.separator - - -class ParameterSerializerBase: - @classmethod - def _get_default_explode(cls, style: ParameterStyle) -> bool: - return False - - @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} - - @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 __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] - ) - - @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()] - ) - - @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 - """ - 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 _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 - ) - - -class StyleSimpleSerializer(ParameterSerializerBase): - - def _serialize_simple( - self, - 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 - ) - - -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);?.*") - - @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() - - @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 - ) - ) - - 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) - - -class PathParameter(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.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 __serialize_matrix( - 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 __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): - - 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 - ) - - 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 __serialize_pipe_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 __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) - - 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('', '|') - - 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)) - - -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 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 - ) - - @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 - - -@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 - - -@dataclass -class ApiResponse: - response: urllib3.HTTPResponse - body: typing.Union[Unset, Schema] = unset - headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset - - 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 - - -@dataclass -class ApiResponseWithoutDeserialization(ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[Unset, typing.Type[Schema]] = unset - headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset - - -class OpenApiResponse(JSONDetector): - __filename_content_disposition_pattern = re.compile('filename="(.+?)"') - - 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) - - 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: - 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 response.data - - @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() - } - - 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: - 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 - ) - - -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. - - 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. - """ - - _pool = None - - def __init__( - self, - 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 - ): - if configuration is None: - configuration = Configuration() - self.configuration = configuration - self.pool_threads = pool_threads - - 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.3.8/python' - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - 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'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - 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: - - # header parameters - used_headers = HTTPHeaderDict(self.default_headers) - if self.cookie: - headers['Cookie'] = self.cookie - - # auth setting - self.update_params_for_auth(used_headers, - auth_settings, resource_path, method, body) - - # must happen after cookie setting and auth setting in case user is overriding those - if headers: - used_headers.update(headers) - - # 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, - 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 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 async_req: - return self.__call_api( - resource_path, - method, - headers, - body, - fields, - auth_settings, - stream, - timeout, - host, - ) - - return self.pool.apply_async( - self.__call_api, - ( - resource_path, - method, - headers, - body, - json, - fields, - auth_settings, - stream, - timeout, - host, - ) - ) - - 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( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def update_params_for_auth(self, headers, auth_settings, - resource_path, method, body): - """Updates header and query params based on authentication setting. - - :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(). - """ - if not auth_settings: - return - - 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`' - ) - - -class Api: - """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: typing.Optional[ApiClient] = None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - @staticmethod - def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]): - """ - 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 - """ - 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 - ) - ) - - 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 - ) - ) - - 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: - 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]], ...] - - -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') - """ - 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. - - 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: - - 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 - - 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/apis/__init__.py b/python/apollo_openapi/apis/__init__.py deleted file mode 100644 index 5ca66b80..00000000 --- a/python/apollo_openapi/apis/__init__.py +++ /dev/null @@ -1,3 +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 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 deleted file mode 100644 index 037ecff8..00000000 --- a/python/apollo_openapi/apis/path_to_api.py +++ /dev/null @@ -1,335 +0,0 @@ -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_env_cluster_info import OpenapiV1AppsAppIdEnvClusterInfo -from apollo_openapi.apis.paths.openapi_v1_apps_envs_env import OpenapiV1AppsEnvsEnv -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_miss_envs import OpenapiV1AppsAppIdMissEnvs -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKey -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_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_diff import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsDiff -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSynchronize -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidation -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevocation -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name import OpenapiV1EnvsEnvAppsAppIdClustersClusterName -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters import OpenapiV1EnvsEnvAppsAppIdClusters -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleases -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_active import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActive -from apollo_openapi.apis.paths.openapi_v1_envs_env_releases_comparison import OpenapiV1EnvsEnvReleasesComparison -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_instances_by_release import OpenapiV1EnvsEnvInstancesByRelease -from apollo_openapi.apis.paths.openapi_v1_envs_env_instances_by_namespace import OpenapiV1EnvsEnvInstancesByNamespace -from apollo_openapi.apis.paths.openapi_v1_envs_env_instances_by_namespace_and_releases_not_in import OpenapiV1EnvsEnvInstancesByNamespaceAndReleasesNotIn -from apollo_openapi.apis.paths.openapi_v1_namespaces import OpenapiV1Namespaces -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name_usage import OpenapiV1AppsAppIdAppnamespacesNamespaceNameUsage -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_appnamespaces import OpenapiV1AppsAppIdAppnamespaces -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespaces -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceName -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameAssociatedPublicNamespace -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLock -from apollo_openapi.apis.paths.openapi_v1_appnamespaces import OpenapiV1Appnamespaces -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name import OpenapiV1AppsAppIdAppnamespacesNamespaceName -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_namespaces_releases_status import OpenapiV1AppsAppIdNamespacesReleasesStatus -from apollo_openapi.apis.paths.openapi_v1_envs_env_appnamespaces_public_namespace_name_instances import OpenapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstances -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameUsage -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameMissingNamespaces -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceName -from apollo_openapi.apis.paths.openapi_v1_organizations import OpenapiV1Organizations -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranches -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchName -from apollo_openapi.apis.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules import OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRules -from apollo_openapi.apis.paths.openapi_v1_envs import OpenapiV1Envs -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_namespaces_namespace_name_permission_init import OpenapiV1AppsAppIdNamespacesNamespaceNamePermissionInit -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesPermissionInit -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_permissions_permission_type import OpenapiV1AppsAppIdPermissionsPermissionType -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type import OpenapiV1AppsAppIdNamespacesNamespaceNamePermissionsPermissionType -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type import OpenapiV1AppsAppIdEnvsEnvNamespacesNamespaceNamePermissionsPermissionType -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesPermissionsPermissionType -from apollo_openapi.apis.paths.openapi_v1_permissions_root import OpenapiV1PermissionsRoot -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users import OpenapiV1AppsAppIdEnvsEnvNamespacesNamespaceNameRoleUsers -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type import OpenapiV1AppsAppIdEnvsEnvNamespacesNamespaceNameRolesRoleType -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesRoleUsers -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameRolesRoleType -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_namespaces_namespace_name_role_users import OpenapiV1AppsAppIdNamespacesNamespaceNameRoleUsers -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type import OpenapiV1AppsAppIdNamespacesNamespaceNameRolesRoleType -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_role_users import OpenapiV1AppsAppIdRoleUsers -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_roles_role_type import OpenapiV1AppsAppIdRolesRoleType -from apollo_openapi.apis.paths.openapi_v1_system_roles_create_application import OpenapiV1SystemRolesCreateApplication -from apollo_openapi.apis.paths.openapi_v1_system_roles_create_application_role_users import OpenapiV1SystemRolesCreateApplicationRoleUsers -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_roles_master import OpenapiV1AppsAppIdRolesMaster -from apollo_openapi.apis.paths.openapi_v1_system_role_manage_app_master import OpenapiV1SystemRoleManageAppMaster -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_accesskeys import OpenapiV1AppsAppIdEnvsEnvAccesskeys -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id import OpenapiV1AppsAppIdEnvsEnvAccesskeysAccessKeyId -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation import OpenapiV1AppsAppIdEnvsEnvAccesskeysAccessKeyIdActivation -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation import OpenapiV1AppsAppIdEnvsEnvAccesskeysAccessKeyIdDeactivation -from apollo_openapi.apis.paths.openapi_v1_user import OpenapiV1User -from apollo_openapi.apis.paths.openapi_v1_users import OpenapiV1Users -from apollo_openapi.apis.paths.openapi_v1_users_user_id import OpenapiV1UsersUserId -from apollo_openapi.apis.paths.openapi_v1_users_enabled import OpenapiV1UsersEnabled -from apollo_openapi.apis.paths.openapi_v1_apollo_audit_properties import OpenapiV1ApolloAuditProperties -from apollo_openapi.apis.paths.openapi_v1_apollo_audit_logs import OpenapiV1ApolloAuditLogs -from apollo_openapi.apis.paths.openapi_v1_apollo_audit_logs_op_name import OpenapiV1ApolloAuditLogsOpName -from apollo_openapi.apis.paths.openapi_v1_apollo_audit_trace import OpenapiV1ApolloAuditTrace -from apollo_openapi.apis.paths.openapi_v1_apollo_audit_logs_data_influences_field import OpenapiV1ApolloAuditLogsDataInfluencesField -from apollo_openapi.apis.paths.openapi_v1_apollo_audit_logs_by_name_or_type_or_operator import OpenapiV1ApolloAuditLogsByNameOrTypeOrOperator -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameCommits -from apollo_openapi.apis.paths.openapi_v1_page_settings import OpenapiV1PageSettings -from apollo_openapi.apis.paths.openapi_v1_consumers import OpenapiV1Consumers -from apollo_openapi.apis.paths.openapi_v1_consumer_tokens_by_app_id import OpenapiV1ConsumerTokensByAppId -from apollo_openapi.apis.paths.openapi_v1_consumers_token_assign_role import OpenapiV1ConsumersTokenAssignRole -from apollo_openapi.apis.paths.openapi_v1_consumers_by_app_id import OpenapiV1ConsumersByAppId -from apollo_openapi.apis.paths.openapi_v1_import import OpenapiV1Import -from apollo_openapi.apis.paths.openapi_v1_favorites import OpenapiV1Favorites -from apollo_openapi.apis.paths.openapi_v1_favorites_favorite_id import OpenapiV1FavoritesFavoriteId -from apollo_openapi.apis.paths.openapi_v1_global_search_item_info_by_key_or_value import OpenapiV1GlobalSearchItemInfoByKeyOrValue -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameReleasesHistories -from apollo_openapi.apis.paths.openapi_v1_server_portal_db_config import OpenapiV1ServerPortalDbConfig -from apollo_openapi.apis.paths.openapi_v1_server_envs_env_config_db_config import OpenapiV1ServerEnvsEnvConfigDbConfig -from apollo_openapi.apis.paths.openapi_v1_server_portal_db_config_find_all_config import OpenapiV1ServerPortalDbConfigFindAllConfig -from apollo_openapi.apis.paths.openapi_v1_server_envs_env_config_db_config_find_all_config import OpenapiV1ServerEnvsEnvConfigDbConfigFindAllConfig -from apollo_openapi.apis.paths.openapi_v1_system_info import OpenapiV1SystemInfo -from apollo_openapi.apis.paths.openapi_v1_system_info_health import OpenapiV1SystemInfoHealth -from apollo_openapi.apis.paths.openapi_v1_configs_export import OpenapiV1ConfigsExport -from apollo_openapi.apis.paths.openapi_v1_configs_import import OpenapiV1ConfigsImport -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameExport -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameImport -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsExport -from apollo_openapi.apis.paths.openapi_v1_apps_search_by_appid_or_name import OpenapiV1AppsSearchByAppidOrName -from apollo_openapi.apis.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import import OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsImport - -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_ENVCLUSTERINFO: OpenapiV1AppsAppIdEnvClusterInfo, - PathValues.OPENAPI_V1_APPS_ENVS_ENV: OpenapiV1AppsEnvsEnv, - PathValues.OPENAPI_V1_APPS_APP_ID_MISSENVS: OpenapiV1AppsAppIdMissEnvs, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKey, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItems, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKey, - 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_DIFF: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsDiff, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNCHRONIZE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSynchronize, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_VALIDATION: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidation, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVOCATION: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevocation, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterName, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS: OpenapiV1EnvsEnvAppsAppIdClusters, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleases, - 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_ACTIVE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActive, - PathValues.OPENAPI_V1_ENVS_ENV_RELEASES_COMPARISON: OpenapiV1EnvsEnvReleasesComparison, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstances, - PathValues.OPENAPI_V1_ENVS_ENV_INSTANCES_BYRELEASE: OpenapiV1EnvsEnvInstancesByRelease, - PathValues.OPENAPI_V1_ENVS_ENV_INSTANCES_BYNAMESPACE: OpenapiV1EnvsEnvInstancesByNamespace, - PathValues.OPENAPI_V1_ENVS_ENV_INSTANCES_BYNAMESPACEANDRELEASESNOTIN: OpenapiV1EnvsEnvInstancesByNamespaceAndReleasesNotIn, - PathValues.OPENAPI_V1_NAMESPACES: OpenapiV1Namespaces, - PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME_USAGE: OpenapiV1AppsAppIdAppnamespacesNamespaceNameUsage, - PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES: OpenapiV1AppsAppIdAppnamespaces, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespaces, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceName, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ASSOCIATEDPUBLICNAMESPACE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameAssociatedPublicNamespace, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LOCK: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLock, - PathValues.OPENAPI_V1_APPNAMESPACES: OpenapiV1Appnamespaces, - PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME: OpenapiV1AppsAppIdAppnamespacesNamespaceName, - PathValues.OPENAPI_V1_APPS_APP_ID_NAMESPACES_RELEASES_STATUS: OpenapiV1AppsAppIdNamespacesReleasesStatus, - PathValues.OPENAPI_V1_ENVS_ENV_APPNAMESPACES_PUBLIC_NAMESPACE_NAME_INSTANCES: OpenapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstances, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_USAGE: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameUsage, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_MISSINGNAMESPACES: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameMissingNamespaces, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceName, - PathValues.OPENAPI_V1_ORGANIZATIONS: OpenapiV1Organizations, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranches, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchName, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RULES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRules, - PathValues.OPENAPI_V1_ENVS: OpenapiV1Envs, - PathValues.OPENAPI_V1_APPS_APP_ID_NAMESPACES_NAMESPACE_NAME_PERMISSIONINIT: OpenapiV1AppsAppIdNamespacesNamespaceNamePermissionInit, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_PERMISSIONINIT: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesPermissionInit, - PathValues.OPENAPI_V1_APPS_APP_ID_PERMISSIONS_PERMISSION_TYPE: OpenapiV1AppsAppIdPermissionsPermissionType, - PathValues.OPENAPI_V1_APPS_APP_ID_NAMESPACES_NAMESPACE_NAME_PERMISSIONS_PERMISSION_TYPE: OpenapiV1AppsAppIdNamespacesNamespaceNamePermissionsPermissionType, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_NAMESPACES_NAMESPACE_NAME_PERMISSIONS_PERMISSION_TYPE: OpenapiV1AppsAppIdEnvsEnvNamespacesNamespaceNamePermissionsPermissionType, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_PERMISSIONS_PERMISSION_TYPE: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesPermissionsPermissionType, - PathValues.OPENAPI_V1_PERMISSIONS_ROOT: OpenapiV1PermissionsRoot, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_NAMESPACES_NAMESPACE_NAME_ROLEUSERS: OpenapiV1AppsAppIdEnvsEnvNamespacesNamespaceNameRoleUsers, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_NAMESPACES_NAMESPACE_NAME_ROLES_ROLE_TYPE: OpenapiV1AppsAppIdEnvsEnvNamespacesNamespaceNameRolesRoleType, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_ROLEUSERS: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesRoleUsers, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_ROLES_ROLE_TYPE: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameRolesRoleType, - PathValues.OPENAPI_V1_APPS_APP_ID_NAMESPACES_NAMESPACE_NAME_ROLEUSERS: OpenapiV1AppsAppIdNamespacesNamespaceNameRoleUsers, - PathValues.OPENAPI_V1_APPS_APP_ID_NAMESPACES_NAMESPACE_NAME_ROLES_ROLE_TYPE: OpenapiV1AppsAppIdNamespacesNamespaceNameRolesRoleType, - PathValues.OPENAPI_V1_APPS_APP_ID_ROLEUSERS: OpenapiV1AppsAppIdRoleUsers, - PathValues.OPENAPI_V1_APPS_APP_ID_ROLES_ROLE_TYPE: OpenapiV1AppsAppIdRolesRoleType, - PathValues.OPENAPI_V1_SYSTEM_ROLES_CREATEAPPLICATION: OpenapiV1SystemRolesCreateApplication, - PathValues.OPENAPI_V1_SYSTEM_ROLES_CREATEAPPLICATION_ROLEUSERS: OpenapiV1SystemRolesCreateApplicationRoleUsers, - PathValues.OPENAPI_V1_APPS_APP_ID_ROLES_MASTER: OpenapiV1AppsAppIdRolesMaster, - PathValues.OPENAPI_V1_SYSTEM_ROLE_MANAGEAPPMASTER: OpenapiV1SystemRoleManageAppMaster, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_ACCESSKEYS: OpenapiV1AppsAppIdEnvsEnvAccesskeys, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_ACCESSKEYS_ACCESS_KEY_ID: OpenapiV1AppsAppIdEnvsEnvAccesskeysAccessKeyId, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_ACCESSKEYS_ACCESS_KEY_ID_ACTIVATION: OpenapiV1AppsAppIdEnvsEnvAccesskeysAccessKeyIdActivation, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_ACCESSKEYS_ACCESS_KEY_ID_DEACTIVATION: OpenapiV1AppsAppIdEnvsEnvAccesskeysAccessKeyIdDeactivation, - PathValues.OPENAPI_V1_USER: OpenapiV1User, - PathValues.OPENAPI_V1_USERS: OpenapiV1Users, - PathValues.OPENAPI_V1_USERS_USER_ID: OpenapiV1UsersUserId, - PathValues.OPENAPI_V1_USERS_ENABLED: OpenapiV1UsersEnabled, - PathValues.OPENAPI_V1_APOLLO_AUDIT_PROPERTIES: OpenapiV1ApolloAuditProperties, - PathValues.OPENAPI_V1_APOLLO_AUDIT_LOGS: OpenapiV1ApolloAuditLogs, - PathValues.OPENAPI_V1_APOLLO_AUDIT_LOGS_OP_NAME: OpenapiV1ApolloAuditLogsOpName, - PathValues.OPENAPI_V1_APOLLO_AUDIT_TRACE: OpenapiV1ApolloAuditTrace, - PathValues.OPENAPI_V1_APOLLO_AUDIT_LOGS_DATA_INFLUENCES_FIELD: OpenapiV1ApolloAuditLogsDataInfluencesField, - PathValues.OPENAPI_V1_APOLLO_AUDIT_LOGS_BYNAMEORTYPEOROPERATOR: OpenapiV1ApolloAuditLogsByNameOrTypeOrOperator, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_COMMITS: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameCommits, - PathValues.OPENAPI_V1_PAGESETTINGS: OpenapiV1PageSettings, - PathValues.OPENAPI_V1_CONSUMERS: OpenapiV1Consumers, - PathValues.OPENAPI_V1_CONSUMERTOKENS_BYAPP_ID: OpenapiV1ConsumerTokensByAppId, - PathValues.OPENAPI_V1_CONSUMERS_TOKEN_ASSIGNROLE: OpenapiV1ConsumersTokenAssignRole, - PathValues.OPENAPI_V1_CONSUMERS_BYAPP_ID: OpenapiV1ConsumersByAppId, - PathValues.OPENAPI_V1_IMPORT: OpenapiV1Import, - PathValues.OPENAPI_V1_FAVORITES: OpenapiV1Favorites, - PathValues.OPENAPI_V1_FAVORITES_FAVORITE_ID: OpenapiV1FavoritesFavoriteId, - PathValues.OPENAPI_V1_GLOBALSEARCH_ITEMINFO_BYKEYORVALUE: OpenapiV1GlobalSearchItemInfoByKeyOrValue, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_HISTORIES: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameReleasesHistories, - PathValues.OPENAPI_V1_SERVER_PORTALDB_CONFIG: OpenapiV1ServerPortalDbConfig, - PathValues.OPENAPI_V1_SERVER_ENVS_ENV_CONFIGDB_CONFIG: OpenapiV1ServerEnvsEnvConfigDbConfig, - PathValues.OPENAPI_V1_SERVER_PORTALDB_CONFIG_FINDALLCONFIG: OpenapiV1ServerPortalDbConfigFindAllConfig, - PathValues.OPENAPI_V1_SERVER_ENVS_ENV_CONFIGDB_CONFIG_FINDALLCONFIG: OpenapiV1ServerEnvsEnvConfigDbConfigFindAllConfig, - PathValues.OPENAPI_V1_SYSTEMINFO: OpenapiV1SystemInfo, - PathValues.OPENAPI_V1_SYSTEMINFO_HEALTH: OpenapiV1SystemInfoHealth, - PathValues.OPENAPI_V1_CONFIGS_EXPORT: OpenapiV1ConfigsExport, - PathValues.OPENAPI_V1_CONFIGS_IMPORT: OpenapiV1ConfigsImport, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_EXPORT: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameExport, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_IMPORT: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameImport, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_EXPORT: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsExport, - PathValues.OPENAPI_V1_APPS_SEARCH_BYAPPIDORNAME: OpenapiV1AppsSearchByAppidOrName, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_IMPORT: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsImport, - } -) - -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_ENVCLUSTERINFO: OpenapiV1AppsAppIdEnvClusterInfo, - PathValues.OPENAPI_V1_APPS_ENVS_ENV: OpenapiV1AppsEnvsEnv, - PathValues.OPENAPI_V1_APPS_APP_ID_MISSENVS: OpenapiV1AppsAppIdMissEnvs, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsKey, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItems, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameEncodedItemsKey, - 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_DIFF: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsDiff, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNCHRONIZE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSynchronize, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_VALIDATION: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidation, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVOCATION: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevocation, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterName, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS: OpenapiV1EnvsEnvAppsAppIdClusters, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleases, - 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_ACTIVE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameReleasesActive, - PathValues.OPENAPI_V1_ENVS_ENV_RELEASES_COMPARISON: OpenapiV1EnvsEnvReleasesComparison, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_INSTANCES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameInstances, - PathValues.OPENAPI_V1_ENVS_ENV_INSTANCES_BYRELEASE: OpenapiV1EnvsEnvInstancesByRelease, - PathValues.OPENAPI_V1_ENVS_ENV_INSTANCES_BYNAMESPACE: OpenapiV1EnvsEnvInstancesByNamespace, - PathValues.OPENAPI_V1_ENVS_ENV_INSTANCES_BYNAMESPACEANDRELEASESNOTIN: OpenapiV1EnvsEnvInstancesByNamespaceAndReleasesNotIn, - PathValues.OPENAPI_V1_NAMESPACES: OpenapiV1Namespaces, - PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME_USAGE: OpenapiV1AppsAppIdAppnamespacesNamespaceNameUsage, - PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES: OpenapiV1AppsAppIdAppnamespaces, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespaces, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceName, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ASSOCIATEDPUBLICNAMESPACE: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameAssociatedPublicNamespace, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LOCK: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameLock, - PathValues.OPENAPI_V1_APPNAMESPACES: OpenapiV1Appnamespaces, - PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME: OpenapiV1AppsAppIdAppnamespacesNamespaceName, - PathValues.OPENAPI_V1_APPS_APP_ID_NAMESPACES_RELEASES_STATUS: OpenapiV1AppsAppIdNamespacesReleasesStatus, - PathValues.OPENAPI_V1_ENVS_ENV_APPNAMESPACES_PUBLIC_NAMESPACE_NAME_INSTANCES: OpenapiV1EnvsEnvAppnamespacesPublicNamespaceNameInstances, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_USAGE: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameUsage, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_MISSINGNAMESPACES: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameMissingNamespaces, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceName, - PathValues.OPENAPI_V1_ORGANIZATIONS: OpenapiV1Organizations, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranches, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchName, - PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME_RULES: OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchNameRules, - PathValues.OPENAPI_V1_ENVS: OpenapiV1Envs, - PathValues.OPENAPI_V1_APPS_APP_ID_NAMESPACES_NAMESPACE_NAME_PERMISSIONINIT: OpenapiV1AppsAppIdNamespacesNamespaceNamePermissionInit, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_PERMISSIONINIT: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesPermissionInit, - PathValues.OPENAPI_V1_APPS_APP_ID_PERMISSIONS_PERMISSION_TYPE: OpenapiV1AppsAppIdPermissionsPermissionType, - PathValues.OPENAPI_V1_APPS_APP_ID_NAMESPACES_NAMESPACE_NAME_PERMISSIONS_PERMISSION_TYPE: OpenapiV1AppsAppIdNamespacesNamespaceNamePermissionsPermissionType, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_NAMESPACES_NAMESPACE_NAME_PERMISSIONS_PERMISSION_TYPE: OpenapiV1AppsAppIdEnvsEnvNamespacesNamespaceNamePermissionsPermissionType, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_PERMISSIONS_PERMISSION_TYPE: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesPermissionsPermissionType, - PathValues.OPENAPI_V1_PERMISSIONS_ROOT: OpenapiV1PermissionsRoot, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_NAMESPACES_NAMESPACE_NAME_ROLEUSERS: OpenapiV1AppsAppIdEnvsEnvNamespacesNamespaceNameRoleUsers, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_NAMESPACES_NAMESPACE_NAME_ROLES_ROLE_TYPE: OpenapiV1AppsAppIdEnvsEnvNamespacesNamespaceNameRolesRoleType, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_ROLEUSERS: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesRoleUsers, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_ROLES_ROLE_TYPE: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameRolesRoleType, - PathValues.OPENAPI_V1_APPS_APP_ID_NAMESPACES_NAMESPACE_NAME_ROLEUSERS: OpenapiV1AppsAppIdNamespacesNamespaceNameRoleUsers, - PathValues.OPENAPI_V1_APPS_APP_ID_NAMESPACES_NAMESPACE_NAME_ROLES_ROLE_TYPE: OpenapiV1AppsAppIdNamespacesNamespaceNameRolesRoleType, - PathValues.OPENAPI_V1_APPS_APP_ID_ROLEUSERS: OpenapiV1AppsAppIdRoleUsers, - PathValues.OPENAPI_V1_APPS_APP_ID_ROLES_ROLE_TYPE: OpenapiV1AppsAppIdRolesRoleType, - PathValues.OPENAPI_V1_SYSTEM_ROLES_CREATEAPPLICATION: OpenapiV1SystemRolesCreateApplication, - PathValues.OPENAPI_V1_SYSTEM_ROLES_CREATEAPPLICATION_ROLEUSERS: OpenapiV1SystemRolesCreateApplicationRoleUsers, - PathValues.OPENAPI_V1_APPS_APP_ID_ROLES_MASTER: OpenapiV1AppsAppIdRolesMaster, - PathValues.OPENAPI_V1_SYSTEM_ROLE_MANAGEAPPMASTER: OpenapiV1SystemRoleManageAppMaster, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_ACCESSKEYS: OpenapiV1AppsAppIdEnvsEnvAccesskeys, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_ACCESSKEYS_ACCESS_KEY_ID: OpenapiV1AppsAppIdEnvsEnvAccesskeysAccessKeyId, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_ACCESSKEYS_ACCESS_KEY_ID_ACTIVATION: OpenapiV1AppsAppIdEnvsEnvAccesskeysAccessKeyIdActivation, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_ACCESSKEYS_ACCESS_KEY_ID_DEACTIVATION: OpenapiV1AppsAppIdEnvsEnvAccesskeysAccessKeyIdDeactivation, - PathValues.OPENAPI_V1_USER: OpenapiV1User, - PathValues.OPENAPI_V1_USERS: OpenapiV1Users, - PathValues.OPENAPI_V1_USERS_USER_ID: OpenapiV1UsersUserId, - PathValues.OPENAPI_V1_USERS_ENABLED: OpenapiV1UsersEnabled, - PathValues.OPENAPI_V1_APOLLO_AUDIT_PROPERTIES: OpenapiV1ApolloAuditProperties, - PathValues.OPENAPI_V1_APOLLO_AUDIT_LOGS: OpenapiV1ApolloAuditLogs, - PathValues.OPENAPI_V1_APOLLO_AUDIT_LOGS_OP_NAME: OpenapiV1ApolloAuditLogsOpName, - PathValues.OPENAPI_V1_APOLLO_AUDIT_TRACE: OpenapiV1ApolloAuditTrace, - PathValues.OPENAPI_V1_APOLLO_AUDIT_LOGS_DATA_INFLUENCES_FIELD: OpenapiV1ApolloAuditLogsDataInfluencesField, - PathValues.OPENAPI_V1_APOLLO_AUDIT_LOGS_BYNAMEORTYPEOROPERATOR: OpenapiV1ApolloAuditLogsByNameOrTypeOrOperator, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_COMMITS: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameCommits, - PathValues.OPENAPI_V1_PAGESETTINGS: OpenapiV1PageSettings, - PathValues.OPENAPI_V1_CONSUMERS: OpenapiV1Consumers, - PathValues.OPENAPI_V1_CONSUMERTOKENS_BYAPP_ID: OpenapiV1ConsumerTokensByAppId, - PathValues.OPENAPI_V1_CONSUMERS_TOKEN_ASSIGNROLE: OpenapiV1ConsumersTokenAssignRole, - PathValues.OPENAPI_V1_CONSUMERS_BYAPP_ID: OpenapiV1ConsumersByAppId, - PathValues.OPENAPI_V1_IMPORT: OpenapiV1Import, - PathValues.OPENAPI_V1_FAVORITES: OpenapiV1Favorites, - PathValues.OPENAPI_V1_FAVORITES_FAVORITE_ID: OpenapiV1FavoritesFavoriteId, - PathValues.OPENAPI_V1_GLOBALSEARCH_ITEMINFO_BYKEYORVALUE: OpenapiV1GlobalSearchItemInfoByKeyOrValue, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_HISTORIES: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameReleasesHistories, - PathValues.OPENAPI_V1_SERVER_PORTALDB_CONFIG: OpenapiV1ServerPortalDbConfig, - PathValues.OPENAPI_V1_SERVER_ENVS_ENV_CONFIGDB_CONFIG: OpenapiV1ServerEnvsEnvConfigDbConfig, - PathValues.OPENAPI_V1_SERVER_PORTALDB_CONFIG_FINDALLCONFIG: OpenapiV1ServerPortalDbConfigFindAllConfig, - PathValues.OPENAPI_V1_SERVER_ENVS_ENV_CONFIGDB_CONFIG_FINDALLCONFIG: OpenapiV1ServerEnvsEnvConfigDbConfigFindAllConfig, - PathValues.OPENAPI_V1_SYSTEMINFO: OpenapiV1SystemInfo, - PathValues.OPENAPI_V1_SYSTEMINFO_HEALTH: OpenapiV1SystemInfoHealth, - PathValues.OPENAPI_V1_CONFIGS_EXPORT: OpenapiV1ConfigsExport, - PathValues.OPENAPI_V1_CONFIGS_IMPORT: OpenapiV1ConfigsImport, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_EXPORT: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameExport, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_IMPORT: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameImport, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_EXPORT: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsExport, - PathValues.OPENAPI_V1_APPS_SEARCH_BYAPPIDORNAME: OpenapiV1AppsSearchByAppidOrName, - PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_IMPORT: OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsImport, - } -) diff --git a/python/apollo_openapi/apis/paths/__init__.py b/python/apollo_openapi/apis/paths/__init__.py deleted file mode 100644 index 0de7f5e0..00000000 --- a/python/apollo_openapi/apis/paths/__init__.py +++ /dev/null @@ -1,3 +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.apis.path_to_api import path_to_api diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_logs.py b/python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_logs.py deleted file mode 100644 index c9a970c7..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_logs.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apollo_audit_logs.get import ApiForget - - -class OpenapiV1ApolloAuditLogs( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_logs_by_name_or_type_or_operator.py b/python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_logs_by_name_or_type_or_operator.py deleted file mode 100644 index c4c35456..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_logs_by_name_or_type_or_operator.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apollo_audit_logs_by_name_or_type_or_operator.get import ApiForget - - -class OpenapiV1ApolloAuditLogsByNameOrTypeOrOperator( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_logs_data_influences_field.py b/python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_logs_data_influences_field.py deleted file mode 100644 index 25663277..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_logs_data_influences_field.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apollo_audit_logs_data_influences_field.get import ApiForget - - -class OpenapiV1ApolloAuditLogsDataInfluencesField( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_logs_op_name.py b/python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_logs_op_name.py deleted file mode 100644 index 53090cd7..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_logs_op_name.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apollo_audit_logs_op_name.get import ApiForget - - -class OpenapiV1ApolloAuditLogsOpName( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_properties.py b/python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_properties.py deleted file mode 100644 index 40b2a825..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_properties.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apollo_audit_properties.get import ApiForget - - -class OpenapiV1ApolloAuditProperties( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_trace.py b/python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_trace.py deleted file mode 100644 index c3d2eef6..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apollo_audit_trace.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apollo_audit_trace.get import ApiForget - - -class OpenapiV1ApolloAuditTrace( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_appnamespaces.py b/python/apollo_openapi/apis/paths/openapi_v1_appnamespaces.py deleted file mode 100644 index 73accafd..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_appnamespaces.py +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index 8f372842..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps.py +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index d4d66868..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id.py +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index 3bcda20b..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_appnamespaces.py +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index 312c75e9..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name.py +++ /dev/null @@ -1,9 +0,0 @@ -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_appnamespaces_namespace_name_usage.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage.py deleted file mode 100644 index be5b7301..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name_usage.get import ApiForget - - -class OpenapiV1AppsAppIdAppnamespacesNamespaceNameUsage( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_env_cluster_info.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_env_cluster_info.py deleted file mode 100644 index e23ee371..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_env_cluster_info.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_env_cluster_info.get import ApiForget - - -class OpenapiV1AppsAppIdEnvClusterInfo( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envclusters.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envclusters.py deleted file mode 100644 index e904661a..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envclusters.py +++ /dev/null @@ -1,7 +0,0 @@ -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_accesskeys.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_accesskeys.py deleted file mode 100644 index e8bf4cce..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_accesskeys.py +++ /dev/null @@ -1,9 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_accesskeys.get import ApiForget -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_accesskeys.post import ApiForpost - - -class OpenapiV1AppsAppIdEnvsEnvAccesskeys( - ApiForget, - ApiForpost, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id.py deleted file mode 100644 index 0c84f84d..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id.delete import ApiFordelete - - -class OpenapiV1AppsAppIdEnvsEnvAccesskeysAccessKeyId( - ApiFordelete, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation.py deleted file mode 100644 index 4fd84ab1..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation.put import ApiForput - - -class OpenapiV1AppsAppIdEnvsEnvAccesskeysAccessKeyIdActivation( - ApiForput, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation.py deleted file mode 100644 index ffceb68a..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation.put import ApiForput - - -class OpenapiV1AppsAppIdEnvsEnvAccesskeysAccessKeyIdDeactivation( - ApiForput, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export.py deleted file mode 100644 index b2e02078..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export.py +++ /dev/null @@ -1,9 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export.get import ApiForget -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export.head import ApiForhead - - -class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameExport( - ApiForget, - ApiForhead, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import.py deleted file mode 100644 index 797625c2..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import.post import ApiForpost - - -class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameImport( - ApiForpost, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces.py deleted file mode 100644 index 1a53a519..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces.py +++ /dev/null @@ -1,9 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces.get import ApiForget -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces.post import ApiForpost - - -class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameMissingNamespaces( - ApiForget, - ApiForpost, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name.py deleted file mode 100644 index a4e5f600..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name.delete import ApiFordelete - - -class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceName( - ApiFordelete, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits.py deleted file mode 100644 index 3653e5bb..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits.get import ApiForget - - -class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameCommits( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export.py deleted file mode 100644 index 8235f4d7..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export.get import ApiForget - - -class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsExport( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import.py deleted file mode 100644 index dfbd3598..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import.post import ApiForpost - - -class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsImport( - ApiForpost, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories.py deleted file mode 100644 index a3c318c4..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories.get import ApiForget - - -class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameReleasesHistories( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage.py deleted file mode 100644 index 2b5ce2cb..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage.get import ApiForget - - -class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameUsage( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init.py deleted file mode 100644 index 8f167e86..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init.post import ApiForpost - - -class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesPermissionInit( - ApiForpost, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type.py deleted file mode 100644 index 35489f76..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type.get import ApiForget - - -class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesPermissionsPermissionType( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users.py deleted file mode 100644 index 19449269..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users.get import ApiForget - - -class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesRoleUsers( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type.py deleted file mode 100644 index b1e9ba95..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type.py +++ /dev/null @@ -1,9 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type.post import ApiForpost -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type.delete import ApiFordelete - - -class OpenapiV1AppsAppIdEnvsEnvClustersClusterNameRolesRoleType( - ApiForpost, - ApiFordelete, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type.py deleted file mode 100644 index 118eb2b1..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type.get import ApiForget - - -class OpenapiV1AppsAppIdEnvsEnvNamespacesNamespaceNamePermissionsPermissionType( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users.py deleted file mode 100644 index f0c667f8..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users.get import ApiForget - - -class OpenapiV1AppsAppIdEnvsEnvNamespacesNamespaceNameRoleUsers( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type.py deleted file mode 100644 index 495e3aa2..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type.py +++ /dev/null @@ -1,9 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type.post import ApiForpost -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type.delete import ApiFordelete - - -class OpenapiV1AppsAppIdEnvsEnvNamespacesNamespaceNameRolesRoleType( - ApiForpost, - ApiFordelete, -): - 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 deleted file mode 100644 index f257aed8..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_miss_envs.py +++ /dev/null @@ -1,7 +0,0 @@ -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_namespace_name_permission_init.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permission_init.py deleted file mode 100644 index adca0211..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permission_init.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_namespaces_namespace_name_permission_init.post import ApiForpost - - -class OpenapiV1AppsAppIdNamespacesNamespaceNamePermissionInit( - ApiForpost, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type.py deleted file mode 100644 index 3ae13e37..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type.get import ApiForget - - -class OpenapiV1AppsAppIdNamespacesNamespaceNamePermissionsPermissionType( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_namespace_name_role_users.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_namespace_name_role_users.py deleted file mode 100644 index 7458cbcd..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_namespace_name_role_users.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_namespaces_namespace_name_role_users.get import ApiForget - - -class OpenapiV1AppsAppIdNamespacesNamespaceNameRoleUsers( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type.py deleted file mode 100644 index c307cead..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type.py +++ /dev/null @@ -1,9 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type.post import ApiForpost -from apollo_openapi.paths.openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type.delete import ApiFordelete - - -class OpenapiV1AppsAppIdNamespacesNamespaceNameRolesRoleType( - ApiForpost, - ApiFordelete, -): - 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 deleted file mode 100644 index f1c8c200..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_namespaces_releases_status.py +++ /dev/null @@ -1,7 +0,0 @@ -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_permissions_permission_type.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_permissions_permission_type.py deleted file mode 100644 index def9aa7e..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_permissions_permission_type.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_permissions_permission_type.get import ApiForget - - -class OpenapiV1AppsAppIdPermissionsPermissionType( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_role_users.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_role_users.py deleted file mode 100644 index 59bbea31..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_role_users.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_role_users.get import ApiForget - - -class OpenapiV1AppsAppIdRoleUsers( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_roles_master.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_roles_master.py deleted file mode 100644 index e3301fb8..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_roles_master.py +++ /dev/null @@ -1,9 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_roles_master.post import ApiForpost -from apollo_openapi.paths.openapi_v1_apps_app_id_roles_master.delete import ApiFordelete - - -class OpenapiV1AppsAppIdRolesMaster( - ApiForpost, - ApiFordelete, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_roles_role_type.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_roles_role_type.py deleted file mode 100644 index 3a78e014..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_app_id_roles_role_type.py +++ /dev/null @@ -1,9 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_app_id_roles_role_type.post import ApiForpost -from apollo_openapi.paths.openapi_v1_apps_app_id_roles_role_type.delete import ApiFordelete - - -class OpenapiV1AppsAppIdRolesRoleType( - ApiForpost, - ApiFordelete, -): - 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 deleted file mode 100644 index beba2d23..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_authorized.py +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index 9a672f00..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_by_self.py +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index fa33f273..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_envs_env.py +++ /dev/null @@ -1,7 +0,0 @@ -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_apps_search_by_appid_or_name.py b/python/apollo_openapi/apis/paths/openapi_v1_apps_search_by_appid_or_name.py deleted file mode 100644 index 1d640b50..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_apps_search_by_appid_or_name.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_apps_search_by_appid_or_name.get import ApiForget - - -class OpenapiV1AppsSearchByAppidOrName( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_configs_export.py b/python/apollo_openapi/apis/paths/openapi_v1_configs_export.py deleted file mode 100644 index 0b79fadf..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_configs_export.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_configs_export.get import ApiForget - - -class OpenapiV1ConfigsExport( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_configs_import.py b/python/apollo_openapi/apis/paths/openapi_v1_configs_import.py deleted file mode 100644 index e5531346..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_configs_import.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_configs_import.post import ApiForpost - - -class OpenapiV1ConfigsImport( - ApiForpost, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_consumer_tokens_by_app_id.py b/python/apollo_openapi/apis/paths/openapi_v1_consumer_tokens_by_app_id.py deleted file mode 100644 index 485e0b10..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_consumer_tokens_by_app_id.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_consumer_tokens_by_app_id.get import ApiForget - - -class OpenapiV1ConsumerTokensByAppId( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_consumers.py b/python/apollo_openapi/apis/paths/openapi_v1_consumers.py deleted file mode 100644 index 7b7f608e..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_consumers.py +++ /dev/null @@ -1,9 +0,0 @@ -from apollo_openapi.paths.openapi_v1_consumers.get import ApiForget -from apollo_openapi.paths.openapi_v1_consumers.post import ApiForpost - - -class OpenapiV1Consumers( - ApiForget, - ApiForpost, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_consumers_by_app_id.py b/python/apollo_openapi/apis/paths/openapi_v1_consumers_by_app_id.py deleted file mode 100644 index 9b5f0c7a..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_consumers_by_app_id.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_consumers_by_app_id.delete import ApiFordelete - - -class OpenapiV1ConsumersByAppId( - ApiFordelete, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_consumers_token_assign_role.py b/python/apollo_openapi/apis/paths/openapi_v1_consumers_token_assign_role.py deleted file mode 100644 index 4f3e3346..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_consumers_token_assign_role.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_consumers_token_assign_role.post import ApiForpost - - -class OpenapiV1ConsumersTokenAssignRole( - ApiForpost, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs.py b/python/apollo_openapi/apis/paths/openapi_v1_envs.py deleted file mode 100644 index 401dc928..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_envs.get import ApiForget - - -class OpenapiV1Envs( - ApiForget, -): - 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 deleted file mode 100644 index faacdfe6..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances.py +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index 2973643b..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters.py +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index a4035040..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name.py +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index 0a26a78a..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces.py +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index 1cc37c18..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name.py +++ /dev/null @@ -1,7 +0,0 @@ -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_associated_public_namespace.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace.py deleted file mode 100644 index b8ef52ac..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace.get import ApiForget - - -class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameAssociatedPublicNamespace( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches.py deleted file mode 100644 index de663211..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches.py +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index f057a29a..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.py +++ /dev/null @@ -1,9 +0,0 @@ -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.post import ApiForpost -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.delete import ApiFordelete - - -class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameBranchesBranchName( - ApiForpost, - ApiFordelete, -): - 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 deleted file mode 100644 index 547118f8..00000000 --- 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 +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index ac8d34d1..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items.py +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index fe318f72..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge.py +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index f3969837..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases.py +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index 0a6e965f..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules.py +++ /dev/null @@ -1,9 +0,0 @@ -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 deleted file mode 100644 index c60e7099..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key.py +++ /dev/null @@ -1,11 +0,0 @@ -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 deleted file mode 100644 index cf2b2268..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances.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.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_items.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.py deleted file mode 100644 index 79f54798..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.py +++ /dev/null @@ -1,11 +0,0 @@ -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.get import ApiForget -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.put import ApiForput -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.post import ApiForpost - - -class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItems( - ApiForget, - ApiForput, - ApiForpost, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff.py deleted file mode 100644 index 09dda6c2..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff.post import ApiForpost - - -class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsDiff( - ApiForpost, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key.py deleted file mode 100644 index 30b5b1e9..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key.py +++ /dev/null @@ -1,11 +0,0 @@ -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_revocation.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation.py deleted file mode 100644 index 7f5611a0..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation.post import ApiForpost - - -class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevocation( - ApiForpost, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize.py deleted file mode 100644 index 9fcbe9d9..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize.post import ApiForpost - - -class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSynchronize( - ApiForpost, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation.py deleted file mode 100644 index a29dcb9d..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation.post import ApiForpost - - -class OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidation( - 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 deleted file mode 100644 index e269c3c7..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock.py +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index 0ea7414e..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases.py +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index fa8b2a4c..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active.py +++ /dev/null @@ -1,7 +0,0 @@ -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_latest.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest.py deleted file mode 100644 index 60683fb6..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest.py +++ /dev/null @@ -1,7 +0,0 @@ -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_instances_by_namespace.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_namespace.py deleted file mode 100644 index 468f5f9b..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_namespace.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_envs_env_instances_by_namespace.get import ApiForget - - -class OpenapiV1EnvsEnvInstancesByNamespace( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in.py deleted file mode 100644 index df33bd8b..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_envs_env_instances_by_namespace_and_releases_not_in.get import ApiForget - - -class OpenapiV1EnvsEnvInstancesByNamespaceAndReleasesNotIn( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_release.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_release.py deleted file mode 100644 index f0784db4..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_instances_by_release.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_envs_env_instances_by_release.get import ApiForget - - -class OpenapiV1EnvsEnvInstancesByRelease( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_comparison.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_comparison.py deleted file mode 100644 index 5639a2e4..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_comparison.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_envs_env_releases_comparison.get import ApiForget - - -class OpenapiV1EnvsEnvReleasesComparison( - 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 deleted file mode 100644 index 45317652..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_release_id.py +++ /dev/null @@ -1,7 +0,0 @@ -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_rollback.py b/python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_release_id_rollback.py deleted file mode 100644 index 0022e5fc..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_envs_env_releases_release_id_rollback.py +++ /dev/null @@ -1,7 +0,0 @@ -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_favorites.py b/python/apollo_openapi/apis/paths/openapi_v1_favorites.py deleted file mode 100644 index a6d730ca..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_favorites.py +++ /dev/null @@ -1,9 +0,0 @@ -from apollo_openapi.paths.openapi_v1_favorites.get import ApiForget -from apollo_openapi.paths.openapi_v1_favorites.post import ApiForpost - - -class OpenapiV1Favorites( - ApiForget, - ApiForpost, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_favorites_favorite_id.py b/python/apollo_openapi/apis/paths/openapi_v1_favorites_favorite_id.py deleted file mode 100644 index 4751a8c6..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_favorites_favorite_id.py +++ /dev/null @@ -1,9 +0,0 @@ -from apollo_openapi.paths.openapi_v1_favorites_favorite_id.put import ApiForput -from apollo_openapi.paths.openapi_v1_favorites_favorite_id.delete import ApiFordelete - - -class OpenapiV1FavoritesFavoriteId( - ApiForput, - ApiFordelete, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_global_search_item_info_by_key_or_value.py b/python/apollo_openapi/apis/paths/openapi_v1_global_search_item_info_by_key_or_value.py deleted file mode 100644 index 8b6105cf..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_global_search_item_info_by_key_or_value.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_global_search_item_info_by_key_or_value.get import ApiForget - - -class OpenapiV1GlobalSearchItemInfoByKeyOrValue( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_import.py b/python/apollo_openapi/apis/paths/openapi_v1_import.py deleted file mode 100644 index 7b05ec74..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_import.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_import.post import ApiForpost - - -class OpenapiV1Import( - ApiForpost, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_namespaces.py b/python/apollo_openapi/apis/paths/openapi_v1_namespaces.py deleted file mode 100644 index 3bba1372..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_namespaces.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_namespaces.post import ApiForpost - - -class OpenapiV1Namespaces( - ApiForpost, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_organizations.py b/python/apollo_openapi/apis/paths/openapi_v1_organizations.py deleted file mode 100644 index 2b46c02e..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_organizations.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_organizations.get import ApiForget - - -class OpenapiV1Organizations( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_page_settings.py b/python/apollo_openapi/apis/paths/openapi_v1_page_settings.py deleted file mode 100644 index bcbd88f8..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_page_settings.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_page_settings.get import ApiForget - - -class OpenapiV1PageSettings( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_permissions_root.py b/python/apollo_openapi/apis/paths/openapi_v1_permissions_root.py deleted file mode 100644 index 2d4e48cf..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_permissions_root.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_permissions_root.get import ApiForget - - -class OpenapiV1PermissionsRoot( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_server_envs_env_config_db_config.py b/python/apollo_openapi/apis/paths/openapi_v1_server_envs_env_config_db_config.py deleted file mode 100644 index acde06ac..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_server_envs_env_config_db_config.py +++ /dev/null @@ -1,9 +0,0 @@ -from apollo_openapi.paths.openapi_v1_server_envs_env_config_db_config.post import ApiForpost -from apollo_openapi.paths.openapi_v1_server_envs_env_config_db_config.delete import ApiFordelete - - -class OpenapiV1ServerEnvsEnvConfigDbConfig( - ApiForpost, - ApiFordelete, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_server_envs_env_config_db_config_find_all_config.py b/python/apollo_openapi/apis/paths/openapi_v1_server_envs_env_config_db_config_find_all_config.py deleted file mode 100644 index 69989e74..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_server_envs_env_config_db_config_find_all_config.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_server_envs_env_config_db_config_find_all_config.get import ApiForget - - -class OpenapiV1ServerEnvsEnvConfigDbConfigFindAllConfig( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_server_portal_db_config.py b/python/apollo_openapi/apis/paths/openapi_v1_server_portal_db_config.py deleted file mode 100644 index b18896c8..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_server_portal_db_config.py +++ /dev/null @@ -1,9 +0,0 @@ -from apollo_openapi.paths.openapi_v1_server_portal_db_config.post import ApiForpost -from apollo_openapi.paths.openapi_v1_server_portal_db_config.delete import ApiFordelete - - -class OpenapiV1ServerPortalDbConfig( - ApiForpost, - ApiFordelete, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_server_portal_db_config_find_all_config.py b/python/apollo_openapi/apis/paths/openapi_v1_server_portal_db_config_find_all_config.py deleted file mode 100644 index 578a7ef2..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_server_portal_db_config_find_all_config.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_server_portal_db_config_find_all_config.get import ApiForget - - -class OpenapiV1ServerPortalDbConfigFindAllConfig( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_system_info.py b/python/apollo_openapi/apis/paths/openapi_v1_system_info.py deleted file mode 100644 index 705b6d13..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_system_info.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_system_info.get import ApiForget - - -class OpenapiV1SystemInfo( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_system_info_health.py b/python/apollo_openapi/apis/paths/openapi_v1_system_info_health.py deleted file mode 100644 index 90cba572..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_system_info_health.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_system_info_health.get import ApiForget - - -class OpenapiV1SystemInfoHealth( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_system_role_manage_app_master.py b/python/apollo_openapi/apis/paths/openapi_v1_system_role_manage_app_master.py deleted file mode 100644 index 9f5083b1..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_system_role_manage_app_master.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_system_role_manage_app_master.get import ApiForget - - -class OpenapiV1SystemRoleManageAppMaster( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_system_roles_create_application.py b/python/apollo_openapi/apis/paths/openapi_v1_system_roles_create_application.py deleted file mode 100644 index 2a432e0d..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_system_roles_create_application.py +++ /dev/null @@ -1,11 +0,0 @@ -from apollo_openapi.paths.openapi_v1_system_roles_create_application.get import ApiForget -from apollo_openapi.paths.openapi_v1_system_roles_create_application.post import ApiForpost -from apollo_openapi.paths.openapi_v1_system_roles_create_application.delete import ApiFordelete - - -class OpenapiV1SystemRolesCreateApplication( - ApiForget, - ApiForpost, - ApiFordelete, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_system_roles_create_application_role_users.py b/python/apollo_openapi/apis/paths/openapi_v1_system_roles_create_application_role_users.py deleted file mode 100644 index 1d961625..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_system_roles_create_application_role_users.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_system_roles_create_application_role_users.get import ApiForget - - -class OpenapiV1SystemRolesCreateApplicationRoleUsers( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_user.py b/python/apollo_openapi/apis/paths/openapi_v1_user.py deleted file mode 100644 index b8de87a5..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_user.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_user.get import ApiForget - - -class OpenapiV1User( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_users.py b/python/apollo_openapi/apis/paths/openapi_v1_users.py deleted file mode 100644 index 06e96d09..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_users.py +++ /dev/null @@ -1,9 +0,0 @@ -from apollo_openapi.paths.openapi_v1_users.get import ApiForget -from apollo_openapi.paths.openapi_v1_users.post import ApiForpost - - -class OpenapiV1Users( - ApiForget, - ApiForpost, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_users_enabled.py b/python/apollo_openapi/apis/paths/openapi_v1_users_enabled.py deleted file mode 100644 index b7f09fd2..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_users_enabled.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_users_enabled.put import ApiForput - - -class OpenapiV1UsersEnabled( - ApiForput, -): - pass diff --git a/python/apollo_openapi/apis/paths/openapi_v1_users_user_id.py b/python/apollo_openapi/apis/paths/openapi_v1_users_user_id.py deleted file mode 100644 index ed8499dc..00000000 --- a/python/apollo_openapi/apis/paths/openapi_v1_users_user_id.py +++ /dev/null @@ -1,7 +0,0 @@ -from apollo_openapi.paths.openapi_v1_users_user_id.get import ApiForget - - -class OpenapiV1UsersUserId( - ApiForget, -): - pass diff --git a/python/apollo_openapi/apis/tag_to_api.py b/python/apollo_openapi/apis/tag_to_api.py deleted file mode 100644 index e73bc616..00000000 --- a/python/apollo_openapi/apis/tag_to_api.py +++ /dev/null @@ -1,59 +0,0 @@ -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.app_namespace_management_api import AppNamespaceManagementApi -from apollo_openapi.apis.tags.namespace_lock_management_api import NamespaceLockManagementApi -from apollo_openapi.apis.tags.namespace_branch_management_api import NamespaceBranchManagementApi -from apollo_openapi.apis.tags.instance_management_api import InstanceManagementApi -from apollo_openapi.apis.tags.organization_management_api import OrganizationManagementApi -from apollo_openapi.apis.tags.environment_management_api import EnvironmentManagementApi -from apollo_openapi.apis.tags.access_key_management_api import AccessKeyManagementApi -from apollo_openapi.apis.tags.permission_management_api import PermissionManagementApi -from apollo_openapi.apis.tags.user_management_api import UserManagementApi -from apollo_openapi.apis.tags.portal_management_api import PortalManagementApi - -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.APP_NAMESPACE_MANAGEMENT: AppNamespaceManagementApi, - TagValues.NAMESPACE_LOCK_MANAGEMENT: NamespaceLockManagementApi, - TagValues.NAMESPACE_BRANCH_MANAGEMENT: NamespaceBranchManagementApi, - TagValues.INSTANCE_MANAGEMENT: InstanceManagementApi, - TagValues.ORGANIZATION_MANAGEMENT: OrganizationManagementApi, - TagValues.ENVIRONMENT_MANAGEMENT: EnvironmentManagementApi, - TagValues.ACCESS_KEY_MANAGEMENT: AccessKeyManagementApi, - TagValues.PERMISSION_MANAGEMENT: PermissionManagementApi, - TagValues.USER_MANAGEMENT: UserManagementApi, - TagValues.PORTAL_MANAGEMENT: PortalManagementApi, - } -) - -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.APP_NAMESPACE_MANAGEMENT: AppNamespaceManagementApi, - TagValues.NAMESPACE_LOCK_MANAGEMENT: NamespaceLockManagementApi, - TagValues.NAMESPACE_BRANCH_MANAGEMENT: NamespaceBranchManagementApi, - TagValues.INSTANCE_MANAGEMENT: InstanceManagementApi, - TagValues.ORGANIZATION_MANAGEMENT: OrganizationManagementApi, - TagValues.ENVIRONMENT_MANAGEMENT: EnvironmentManagementApi, - TagValues.ACCESS_KEY_MANAGEMENT: AccessKeyManagementApi, - TagValues.PERMISSION_MANAGEMENT: PermissionManagementApi, - TagValues.USER_MANAGEMENT: UserManagementApi, - TagValues.PORTAL_MANAGEMENT: PortalManagementApi, - } -) diff --git a/python/apollo_openapi/apis/tags/__init__.py b/python/apollo_openapi/apis/tags/__init__.py deleted file mode 100644 index f6786e57..00000000 --- a/python/apollo_openapi/apis/tags/__init__.py +++ /dev/null @@ -1,23 +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.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" - APP_NAMESPACE_MANAGEMENT = "AppNamespace Management" - NAMESPACE_LOCK_MANAGEMENT = "Namespace Lock Management" - NAMESPACE_BRANCH_MANAGEMENT = "Namespace Branch Management" - INSTANCE_MANAGEMENT = "Instance Management" - ORGANIZATION_MANAGEMENT = "Organization Management" - ENVIRONMENT_MANAGEMENT = "Environment Management" - ACCESS_KEY_MANAGEMENT = "AccessKey Management" - PERMISSION_MANAGEMENT = "Permission Management" - USER_MANAGEMENT = "User Management" - PORTAL_MANAGEMENT = "Portal Management" diff --git a/python/apollo_openapi/apis/tags/access_key_management_api.py b/python/apollo_openapi/apis/tags/access_key_management_api.py deleted file mode 100644 index d43b5d72..00000000 --- a/python/apollo_openapi/apis/tags/access_key_management_api.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_accesskeys.post import CreateAccessKey -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id.delete import DeleteAccessKey -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation.put import DisableAccessKey -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation.put import EnableAccessKey -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_accesskeys.get import FindAccessKeys - - -class AccessKeyManagementApi( - CreateAccessKey, - DeleteAccessKey, - DisableAccessKey, - EnableAccessKey, - FindAccessKeys, -): - """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/app_management_api.py b/python/apollo_openapi/apis/tags/app_management_api.py deleted file mode 100644 index 35bf2254..00000000 --- a/python/apollo_openapi/apis/tags/app_management_api.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_by_self.get import GetAppsBySelf -from apollo_openapi.paths.openapi_v1_apps_app_id_env_cluster_info.get import GetEnvClusterInfo -from apollo_openapi.paths.openapi_v1_apps_app_id_envclusters.get import GetEnvClusters -from apollo_openapi.paths.openapi_v1_apps_app_id.put import UpdateApp - - -class AppManagementApi( - CreateApp, - CreateAppInEnv, - DeleteApp, - FindApps, - FindAppsAuthorized, - FindMissEnvs, - GetApp, - GetAppsBySelf, - GetEnvClusterInfo, - GetEnvClusters, - 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/app_namespace_management_api.py b/python/apollo_openapi/apis/tags/app_namespace_management_api.py deleted file mode 100644 index 3c008621..00000000 --- a/python/apollo_openapi/apis/tags/app_namespace_management_api.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces.post import CreateAppNamespace -from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name.delete import DeleteAppNamespace -from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name.get import FindAppNamespace -from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces_namespace_name_usage.get import FindAppNamespaceUsage -from apollo_openapi.paths.openapi_v1_appnamespaces.get import GetAppNamespaces -from apollo_openapi.paths.openapi_v1_apps_app_id_appnamespaces.get import GetAppNamespacesByAppId -from apollo_openapi.paths.openapi_v1_envs_env_appnamespaces_public_namespace_name_instances.get import GetPublicAppNamespaceInstances - - -class AppNamespaceManagementApi( - CreateAppNamespace, - DeleteAppNamespace, - FindAppNamespace, - FindAppNamespaceUsage, - GetAppNamespaces, - GetAppNamespacesByAppId, - GetPublicAppNamespaceInstances, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/python/apollo_openapi/apis/tags/cluster_management_api.py b/python/apollo_openapi/apis/tags/cluster_management_api.py deleted file mode 100644 index 4e87178b..00000000 --- a/python/apollo_openapi/apis/tags/cluster_management_api.py +++ /dev/null @@ -1,26 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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/environment_management_api.py b/python/apollo_openapi/apis/tags/environment_management_api.py deleted file mode 100644 index f56b0a5c..00000000 --- a/python/apollo_openapi/apis/tags/environment_management_api.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -from apollo_openapi.paths.openapi_v1_envs.get import GetEnvs - - -class EnvironmentManagementApi( - GetEnvs, -): - """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 deleted file mode 100644 index 201e2094..00000000 --- a/python/apollo_openapi/apis/tags/instance_management_api.py +++ /dev/null @@ -1,28 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -from apollo_openapi.paths.openapi_v1_envs_env_instances_by_namespace.get import GetByNamespace -from apollo_openapi.paths.openapi_v1_envs_env_instances_by_release.get import GetByRelease -from apollo_openapi.paths.openapi_v1_envs_env_instances_by_namespace_and_releases_not_in.get import GetByReleasesAndNamespaceNotIn -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances.get import GetInstanceCountByNamespace - - -class InstanceManagementApi( - GetByNamespace, - GetByRelease, - GetByReleasesAndNamespaceNotIn, - GetInstanceCountByNamespace, -): - """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 deleted file mode 100644 index fa9662ba..00000000 --- a/python/apollo_openapi/apis/tags/item_management_api.py +++ /dev/null @@ -1,48 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.put import BatchUpdateItemsByText -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff.post import CompareItems -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.post import CreateItem -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key.delete import DeleteItem -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key.delete import DeleteItemByEncodedKey -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items.get import FindBranchItems -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items.get import FindItemsByNamespace -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_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_revocation.post import RevertItems -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize.post import SyncItems -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation.post import SyntaxCheck -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key.put import UpdateItem -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key.put import UpdateItemByEncodedKey - - -class ItemManagementApi( - BatchUpdateItemsByText, - CompareItems, - CreateItem, - DeleteItem, - DeleteItemByEncodedKey, - FindBranchItems, - FindItemsByNamespace, - GetItem, - GetItemByEncodedKey, - RevertItems, - SyncItems, - SyntaxCheck, - UpdateItem, - UpdateItemByEncodedKey, -): - """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 deleted file mode 100644 index d8bf4bd4..00000000 --- a/python/apollo_openapi/apis/tags/namespace_branch_management_api.py +++ /dev/null @@ -1,34 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_merge.post import Merge -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name.post import MergeBranch -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules.put import UpdateBranchRules - - -class NamespaceBranchManagementApi( - CreateBranch, - DeleteBranch, - FindBranch, - GetBranchGrayRules, - Merge, - 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_lock_management_api.py b/python/apollo_openapi/apis/tags/namespace_lock_management_api.py deleted file mode 100644 index 70f685b4..00000000 --- a/python/apollo_openapi/apis/tags/namespace_lock_management_api.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock.get import GetNamespaceLock - - -class NamespaceLockManagementApi( - GetNamespaceLock, -): - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - pass diff --git a/python/apollo_openapi/apis/tags/namespace_management_api.py b/python/apollo_openapi/apis/tags/namespace_management_api.py deleted file mode 100644 index 35fcf578..00000000 --- a/python/apollo_openapi/apis/tags/namespace_management_api.py +++ /dev/null @@ -1,38 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces.post import CreateMissingNamespaces -from apollo_openapi.paths.openapi_v1_namespaces.post import CreateNamespaces -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name.delete import DeleteNamespace -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces.get import FindMissingNamespaces -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name.get import FindNamespace -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage.get import FindNamespaceUsage -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces.get import FindNamespaces -from apollo_openapi.paths.openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace.get import FindPublicNamespaceForAssociatedNamespace -from apollo_openapi.paths.openapi_v1_apps_app_id_namespaces_releases_status.get import GetNamespacesReleaseStatus - - -class NamespaceManagementApi( - CreateMissingNamespaces, - CreateNamespaces, - DeleteNamespace, - FindMissingNamespaces, - FindNamespace, - FindNamespaceUsage, - FindNamespaces, - FindPublicNamespaceForAssociatedNamespace, - GetNamespacesReleaseStatus, -): - """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 deleted file mode 100644 index 39d5a201..00000000 --- a/python/apollo_openapi/apis/tags/organization_management_api.py +++ /dev/null @@ -1,22 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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/permission_management_api.py b/python/apollo_openapi/apis/tags/permission_management_api.py deleted file mode 100644 index 85f7e672..00000000 --- a/python/apollo_openapi/apis/tags/permission_management_api.py +++ /dev/null @@ -1,72 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -from apollo_openapi.paths.openapi_v1_system_roles_create_application.post import AddCreateApplicationRoleToUsers -from apollo_openapi.paths.openapi_v1_apps_app_id_roles_master.post import AddManageAppMasterRoleToUser -from apollo_openapi.paths.openapi_v1_apps_app_id_roles_role_type.post import AssignAppRoleToUser -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type.post import AssignClusterNamespaceRoleToUser -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type.post import AssignNamespaceEnvRoleToUser -from apollo_openapi.paths.openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type.post import AssignNamespaceRoleToUser -from apollo_openapi.paths.openapi_v1_system_roles_create_application.delete import DeleteCreateApplicationRoleFromUser -from apollo_openapi.paths.openapi_v1_apps_app_id_role_users.get import GetAppRoles -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users.get import GetClusterNamespaceRoles -from apollo_openapi.paths.openapi_v1_system_roles_create_application_role_users.get import GetCreateApplicationRoleUsers -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users.get import GetNamespaceEnvRoleUsers -from apollo_openapi.paths.openapi_v1_apps_app_id_namespaces_namespace_name_role_users.get import GetNamespaceRoles -from apollo_openapi.paths.openapi_v1_apps_app_id_permissions_permission_type.get import HasAppPermission -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type.get import HasClusterNamespacePermission -from apollo_openapi.paths.openapi_v1_system_roles_create_application.get import HasCreateApplicationPermission -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type.get import HasEnvNamespacePermission -from apollo_openapi.paths.openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type.get import HasNamespacePermission -from apollo_openapi.paths.openapi_v1_permissions_root.get import HasRootPermission -from apollo_openapi.paths.openapi_v1_apps_app_id_namespaces_namespace_name_permission_init.post import InitAppPermission -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init.post import InitClusterNamespacePermission -from apollo_openapi.paths.openapi_v1_system_role_manage_app_master.get import IsManageAppMasterPermissionEnabled -from apollo_openapi.paths.openapi_v1_apps_app_id_roles_role_type.delete import RemoveAppRoleFromUser -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type.delete import RemoveClusterNamespaceRoleFromUser -from apollo_openapi.paths.openapi_v1_apps_app_id_roles_master.delete import RemoveManageAppMasterRoleFromUser -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type.delete import RemoveNamespaceEnvRoleFromUser -from apollo_openapi.paths.openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type.delete import RemoveNamespaceRoleFromUser - - -class PermissionManagementApi( - AddCreateApplicationRoleToUsers, - AddManageAppMasterRoleToUser, - AssignAppRoleToUser, - AssignClusterNamespaceRoleToUser, - AssignNamespaceEnvRoleToUser, - AssignNamespaceRoleToUser, - DeleteCreateApplicationRoleFromUser, - GetAppRoles, - GetClusterNamespaceRoles, - GetCreateApplicationRoleUsers, - GetNamespaceEnvRoleUsers, - GetNamespaceRoles, - HasAppPermission, - HasClusterNamespacePermission, - HasCreateApplicationPermission, - HasEnvNamespacePermission, - HasNamespacePermission, - HasRootPermission, - InitAppPermission, - InitClusterNamespacePermission, - IsManageAppMasterPermissionEnabled, - RemoveAppRoleFromUser, - RemoveClusterNamespaceRoleFromUser, - RemoveManageAppMasterRoleFromUser, - RemoveNamespaceEnvRoleFromUser, - RemoveNamespaceRoleFromUser, -): - """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/portal_management_api.py b/python/apollo_openapi/apis/tags/portal_management_api.py deleted file mode 100644 index 99bd00b0..00000000 --- a/python/apollo_openapi/apis/tags/portal_management_api.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -from apollo_openapi.paths.openapi_v1_favorites.post import AddFavorite -from apollo_openapi.paths.openapi_v1_consumers_token_assign_role.post import AssignRoleToConsumer -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export.head import CheckExportAppConfig -from apollo_openapi.paths.openapi_v1_system_info_health.get import CheckSystemHealth -from apollo_openapi.paths.openapi_v1_consumers.post import CreateConsumer -from apollo_openapi.paths.openapi_v1_server_envs_env_config_db_config.post import CreateOrUpdateConfigDbConfig -from apollo_openapi.paths.openapi_v1_server_portal_db_config.post import CreateOrUpdatePortalDbConfig -from apollo_openapi.paths.openapi_v1_server_envs_env_config_db_config.delete import DeleteConfigDbConfig -from apollo_openapi.paths.openapi_v1_consumers_by_app_id.delete import DeleteConsumer -from apollo_openapi.paths.openapi_v1_favorites_favorite_id.delete import DeleteFavorite -from apollo_openapi.paths.openapi_v1_server_portal_db_config.delete import DeletePortalDbConfig -from apollo_openapi.paths.openapi_v1_configs_export.get import ExportAllConfigs -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export.get import ExportAppConfig -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export.get import ExportNamespaceItems -from apollo_openapi.paths.openapi_v1_server_envs_env_config_db_config_find_all_config.get import FindAllConfigDbConfig -from apollo_openapi.paths.openapi_v1_server_portal_db_config_find_all_config.get import FindAllPortalDbConfig -from apollo_openapi.paths.openapi_v1_apollo_audit_logs_data_influences_field.get import FindAuditDataInfluencesByField -from apollo_openapi.paths.openapi_v1_apollo_audit_logs.get import FindAuditLogs -from apollo_openapi.paths.openapi_v1_apollo_audit_logs_op_name.get import FindAuditLogsByOpName -from apollo_openapi.paths.openapi_v1_apollo_audit_trace.get import FindAuditTraceDetails -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits.get import FindCommits -from apollo_openapi.paths.openapi_v1_favorites.get import FindFavorites -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories.get import FindReleaseHistoriesByNamespace -from apollo_openapi.paths.openapi_v1_apollo_audit_properties.get import GetAuditProperties -from apollo_openapi.paths.openapi_v1_consumers.get import GetConsumerList -from apollo_openapi.paths.openapi_v1_consumer_tokens_by_app_id.get import GetConsumerTokenByAppId -from apollo_openapi.paths.openapi_v1_page_settings.get import GetPageSettings -from apollo_openapi.paths.openapi_v1_system_info.get import GetSystemInfo -from apollo_openapi.paths.openapi_v1_configs_import.post import ImportAllConfigs -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import.post import ImportAppConfig -from apollo_openapi.paths.openapi_v1_import.post import ImportConfig -from apollo_openapi.paths.openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import.post import ImportNamespaceItems -from apollo_openapi.paths.openapi_v1_apps_search_by_appid_or_name.get import SearchAppsByAppIdOrName -from apollo_openapi.paths.openapi_v1_apollo_audit_logs_by_name_or_type_or_operator.get import SearchAuditLogs -from apollo_openapi.paths.openapi_v1_global_search_item_info_by_key_or_value.get import SearchItemInfoByKeyOrValue -from apollo_openapi.paths.openapi_v1_favorites_favorite_id.put import TopFavorite - - -class PortalManagementApi( - AddFavorite, - AssignRoleToConsumer, - CheckExportAppConfig, - CheckSystemHealth, - CreateConsumer, - CreateOrUpdateConfigDbConfig, - CreateOrUpdatePortalDbConfig, - DeleteConfigDbConfig, - DeleteConsumer, - DeleteFavorite, - DeletePortalDbConfig, - ExportAllConfigs, - ExportAppConfig, - ExportNamespaceItems, - FindAllConfigDbConfig, - FindAllPortalDbConfig, - FindAuditDataInfluencesByField, - FindAuditLogs, - FindAuditLogsByOpName, - FindAuditTraceDetails, - FindCommits, - FindFavorites, - FindReleaseHistoriesByNamespace, - GetAuditProperties, - GetConsumerList, - GetConsumerTokenByAppId, - GetPageSettings, - GetSystemInfo, - ImportAllConfigs, - ImportAppConfig, - ImportConfig, - ImportNamespaceItems, - SearchAppsByAppIdOrName, - SearchAuditLogs, - SearchItemInfoByKeyOrValue, - TopFavorite, -): - """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 deleted file mode 100644 index 100864f8..00000000 --- a/python/apollo_openapi/apis/tags/release_management_api.py +++ /dev/null @@ -1,36 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -from apollo_openapi.paths.openapi_v1_envs_env_releases_comparison.get import CompareRelease -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_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_releases_release_id_rollback.put import Rollback - - -class ReleaseManagementApi( - CompareRelease, - CreateGrayDelRelease, - CreateGrayRelease, - CreateRelease, - FindActiveReleases, - GetReleaseById, - LoadLatestActiveRelease, - 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/apis/tags/user_management_api.py b/python/apollo_openapi/apis/tags/user_management_api.py deleted file mode 100644 index 23300050..00000000 --- a/python/apollo_openapi/apis/tags/user_management_api.py +++ /dev/null @@ -1,30 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -from apollo_openapi.paths.openapi_v1_users_enabled.put import ChangeUserEnabled -from apollo_openapi.paths.openapi_v1_users.post import CreateOrUpdateUser -from apollo_openapi.paths.openapi_v1_user.get import GetCurrentUser -from apollo_openapi.paths.openapi_v1_users_user_id.get import GetUserByUserId -from apollo_openapi.paths.openapi_v1_users.get import SearchUsers - - -class UserManagementApi( - ChangeUserEnabled, - CreateOrUpdateUser, - GetCurrentUser, - GetUserByUserId, - SearchUsers, -): - """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 deleted file mode 100644 index acce7b40..00000000 --- a/python/apollo_openapi/configuration.py +++ /dev/null @@ -1,469 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -import copy -import logging -import multiprocessing -import sys -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', - 'uniqueItems', 'maxProperties', 'minProperties', -} - -class Configuration(object): - """NOTE: This class is auto generated by OpenAPI Generator - - Ref: https://openapi-generator.tech - Do not edit the class manually. - - :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) - 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 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 - variables with defined enum values before. - :param server_operation_index: Mapping from operation ID to an index to server - configuration. - :param server_operation_variables: Mapping from operation ID to a mapping with - string values to replace variables in templated server configuration. - The validation of enums is performed for variables with defined enum values before. - - :Example: - - API Key Authentication Example. - Given the following security scheme in the OpenAPI specification: - components: - securitySchemes: - cookieAuth: # name for the security scheme - type: apiKey - in: cookie - name: JSESSIONID # cookie name - - You can programmatically set the cookie: - -conf = apollo_openapi.Configuration( - api_key={'cookieAuth': 'abc123'} - api_key_prefix={'cookieAuth': 'JSESSIONID'} -) - - The following cookie will be added to the HTTP request: - Cookie: JSESSIONID abc123 - """ - - _default = None - - def __init__( - self, - 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 - """Default Base url - """ - self.server_index = 0 if server_index is None and host is None else server_index - self.server_operation_index = server_operation_index or {} - """Default server index - """ - self.server_variables = server_variables or {} - self.server_operation_variables = server_operation_variables or {} - """Default server variables - """ - self.temp_folder_path = None - """Temp file folder for downloading files - """ - # Authentication Settings - self.api_key = {} - if api_key: - self.api_key = api_key - """dict to store API key(s) - """ - self.api_key_prefix = {} - if api_key_prefix: - self.api_key_prefix = api_key_prefix - """dict to store API prefix (e.g. Bearer) - """ - self.refresh_api_key_hook = None - """function hook to refresh API key if expired - """ - self.disabled_client_side_validations = disabled_client_side_validations - self.logger = {} - """Logging Settings - """ - self.logger["package_logger"] = logging.getLogger("apollo_openapi") - self.logger["urllib3_logger"] = logging.getLogger("urllib3") - self.logger_format = '%(asctime)s %(levelname)s %(message)s' - """Log format - """ - self.logger_stream_handler = None - """Log stream handler - """ - self.logger_file_handler = None - """Log file handler - """ - self.logger_file = None - """Debug file location - """ - self.debug = False - """Debug switch - """ - - self.verify_ssl = True - """SSL/TLS verification - Set this to false to skip verifying SSL certificate when calling API - from https server. - """ - self.ssl_ca_cert = None - """Set this to customize the certificate file to verify the peer. - """ - self.cert_file = None - """client certificate file - """ - self.key_file = None - """client key file - """ - self.assert_hostname = None - """Set this to True/False to enable/disable SSL hostname verification. - """ - self.tls_server_name = None - """SSL/TLS Server Name Indication (SNI) - Set this to the SNI value expected by the server. - """ - - self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 - """urllib3 connection pool's maximum number of connections saved - per pool. urllib3 uses 1 connection as default value, but this is - not the best value when you are making a lot of possibly parallel - requests to the same host, which is often the case here. - cpu_count * 5 is used as default value to increase performance. - """ - - self.proxy = None - """Proxy URL - """ - self.proxy_headers = None - """Proxy headers - """ - self.safe_chars_for_path_param = '' - """Safe chars for path_param - """ - 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 - - def __deepcopy__(self, memo): - cls = self.__class__ - result = cls.__new__(cls) - memo[id(self)] = result - for k, v in self.__dict__.items(): - if k not in ('logger', 'logger_file_handler'): - setattr(result, k, copy.deepcopy(v, memo)) - # shallow copy of loggers - result.logger = copy.copy(self.logger) - # use setters to configure loggers - result.logger_file = self.logger_file - result.debug = self.debug - return result - - def __setattr__(self, name, 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): - """Set default instance of configuration. - - It stores default configuration, which can be - returned by get_default_copy method. - - :param default: object of Configuration - """ - cls._default = copy.deepcopy(default) - - @classmethod - 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 passed by the set_default method. - - :return: The configuration object. - """ - if cls._default is not None: - return copy.deepcopy(cls._default) - return Configuration() - - @property - def logger_file(self): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - return self.__logger_file - - @logger_file.setter - def logger_file(self, value): - """The logger file. - - If the logger_file is None, then add stream handler and remove file - handler. Otherwise, add file handler and remove stream handler. - - :param value: The logger_file path. - :type: str - """ - self.__logger_file = value - if self.__logger_file: - # If set logging file, - # then add file handler and remove stream handler. - self.logger_file_handler = logging.FileHandler(self.__logger_file) - self.logger_file_handler.setFormatter(self.logger_formatter) - for _, logger in self.logger.items(): - logger.addHandler(self.logger_file_handler) - - @property - def debug(self): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - return self.__debug - - @debug.setter - def debug(self, value): - """Debug status - - :param value: The debug status, True or False. - :type: bool - """ - self.__debug = value - if self.__debug: - # if debug status is True, turn on debug logging - for _, logger in self.logger.items(): - logger.setLevel(logging.DEBUG) - # turn on 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 http_client debug - http_client.HTTPConnection.debuglevel = 0 - - @property - def logger_format(self): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - return self.__logger_format - - @logger_format.setter - def logger_format(self, value): - """The logger format. - - The logger_formatter will be updated when sets logger_format. - - :param value: The format string. - :type: str - """ - self.__logger_format = value - self.logger_formatter = logging.Formatter(self.__logger_format) - - def get_api_key_with_prefix(self, identifier, alias=None): - """Gets API key (with prefix if set). - - :param identifier: The identifier of apiKey. - :param alias: The alternative identifier of apiKey. - :return: The token for api key authentication. - """ - if self.refresh_api_key_hook is not None: - self.refresh_api_key_hook(self) - key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None) - if key: - prefix = self.api_key_prefix.get(identifier) - if prefix: - return "%s %s" % (prefix, key) - else: - return key - - def get_basic_auth_token(self): - """Gets HTTP basic authentication header (string). - - :return: The token for basic HTTP authentication. - """ - username = "" - if self.username is not None: - username = self.username - password = "" - if self.password is not None: - password = self.password - return urllib3.util.make_headers( - basic_auth=username + ':' + password - ).get('authorization') - - def auth_settings(self): - """Gets Auth Settings dict for api client. - - :return: The Auth Settings information dict. - """ - auth = {} - if 'ApiKeyAuth' in self.api_key: - auth['ApiKeyAuth'] = { - 'type': 'api_key', - 'in': 'header', - 'key': 'Authorization', - 'value': self.get_api_key_with_prefix( - 'ApiKeyAuth', - ), - } - return auth - - def to_debug_report(self): - """Gets the essential information for debugging. - - :return: The report for debugging. - """ - return "Python SDK Debug Report:\n"\ - "OS: {env}\n"\ - "Python Version: {pyversion}\n"\ - "Version of the API: 0.3.8\n"\ - "SDK Package Version: 0.3.8".\ - format(env=sys.platform, pyversion=sys.version) - - def get_host_settings(self): - """Gets an array of host settings - - :return: An array of host settings - """ - return [ - { - 'url': "", - 'description': "No description provided", - } - ] - - def get_host_from_settings(self, index, 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 - :param servers: an array of host settings or None - :return: URL based on host settings - """ - if index is None: - return self._base_path - - variables = {} if variables is None else variables - servers = self.get_host_settings() if servers is None else servers - - try: - server = servers[index] - except IndexError: - raise ValueError( - "Invalid index {0} when selecting the host settings. " - "Must be less than {1}".format(index, len(servers))) - - url = server['url'] - - # go through variables and replace placeholders - for variable_name, variable in server.get('variables', {}).items(): - used_value = variables.get( - variable_name, variable['default_value']) - - if 'enum_values' in variable \ - and used_value not in variable['enum_values']: - raise ValueError( - "The variable `{0}` in the host URL has invalid value " - "{1}. Must be {2}.".format( - variable_name, variables[variable_name], - variable['enum_values'])) - - url = url.replace("{" + variable_name + "}", used_value) - - return url - - @property - def host(self): - """Return generated host.""" - return self.get_host_from_settings(self.server_index, variables=self.server_variables) - - @host.setter - 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 deleted file mode 100644 index be5f6632..00000000 --- a/python/apollo_openapi/exceptions.py +++ /dev/null @@ -1,146 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" -import dataclasses -import typing - -from urllib3._collections import HTTPHeaderDict - - -class OpenApiException(Exception): - """The base exception class for all OpenAPIExceptions""" - - -class ApiTypeError(OpenApiException, TypeError): - def __init__(self, msg, path_to_item=None, valid_classes=None, - key_type=None): - """ Raises an exception for TypeErrors - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list): a list of keys an indices to get to the - current_item - None if unset - valid_classes (tuple): the primitive classes that current item - should be an instance of - None if unset - key_type (bool): False if our value is a value in a dict - True if it is a key in a dict - False if our item is an item in a list - None if unset - """ - self.path_to_item = path_to_item - self.valid_classes = valid_classes - self.key_type = key_type - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiTypeError, self).__init__(full_msg) - - -class ApiValueError(OpenApiException, ValueError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (list) the path to the exception in the - received_data dict. None if unset - """ - - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiValueError, self).__init__(full_msg) - - -class ApiAttributeError(OpenApiException, AttributeError): - def __init__(self, msg, path_to_item=None): - """ - Raised when an attribute reference or assignment fails. - - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiAttributeError, self).__init__(full_msg) - - -class ApiKeyError(OpenApiException, KeyError): - def __init__(self, msg, path_to_item=None): - """ - Args: - msg (str): the exception message - - Keyword Args: - path_to_item (None/list) the path to the exception in the - received_data dict - """ - self.path_to_item = path_to_item - full_msg = msg - if path_to_item: - full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) - super(ApiKeyError, self).__init__(full_msg) - - -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""" - error_message = "({0})\n"\ - "Reason: {1}\n".format(self.status, self.reason) - if self.headers: - error_message += "HTTP response headers: {0}\n".format( - self.headers) - - if self.body: - error_message += "HTTP response body: {0}\n".format(self.body) - - return error_message - - -def render_path(path_to_item): - """Returns a string representation of a path""" - result = "" - for pth in path_to_item: - if isinstance(pth, int): - result += "[{0}]".format(pth) - else: - result += "['{0}']".format(pth) - return result diff --git a/python/apollo_openapi/model/__init__.py b/python/apollo_openapi/model/__init__.py deleted file mode 100644 index 0305d033..00000000 --- a/python/apollo_openapi/model/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -# 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 deleted file mode 100644 index 8d0cd6e7..00000000 --- a/python/apollo_openapi/model/exception_response.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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. - """ - - - class MetaOapg: - - class properties: - status = schemas.IntSchema - message = schemas.StrSchema - timestamp = schemas.DateTimeSchema - exception = schemas.StrSchema - __annotations__ = { - "status": status, - "message": message, - "timestamp": timestamp, - "exception": exception, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["timestamp"]) -> MetaOapg.properties.timestamp: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["exception"]) -> MetaOapg.properties.exception: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["status", "message", "timestamp", "exception", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> typing.Union[MetaOapg.properties.status, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> typing.Union[MetaOapg.properties.message, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["timestamp"]) -> typing.Union[MetaOapg.properties.timestamp, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["exception"]) -> typing.Union[MetaOapg.properties.exception, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["status", "message", "timestamp", "exception", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - status: typing.Union[MetaOapg.properties.status, decimal.Decimal, int, schemas.Unset] = schemas.unset, - message: typing.Union[MetaOapg.properties.message, str, schemas.Unset] = schemas.unset, - timestamp: typing.Union[MetaOapg.properties.timestamp, str, datetime, schemas.Unset] = schemas.unset, - exception: typing.Union[MetaOapg.properties.exception, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ExceptionResponse': - return super().__new__( - cls, - *_args, - status=status, - message=message, - timestamp=timestamp, - exception=exception, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/exception_response.pyi b/python/apollo_openapi/model/exception_response.pyi deleted file mode 100644 index 8d0cd6e7..00000000 --- a/python/apollo_openapi/model/exception_response.pyi +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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. - """ - - - class MetaOapg: - - class properties: - status = schemas.IntSchema - message = schemas.StrSchema - timestamp = schemas.DateTimeSchema - exception = schemas.StrSchema - __annotations__ = { - "status": status, - "message": message, - "timestamp": timestamp, - "exception": exception, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["status"]) -> MetaOapg.properties.status: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["timestamp"]) -> MetaOapg.properties.timestamp: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["exception"]) -> MetaOapg.properties.exception: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["status", "message", "timestamp", "exception", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["status"]) -> typing.Union[MetaOapg.properties.status, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> typing.Union[MetaOapg.properties.message, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["timestamp"]) -> typing.Union[MetaOapg.properties.timestamp, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["exception"]) -> typing.Union[MetaOapg.properties.exception, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["status", "message", "timestamp", "exception", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - status: typing.Union[MetaOapg.properties.status, decimal.Decimal, int, schemas.Unset] = schemas.unset, - message: typing.Union[MetaOapg.properties.message, str, schemas.Unset] = schemas.unset, - timestamp: typing.Union[MetaOapg.properties.timestamp, str, datetime, schemas.Unset] = schemas.unset, - exception: typing.Union[MetaOapg.properties.exception, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'ExceptionResponse': - return super().__new__( - cls, - *_args, - status=status, - message=message, - timestamp=timestamp, - exception=exception, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/map_string.py b/python/apollo_openapi/model/map_string.py deleted file mode 100644 index aa6c8e40..00000000 --- a/python/apollo_openapi/model/map_string.py +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index aa6c8e40..00000000 --- a/python/apollo_openapi/model/map_string.pyi +++ /dev/null @@ -1,56 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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/namespace_gray_del_release_dto.py b/python/apollo_openapi/model/namespace_gray_del_release_dto.py deleted file mode 100644 index a78f1fba..00000000 --- a/python/apollo_openapi/model/namespace_gray_del_release_dto.py +++ /dev/null @@ -1,141 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index a78f1fba..00000000 --- a/python/apollo_openapi/model/namespace_gray_del_release_dto.pyi +++ /dev/null @@ -1,141 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index 6a3db449..00000000 --- a/python/apollo_openapi/model/namespace_release_dto.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index 6a3db449..00000000 --- a/python/apollo_openapi/model/namespace_release_dto.pyi +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_access_key_dto.py b/python/apollo_openapi/model/open_access_key_dto.py deleted file mode 100644 index 11d0e498..00000000 --- a/python/apollo_openapi/model/open_access_key_dto.py +++ /dev/null @@ -1,177 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenAccessKeyDTO( - 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 - id = schemas.Int64Schema - secret = schemas.StrSchema - appId = schemas.StrSchema - mode = schemas.IntSchema - enabled = schemas.BoolSchema - __annotations__ = { - "dataChangeCreatedBy": dataChangeCreatedBy, - "dataChangeLastModifiedBy": dataChangeLastModifiedBy, - "dataChangeCreatedByDisplayName": dataChangeCreatedByDisplayName, - "dataChangeLastModifiedByDisplayName": dataChangeLastModifiedByDisplayName, - "dataChangeCreatedTime": dataChangeCreatedTime, - "dataChangeLastModifiedTime": dataChangeLastModifiedTime, - "id": id, - "secret": secret, - "appId": appId, - "mode": mode, - "enabled": enabled, - } - - @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["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["secret"]) -> MetaOapg.properties.secret: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mode"]) -> MetaOapg.properties.mode: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enabled"]) -> MetaOapg.properties.enabled: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "secret", "appId", "mode", "enabled", ], 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["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["secret"]) -> typing.Union[MetaOapg.properties.secret, 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["mode"]) -> typing.Union[MetaOapg.properties.mode, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enabled"]) -> typing.Union[MetaOapg.properties.enabled, 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", "id", "secret", "appId", "mode", "enabled", ], 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, - id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, - secret: typing.Union[MetaOapg.properties.secret, str, schemas.Unset] = schemas.unset, - appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, - mode: typing.Union[MetaOapg.properties.mode, decimal.Decimal, int, schemas.Unset] = schemas.unset, - enabled: typing.Union[MetaOapg.properties.enabled, 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], - ) -> 'OpenAccessKeyDTO': - return super().__new__( - cls, - *_args, - dataChangeCreatedBy=dataChangeCreatedBy, - dataChangeLastModifiedBy=dataChangeLastModifiedBy, - dataChangeCreatedByDisplayName=dataChangeCreatedByDisplayName, - dataChangeLastModifiedByDisplayName=dataChangeLastModifiedByDisplayName, - dataChangeCreatedTime=dataChangeCreatedTime, - dataChangeLastModifiedTime=dataChangeLastModifiedTime, - id=id, - secret=secret, - appId=appId, - mode=mode, - enabled=enabled, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/open_access_key_dto.pyi b/python/apollo_openapi/model/open_access_key_dto.pyi deleted file mode 100644 index 11d0e498..00000000 --- a/python/apollo_openapi/model/open_access_key_dto.pyi +++ /dev/null @@ -1,177 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenAccessKeyDTO( - 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 - id = schemas.Int64Schema - secret = schemas.StrSchema - appId = schemas.StrSchema - mode = schemas.IntSchema - enabled = schemas.BoolSchema - __annotations__ = { - "dataChangeCreatedBy": dataChangeCreatedBy, - "dataChangeLastModifiedBy": dataChangeLastModifiedBy, - "dataChangeCreatedByDisplayName": dataChangeCreatedByDisplayName, - "dataChangeLastModifiedByDisplayName": dataChangeLastModifiedByDisplayName, - "dataChangeCreatedTime": dataChangeCreatedTime, - "dataChangeLastModifiedTime": dataChangeLastModifiedTime, - "id": id, - "secret": secret, - "appId": appId, - "mode": mode, - "enabled": enabled, - } - - @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["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["secret"]) -> MetaOapg.properties.secret: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["mode"]) -> MetaOapg.properties.mode: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enabled"]) -> MetaOapg.properties.enabled: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeLastModifiedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "id", "secret", "appId", "mode", "enabled", ], 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["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["secret"]) -> typing.Union[MetaOapg.properties.secret, 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["mode"]) -> typing.Union[MetaOapg.properties.mode, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enabled"]) -> typing.Union[MetaOapg.properties.enabled, 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", "id", "secret", "appId", "mode", "enabled", ], 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, - id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, - secret: typing.Union[MetaOapg.properties.secret, str, schemas.Unset] = schemas.unset, - appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, - mode: typing.Union[MetaOapg.properties.mode, decimal.Decimal, int, schemas.Unset] = schemas.unset, - enabled: typing.Union[MetaOapg.properties.enabled, 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], - ) -> 'OpenAccessKeyDTO': - return super().__new__( - cls, - *_args, - dataChangeCreatedBy=dataChangeCreatedBy, - dataChangeLastModifiedBy=dataChangeLastModifiedBy, - dataChangeCreatedByDisplayName=dataChangeCreatedByDisplayName, - dataChangeLastModifiedByDisplayName=dataChangeLastModifiedByDisplayName, - dataChangeCreatedTime=dataChangeCreatedTime, - dataChangeLastModifiedTime=dataChangeLastModifiedTime, - id=id, - secret=secret, - appId=appId, - mode=mode, - enabled=enabled, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/open_app_dto.py b/python/apollo_openapi/model/open_app_dto.py deleted file mode 100644 index 247a9d23..00000000 --- a/python/apollo_openapi/model/open_app_dto.py +++ /dev/null @@ -1,199 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 - dataChangeCreatedByDisplayName = schemas.StrSchema - dataChangeLastModifiedBy = schemas.StrSchema - dataChangeLastModifiedByDisplayName = 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 - ownerDisplayName = schemas.StrSchema - __annotations__ = { - "dataChangeCreatedBy": dataChangeCreatedBy, - "dataChangeCreatedByDisplayName": dataChangeCreatedByDisplayName, - "dataChangeLastModifiedBy": dataChangeLastModifiedBy, - "dataChangeLastModifiedByDisplayName": dataChangeLastModifiedByDisplayName, - "dataChangeCreatedTime": dataChangeCreatedTime, - "dataChangeLastModifiedTime": dataChangeLastModifiedTime, - "name": name, - "appId": appId, - "orgId": orgId, - "orgName": orgName, - "ownerName": ownerName, - "ownerEmail": ownerEmail, - "ownerDisplayName": ownerDisplayName, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedByDisplayName"]) -> MetaOapg.properties.dataChangeCreatedByDisplayName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... - - @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["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: typing_extensions.Literal["ownerDisplayName"]) -> MetaOapg.properties.ownerDisplayName: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "orgId", "orgName", "ownerName", "ownerEmail", "ownerDisplayName", ], 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["dataChangeCreatedByDisplayName"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, 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["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["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: typing_extensions.Literal["ownerDisplayName"]) -> typing.Union[MetaOapg.properties.ownerDisplayName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "orgId", "orgName", "ownerName", "ownerEmail", "ownerDisplayName", ], 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, - dataChangeCreatedByDisplayName: typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, str, schemas.Unset] = schemas.unset, - dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, 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, - 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, - ownerDisplayName: typing.Union[MetaOapg.properties.ownerDisplayName, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenAppDTO': - return super().__new__( - cls, - *_args, - dataChangeCreatedBy=dataChangeCreatedBy, - dataChangeCreatedByDisplayName=dataChangeCreatedByDisplayName, - dataChangeLastModifiedBy=dataChangeLastModifiedBy, - dataChangeLastModifiedByDisplayName=dataChangeLastModifiedByDisplayName, - dataChangeCreatedTime=dataChangeCreatedTime, - dataChangeLastModifiedTime=dataChangeLastModifiedTime, - name=name, - appId=appId, - orgId=orgId, - orgName=orgName, - ownerName=ownerName, - ownerEmail=ownerEmail, - ownerDisplayName=ownerDisplayName, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/open_app_dto.pyi b/python/apollo_openapi/model/open_app_dto.pyi deleted file mode 100644 index 247a9d23..00000000 --- a/python/apollo_openapi/model/open_app_dto.pyi +++ /dev/null @@ -1,199 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 - dataChangeCreatedByDisplayName = schemas.StrSchema - dataChangeLastModifiedBy = schemas.StrSchema - dataChangeLastModifiedByDisplayName = 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 - ownerDisplayName = schemas.StrSchema - __annotations__ = { - "dataChangeCreatedBy": dataChangeCreatedBy, - "dataChangeCreatedByDisplayName": dataChangeCreatedByDisplayName, - "dataChangeLastModifiedBy": dataChangeLastModifiedBy, - "dataChangeLastModifiedByDisplayName": dataChangeLastModifiedByDisplayName, - "dataChangeCreatedTime": dataChangeCreatedTime, - "dataChangeLastModifiedTime": dataChangeLastModifiedTime, - "name": name, - "appId": appId, - "orgId": orgId, - "orgName": orgName, - "ownerName": ownerName, - "ownerEmail": ownerEmail, - "ownerDisplayName": ownerDisplayName, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedByDisplayName"]) -> MetaOapg.properties.dataChangeCreatedByDisplayName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... - - @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["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: typing_extensions.Literal["ownerDisplayName"]) -> MetaOapg.properties.ownerDisplayName: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "orgId", "orgName", "ownerName", "ownerEmail", "ownerDisplayName", ], 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["dataChangeCreatedByDisplayName"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, 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["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["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: typing_extensions.Literal["ownerDisplayName"]) -> typing.Union[MetaOapg.properties.ownerDisplayName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "orgId", "orgName", "ownerName", "ownerEmail", "ownerDisplayName", ], 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, - dataChangeCreatedByDisplayName: typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, str, schemas.Unset] = schemas.unset, - dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, 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, - 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, - ownerDisplayName: typing.Union[MetaOapg.properties.ownerDisplayName, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenAppDTO': - return super().__new__( - cls, - *_args, - dataChangeCreatedBy=dataChangeCreatedBy, - dataChangeCreatedByDisplayName=dataChangeCreatedByDisplayName, - dataChangeLastModifiedBy=dataChangeLastModifiedBy, - dataChangeLastModifiedByDisplayName=dataChangeLastModifiedByDisplayName, - dataChangeCreatedTime=dataChangeCreatedTime, - dataChangeLastModifiedTime=dataChangeLastModifiedTime, - name=name, - appId=appId, - orgId=orgId, - orgName=orgName, - ownerName=ownerName, - ownerEmail=ownerEmail, - ownerDisplayName=ownerDisplayName, - _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 deleted file mode 100644 index 6a18ffd5..00000000 --- a/python/apollo_openapi/model/open_app_namespace_dto.py +++ /dev/null @@ -1,189 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 - dataChangeCreatedByDisplayName = schemas.StrSchema - dataChangeLastModifiedBy = schemas.StrSchema - dataChangeLastModifiedByDisplayName = 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, - "dataChangeCreatedByDisplayName": dataChangeCreatedByDisplayName, - "dataChangeLastModifiedBy": dataChangeLastModifiedBy, - "dataChangeLastModifiedByDisplayName": dataChangeLastModifiedByDisplayName, - "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["dataChangeCreatedByDisplayName"]) -> MetaOapg.properties.dataChangeCreatedByDisplayName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... - - @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["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", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "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["dataChangeCreatedByDisplayName"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, 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["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["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", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "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, - dataChangeCreatedByDisplayName: typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, str, schemas.Unset] = schemas.unset, - dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, 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, - 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, - dataChangeCreatedByDisplayName=dataChangeCreatedByDisplayName, - dataChangeLastModifiedBy=dataChangeLastModifiedBy, - dataChangeLastModifiedByDisplayName=dataChangeLastModifiedByDisplayName, - 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 deleted file mode 100644 index 6a18ffd5..00000000 --- a/python/apollo_openapi/model/open_app_namespace_dto.pyi +++ /dev/null @@ -1,189 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 - dataChangeCreatedByDisplayName = schemas.StrSchema - dataChangeLastModifiedBy = schemas.StrSchema - dataChangeLastModifiedByDisplayName = 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, - "dataChangeCreatedByDisplayName": dataChangeCreatedByDisplayName, - "dataChangeLastModifiedBy": dataChangeLastModifiedBy, - "dataChangeLastModifiedByDisplayName": dataChangeLastModifiedByDisplayName, - "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["dataChangeCreatedByDisplayName"]) -> MetaOapg.properties.dataChangeCreatedByDisplayName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... - - @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["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", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "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["dataChangeCreatedByDisplayName"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, 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["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["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", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "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, - dataChangeCreatedByDisplayName: typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, str, schemas.Unset] = schemas.unset, - dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, 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, - 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, - dataChangeCreatedByDisplayName=dataChangeCreatedByDisplayName, - dataChangeLastModifiedBy=dataChangeLastModifiedBy, - dataChangeLastModifiedByDisplayName=dataChangeLastModifiedByDisplayName, - 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_role_user_dto.py b/python/apollo_openapi/model/open_app_role_user_dto.py deleted file mode 100644 index 8bf5c62e..00000000 --- a/python/apollo_openapi/model/open_app_role_user_dto.py +++ /dev/null @@ -1,114 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenAppRoleUserDTO( - 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 - - - class masterUsers( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenUserInfoDTO']: - return OpenUserInfoDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenUserInfoDTO'], typing.List['OpenUserInfoDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'masterUsers': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenUserInfoDTO': - return super().__getitem__(i) - __annotations__ = { - "appId": appId, - "masterUsers": masterUsers, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["masterUsers"]) -> MetaOapg.properties.masterUsers: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["appId", "masterUsers", ], 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["masterUsers"]) -> typing.Union[MetaOapg.properties.masterUsers, 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", "masterUsers", ], 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, - masterUsers: typing.Union[MetaOapg.properties.masterUsers, 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], - ) -> 'OpenAppRoleUserDTO': - return super().__new__( - cls, - *_args, - appId=appId, - masterUsers=masterUsers, - _configuration=_configuration, - **kwargs, - ) - -from apollo_openapi.model.open_user_info_dto import OpenUserInfoDTO diff --git a/python/apollo_openapi/model/open_app_role_user_dto.pyi b/python/apollo_openapi/model/open_app_role_user_dto.pyi deleted file mode 100644 index 8bf5c62e..00000000 --- a/python/apollo_openapi/model/open_app_role_user_dto.pyi +++ /dev/null @@ -1,114 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenAppRoleUserDTO( - 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 - - - class masterUsers( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenUserInfoDTO']: - return OpenUserInfoDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenUserInfoDTO'], typing.List['OpenUserInfoDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'masterUsers': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenUserInfoDTO': - return super().__getitem__(i) - __annotations__ = { - "appId": appId, - "masterUsers": masterUsers, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["masterUsers"]) -> MetaOapg.properties.masterUsers: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["appId", "masterUsers", ], 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["masterUsers"]) -> typing.Union[MetaOapg.properties.masterUsers, 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", "masterUsers", ], 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, - masterUsers: typing.Union[MetaOapg.properties.masterUsers, 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], - ) -> 'OpenAppRoleUserDTO': - return super().__new__( - cls, - *_args, - appId=appId, - masterUsers=masterUsers, - _configuration=_configuration, - **kwargs, - ) - -from apollo_openapi.model.open_user_info_dto import OpenUserInfoDTO diff --git a/python/apollo_openapi/model/open_cluster_dto.py b/python/apollo_openapi/model/open_cluster_dto.py deleted file mode 100644 index dd5208bc..00000000 --- a/python/apollo_openapi/model/open_cluster_dto.py +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 - dataChangeCreatedByDisplayName = schemas.StrSchema - dataChangeLastModifiedBy = schemas.StrSchema - dataChangeLastModifiedByDisplayName = schemas.StrSchema - dataChangeCreatedTime = schemas.StrSchema - dataChangeLastModifiedTime = schemas.StrSchema - name = schemas.StrSchema - appId = schemas.StrSchema - id = schemas.Int64Schema - parentClusterId = schemas.Int64Schema - comment = schemas.StrSchema - __annotations__ = { - "dataChangeCreatedBy": dataChangeCreatedBy, - "dataChangeCreatedByDisplayName": dataChangeCreatedByDisplayName, - "dataChangeLastModifiedBy": dataChangeLastModifiedBy, - "dataChangeLastModifiedByDisplayName": dataChangeLastModifiedByDisplayName, - "dataChangeCreatedTime": dataChangeCreatedTime, - "dataChangeLastModifiedTime": dataChangeLastModifiedTime, - "name": name, - "appId": appId, - "id": id, - "parentClusterId": parentClusterId, - "comment": comment, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedByDisplayName"]) -> MetaOapg.properties.dataChangeCreatedByDisplayName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... - - @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["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["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["parentClusterId"]) -> MetaOapg.properties.parentClusterId: ... - - @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", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "id", "parentClusterId", "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["dataChangeCreatedByDisplayName"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, 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["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["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["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["parentClusterId"]) -> typing.Union[MetaOapg.properties.parentClusterId, 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", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "id", "parentClusterId", "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, - dataChangeCreatedByDisplayName: typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, str, schemas.Unset] = schemas.unset, - dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, 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, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, - id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, - parentClusterId: typing.Union[MetaOapg.properties.parentClusterId, decimal.Decimal, int, 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], - ) -> 'OpenClusterDTO': - return super().__new__( - cls, - *_args, - dataChangeCreatedBy=dataChangeCreatedBy, - dataChangeCreatedByDisplayName=dataChangeCreatedByDisplayName, - dataChangeLastModifiedBy=dataChangeLastModifiedBy, - dataChangeLastModifiedByDisplayName=dataChangeLastModifiedByDisplayName, - dataChangeCreatedTime=dataChangeCreatedTime, - dataChangeLastModifiedTime=dataChangeLastModifiedTime, - name=name, - appId=appId, - id=id, - parentClusterId=parentClusterId, - comment=comment, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/open_cluster_dto.pyi b/python/apollo_openapi/model/open_cluster_dto.pyi deleted file mode 100644 index dd5208bc..00000000 --- a/python/apollo_openapi/model/open_cluster_dto.pyi +++ /dev/null @@ -1,179 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 - dataChangeCreatedByDisplayName = schemas.StrSchema - dataChangeLastModifiedBy = schemas.StrSchema - dataChangeLastModifiedByDisplayName = schemas.StrSchema - dataChangeCreatedTime = schemas.StrSchema - dataChangeLastModifiedTime = schemas.StrSchema - name = schemas.StrSchema - appId = schemas.StrSchema - id = schemas.Int64Schema - parentClusterId = schemas.Int64Schema - comment = schemas.StrSchema - __annotations__ = { - "dataChangeCreatedBy": dataChangeCreatedBy, - "dataChangeCreatedByDisplayName": dataChangeCreatedByDisplayName, - "dataChangeLastModifiedBy": dataChangeLastModifiedBy, - "dataChangeLastModifiedByDisplayName": dataChangeLastModifiedByDisplayName, - "dataChangeCreatedTime": dataChangeCreatedTime, - "dataChangeLastModifiedTime": dataChangeLastModifiedTime, - "name": name, - "appId": appId, - "id": id, - "parentClusterId": parentClusterId, - "comment": comment, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedByDisplayName"]) -> MetaOapg.properties.dataChangeCreatedByDisplayName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... - - @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["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["id"]) -> MetaOapg.properties.id: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["parentClusterId"]) -> MetaOapg.properties.parentClusterId: ... - - @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", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "id", "parentClusterId", "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["dataChangeCreatedByDisplayName"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, 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["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["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["id"]) -> typing.Union[MetaOapg.properties.id, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["parentClusterId"]) -> typing.Union[MetaOapg.properties.parentClusterId, 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", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "name", "appId", "id", "parentClusterId", "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, - dataChangeCreatedByDisplayName: typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, str, schemas.Unset] = schemas.unset, - dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, 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, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, - id: typing.Union[MetaOapg.properties.id, decimal.Decimal, int, schemas.Unset] = schemas.unset, - parentClusterId: typing.Union[MetaOapg.properties.parentClusterId, decimal.Decimal, int, 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], - ) -> 'OpenClusterDTO': - return super().__new__( - cls, - *_args, - dataChangeCreatedBy=dataChangeCreatedBy, - dataChangeCreatedByDisplayName=dataChangeCreatedByDisplayName, - dataChangeLastModifiedBy=dataChangeLastModifiedBy, - dataChangeLastModifiedByDisplayName=dataChangeLastModifiedByDisplayName, - dataChangeCreatedTime=dataChangeCreatedTime, - dataChangeLastModifiedTime=dataChangeLastModifiedTime, - name=name, - appId=appId, - id=id, - parentClusterId=parentClusterId, - comment=comment, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/open_cluster_namespace_role_user_dto.py b/python/apollo_openapi/model/open_cluster_namespace_role_user_dto.py deleted file mode 100644 index 90c495a7..00000000 --- a/python/apollo_openapi/model/open_cluster_namespace_role_user_dto.py +++ /dev/null @@ -1,169 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenClusterNamespaceRoleUserDTO( - 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 - cluster = schemas.StrSchema - - - class modifyRoleUsers( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenUserInfoDTO']: - return OpenUserInfoDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenUserInfoDTO'], typing.List['OpenUserInfoDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'modifyRoleUsers': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenUserInfoDTO': - return super().__getitem__(i) - - - class releaseRoleUsers( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenUserInfoDTO']: - return OpenUserInfoDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenUserInfoDTO'], typing.List['OpenUserInfoDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'releaseRoleUsers': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenUserInfoDTO': - return super().__getitem__(i) - __annotations__ = { - "appId": appId, - "env": env, - "cluster": cluster, - "modifyRoleUsers": modifyRoleUsers, - "releaseRoleUsers": releaseRoleUsers, - } - - @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["cluster"]) -> MetaOapg.properties.cluster: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["modifyRoleUsers"]) -> MetaOapg.properties.modifyRoleUsers: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["releaseRoleUsers"]) -> MetaOapg.properties.releaseRoleUsers: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["appId", "env", "cluster", "modifyRoleUsers", "releaseRoleUsers", ], 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["cluster"]) -> typing.Union[MetaOapg.properties.cluster, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["modifyRoleUsers"]) -> typing.Union[MetaOapg.properties.modifyRoleUsers, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["releaseRoleUsers"]) -> typing.Union[MetaOapg.properties.releaseRoleUsers, 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", "cluster", "modifyRoleUsers", "releaseRoleUsers", ], 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, - cluster: typing.Union[MetaOapg.properties.cluster, str, schemas.Unset] = schemas.unset, - modifyRoleUsers: typing.Union[MetaOapg.properties.modifyRoleUsers, list, tuple, schemas.Unset] = schemas.unset, - releaseRoleUsers: typing.Union[MetaOapg.properties.releaseRoleUsers, 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], - ) -> 'OpenClusterNamespaceRoleUserDTO': - return super().__new__( - cls, - *_args, - appId=appId, - env=env, - cluster=cluster, - modifyRoleUsers=modifyRoleUsers, - releaseRoleUsers=releaseRoleUsers, - _configuration=_configuration, - **kwargs, - ) - -from apollo_openapi.model.open_user_info_dto import OpenUserInfoDTO diff --git a/python/apollo_openapi/model/open_cluster_namespace_role_user_dto.pyi b/python/apollo_openapi/model/open_cluster_namespace_role_user_dto.pyi deleted file mode 100644 index 90c495a7..00000000 --- a/python/apollo_openapi/model/open_cluster_namespace_role_user_dto.pyi +++ /dev/null @@ -1,169 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenClusterNamespaceRoleUserDTO( - 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 - cluster = schemas.StrSchema - - - class modifyRoleUsers( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenUserInfoDTO']: - return OpenUserInfoDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenUserInfoDTO'], typing.List['OpenUserInfoDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'modifyRoleUsers': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenUserInfoDTO': - return super().__getitem__(i) - - - class releaseRoleUsers( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenUserInfoDTO']: - return OpenUserInfoDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenUserInfoDTO'], typing.List['OpenUserInfoDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'releaseRoleUsers': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenUserInfoDTO': - return super().__getitem__(i) - __annotations__ = { - "appId": appId, - "env": env, - "cluster": cluster, - "modifyRoleUsers": modifyRoleUsers, - "releaseRoleUsers": releaseRoleUsers, - } - - @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["cluster"]) -> MetaOapg.properties.cluster: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["modifyRoleUsers"]) -> MetaOapg.properties.modifyRoleUsers: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["releaseRoleUsers"]) -> MetaOapg.properties.releaseRoleUsers: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["appId", "env", "cluster", "modifyRoleUsers", "releaseRoleUsers", ], 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["cluster"]) -> typing.Union[MetaOapg.properties.cluster, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["modifyRoleUsers"]) -> typing.Union[MetaOapg.properties.modifyRoleUsers, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["releaseRoleUsers"]) -> typing.Union[MetaOapg.properties.releaseRoleUsers, 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", "cluster", "modifyRoleUsers", "releaseRoleUsers", ], 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, - cluster: typing.Union[MetaOapg.properties.cluster, str, schemas.Unset] = schemas.unset, - modifyRoleUsers: typing.Union[MetaOapg.properties.modifyRoleUsers, list, tuple, schemas.Unset] = schemas.unset, - releaseRoleUsers: typing.Union[MetaOapg.properties.releaseRoleUsers, 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], - ) -> 'OpenClusterNamespaceRoleUserDTO': - return super().__new__( - cls, - *_args, - appId=appId, - env=env, - cluster=cluster, - modifyRoleUsers=modifyRoleUsers, - releaseRoleUsers=releaseRoleUsers, - _configuration=_configuration, - **kwargs, - ) - -from apollo_openapi.model.open_user_info_dto import OpenUserInfoDTO diff --git a/python/apollo_openapi/model/open_create_app_dto.py b/python/apollo_openapi/model/open_create_app_dto.py deleted file mode 100644 index af4cc30b..00000000 --- a/python/apollo_openapi/model/open_create_app_dto.py +++ /dev/null @@ -1,127 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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: - unique_items = True - 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 deleted file mode 100644 index 9475958a..00000000 --- a/python/apollo_openapi/model/open_create_app_dto.pyi +++ /dev/null @@ -1,126 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_namespace_dto.py b/python/apollo_openapi/model/open_create_namespace_dto.py deleted file mode 100644 index abb95b8c..00000000 --- a/python/apollo_openapi/model/open_create_namespace_dto.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

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

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - - -class OpenCreateNamespaceDTO( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - - Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - """ - - - class MetaOapg: - - class properties: - appId = schemas.StrSchema - env = schemas.StrSchema - clusterName = schemas.StrSchema - appNamespaceName = schemas.StrSchema - __annotations__ = { - "appId": appId, - "env": env, - "clusterName": clusterName, - "appNamespaceName": appNamespaceName, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["clusterName"]) -> MetaOapg.properties.clusterName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["appNamespaceName"]) -> MetaOapg.properties.appNamespaceName: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["appId", "env", "clusterName", "appNamespaceName", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["appId"]) -> typing.Union[MetaOapg.properties.appId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["clusterName"]) -> typing.Union[MetaOapg.properties.clusterName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["appNamespaceName"]) -> typing.Union[MetaOapg.properties.appNamespaceName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["appId", "env", "clusterName", "appNamespaceName", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - appId: typing.Union[MetaOapg.properties.appId, str, schemas.Unset] = schemas.unset, - env: typing.Union[MetaOapg.properties.env, str, schemas.Unset] = schemas.unset, - clusterName: typing.Union[MetaOapg.properties.clusterName, str, schemas.Unset] = schemas.unset, - appNamespaceName: typing.Union[MetaOapg.properties.appNamespaceName, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenCreateNamespaceDTO': - return super().__new__( - cls, - *_args, - appId=appId, - env=env, - clusterName=clusterName, - appNamespaceName=appNamespaceName, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/open_env_cluster_dto.py b/python/apollo_openapi/model/open_env_cluster_dto.py deleted file mode 100644 index 41e6702d..00000000 --- a/python/apollo_openapi/model/open_env_cluster_dto.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index 41e6702d..00000000 --- a/python/apollo_openapi/model/open_env_cluster_dto.pyi +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index 3c10d0ba..00000000 --- a/python/apollo_openapi/model/open_env_cluster_info.py +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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: - code = schemas.IntSchema - message = schemas.StrSchema - 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__ = { - "code": code, - "message": message, - "env": env, - "clusters": clusters, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... - - @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["code", "message", "env", "clusters", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> typing.Union[MetaOapg.properties.code, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> typing.Union[MetaOapg.properties.message, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... - - @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["code", "message", "env", "clusters", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, decimal.Decimal, int, schemas.Unset] = schemas.unset, - message: typing.Union[MetaOapg.properties.message, str, schemas.Unset] = schemas.unset, - env: typing.Union[MetaOapg.properties.env, str, schemas.Unset] = schemas.unset, - clusters: typing.Union[MetaOapg.properties.clusters, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **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, - code=code, - message=message, - 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 deleted file mode 100644 index 3c10d0ba..00000000 --- a/python/apollo_openapi/model/open_env_cluster_info.pyi +++ /dev/null @@ -1,134 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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: - code = schemas.IntSchema - message = schemas.StrSchema - 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__ = { - "code": code, - "message": message, - "env": env, - "clusters": clusters, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... - - @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["code", "message", "env", "clusters", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> typing.Union[MetaOapg.properties.code, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> typing.Union[MetaOapg.properties.message, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["env"]) -> typing.Union[MetaOapg.properties.env, schemas.Unset]: ... - - @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["code", "message", "env", "clusters", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, decimal.Decimal, int, schemas.Unset] = schemas.unset, - message: typing.Union[MetaOapg.properties.message, str, schemas.Unset] = schemas.unset, - env: typing.Union[MetaOapg.properties.env, str, schemas.Unset] = schemas.unset, - clusters: typing.Union[MetaOapg.properties.clusters, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **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, - code=code, - message=message, - 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_namespace_role_user_dto.py b/python/apollo_openapi/model/open_env_namespace_role_user_dto.py deleted file mode 100644 index 9a7900f6..00000000 --- a/python/apollo_openapi/model/open_env_namespace_role_user_dto.py +++ /dev/null @@ -1,169 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenEnvNamespaceRoleUserDTO( - 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 - namespaceName = schemas.StrSchema - - - class modifyRoleUsers( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenUserInfoDTO']: - return OpenUserInfoDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenUserInfoDTO'], typing.List['OpenUserInfoDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'modifyRoleUsers': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenUserInfoDTO': - return super().__getitem__(i) - - - class releaseRoleUsers( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenUserInfoDTO']: - return OpenUserInfoDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenUserInfoDTO'], typing.List['OpenUserInfoDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'releaseRoleUsers': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenUserInfoDTO': - return super().__getitem__(i) - env = schemas.StrSchema - __annotations__ = { - "appId": appId, - "namespaceName": namespaceName, - "modifyRoleUsers": modifyRoleUsers, - "releaseRoleUsers": releaseRoleUsers, - "env": env, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["namespaceName"]) -> MetaOapg.properties.namespaceName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["modifyRoleUsers"]) -> MetaOapg.properties.modifyRoleUsers: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["releaseRoleUsers"]) -> MetaOapg.properties.releaseRoleUsers: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["appId", "namespaceName", "modifyRoleUsers", "releaseRoleUsers", "env", ], 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["namespaceName"]) -> typing.Union[MetaOapg.properties.namespaceName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["modifyRoleUsers"]) -> typing.Union[MetaOapg.properties.modifyRoleUsers, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["releaseRoleUsers"]) -> typing.Union[MetaOapg.properties.releaseRoleUsers, 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: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["appId", "namespaceName", "modifyRoleUsers", "releaseRoleUsers", "env", ], 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, - namespaceName: typing.Union[MetaOapg.properties.namespaceName, str, schemas.Unset] = schemas.unset, - modifyRoleUsers: typing.Union[MetaOapg.properties.modifyRoleUsers, list, tuple, schemas.Unset] = schemas.unset, - releaseRoleUsers: typing.Union[MetaOapg.properties.releaseRoleUsers, list, tuple, schemas.Unset] = schemas.unset, - env: typing.Union[MetaOapg.properties.env, 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], - ) -> 'OpenEnvNamespaceRoleUserDTO': - return super().__new__( - cls, - *_args, - appId=appId, - namespaceName=namespaceName, - modifyRoleUsers=modifyRoleUsers, - releaseRoleUsers=releaseRoleUsers, - env=env, - _configuration=_configuration, - **kwargs, - ) - -from apollo_openapi.model.open_user_info_dto import OpenUserInfoDTO diff --git a/python/apollo_openapi/model/open_env_namespace_role_user_dto.pyi b/python/apollo_openapi/model/open_env_namespace_role_user_dto.pyi deleted file mode 100644 index 9a7900f6..00000000 --- a/python/apollo_openapi/model/open_env_namespace_role_user_dto.pyi +++ /dev/null @@ -1,169 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenEnvNamespaceRoleUserDTO( - 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 - namespaceName = schemas.StrSchema - - - class modifyRoleUsers( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenUserInfoDTO']: - return OpenUserInfoDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenUserInfoDTO'], typing.List['OpenUserInfoDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'modifyRoleUsers': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenUserInfoDTO': - return super().__getitem__(i) - - - class releaseRoleUsers( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenUserInfoDTO']: - return OpenUserInfoDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenUserInfoDTO'], typing.List['OpenUserInfoDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'releaseRoleUsers': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenUserInfoDTO': - return super().__getitem__(i) - env = schemas.StrSchema - __annotations__ = { - "appId": appId, - "namespaceName": namespaceName, - "modifyRoleUsers": modifyRoleUsers, - "releaseRoleUsers": releaseRoleUsers, - "env": env, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["namespaceName"]) -> MetaOapg.properties.namespaceName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["modifyRoleUsers"]) -> MetaOapg.properties.modifyRoleUsers: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["releaseRoleUsers"]) -> MetaOapg.properties.releaseRoleUsers: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["env"]) -> MetaOapg.properties.env: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["appId", "namespaceName", "modifyRoleUsers", "releaseRoleUsers", "env", ], 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["namespaceName"]) -> typing.Union[MetaOapg.properties.namespaceName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["modifyRoleUsers"]) -> typing.Union[MetaOapg.properties.modifyRoleUsers, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["releaseRoleUsers"]) -> typing.Union[MetaOapg.properties.releaseRoleUsers, 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: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["appId", "namespaceName", "modifyRoleUsers", "releaseRoleUsers", "env", ], 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, - namespaceName: typing.Union[MetaOapg.properties.namespaceName, str, schemas.Unset] = schemas.unset, - modifyRoleUsers: typing.Union[MetaOapg.properties.modifyRoleUsers, list, tuple, schemas.Unset] = schemas.unset, - releaseRoleUsers: typing.Union[MetaOapg.properties.releaseRoleUsers, list, tuple, schemas.Unset] = schemas.unset, - env: typing.Union[MetaOapg.properties.env, 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], - ) -> 'OpenEnvNamespaceRoleUserDTO': - return super().__new__( - cls, - *_args, - appId=appId, - namespaceName=namespaceName, - modifyRoleUsers=modifyRoleUsers, - releaseRoleUsers=releaseRoleUsers, - env=env, - _configuration=_configuration, - **kwargs, - ) - -from apollo_openapi.model.open_user_info_dto import OpenUserInfoDTO diff --git a/python/apollo_openapi/model/open_gray_release_rule_dto.py b/python/apollo_openapi/model/open_gray_release_rule_dto.py deleted file mode 100644 index d6554fdc..00000000 --- a/python/apollo_openapi/model/open_gray_release_rule_dto.py +++ /dev/null @@ -1,207 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 - dataChangeCreatedByDisplayName = schemas.StrSchema - dataChangeLastModifiedBy = schemas.StrSchema - dataChangeLastModifiedByDisplayName = 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: - unique_items = True - - @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, - "dataChangeCreatedByDisplayName": dataChangeCreatedByDisplayName, - "dataChangeLastModifiedBy": dataChangeLastModifiedBy, - "dataChangeLastModifiedByDisplayName": dataChangeLastModifiedByDisplayName, - "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["dataChangeCreatedByDisplayName"]) -> MetaOapg.properties.dataChangeCreatedByDisplayName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... - - @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["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", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "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["dataChangeCreatedByDisplayName"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, 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["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["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", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "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, - dataChangeCreatedByDisplayName: typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, str, schemas.Unset] = schemas.unset, - dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, 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, - 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, - dataChangeCreatedByDisplayName=dataChangeCreatedByDisplayName, - dataChangeLastModifiedBy=dataChangeLastModifiedBy, - dataChangeLastModifiedByDisplayName=dataChangeLastModifiedByDisplayName, - 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 deleted file mode 100644 index 7a771866..00000000 --- a/python/apollo_openapi/model/open_gray_release_rule_dto.pyi +++ /dev/null @@ -1,206 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 - dataChangeCreatedByDisplayName = schemas.StrSchema - dataChangeLastModifiedBy = schemas.StrSchema - dataChangeLastModifiedByDisplayName = 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, - "dataChangeCreatedByDisplayName": dataChangeCreatedByDisplayName, - "dataChangeLastModifiedBy": dataChangeLastModifiedBy, - "dataChangeLastModifiedByDisplayName": dataChangeLastModifiedByDisplayName, - "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["dataChangeCreatedByDisplayName"]) -> MetaOapg.properties.dataChangeCreatedByDisplayName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... - - @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["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", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "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["dataChangeCreatedByDisplayName"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, 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["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["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", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "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, - dataChangeCreatedByDisplayName: typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, str, schemas.Unset] = schemas.unset, - dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, 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, - 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, - dataChangeCreatedByDisplayName=dataChangeCreatedByDisplayName, - dataChangeLastModifiedBy=dataChangeLastModifiedBy, - dataChangeLastModifiedByDisplayName=dataChangeLastModifiedByDisplayName, - 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 deleted file mode 100644 index 6da47dab..00000000 --- a/python/apollo_openapi/model/open_gray_release_rule_item_dto.py +++ /dev/null @@ -1,145 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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: - unique_items = True - 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: - unique_items = True - 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 deleted file mode 100644 index f1ffc832..00000000 --- a/python/apollo_openapi/model/open_gray_release_rule_item_dto.pyi +++ /dev/null @@ -1,143 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index 1334fa30..00000000 --- a/python/apollo_openapi/model/open_instance_config_dto.py +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index 1334fa30..00000000 --- a/python/apollo_openapi/model/open_instance_config_dto.pyi +++ /dev/null @@ -1,102 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index 5aa1641e..00000000 --- a/python/apollo_openapi/model/open_instance_dto.py +++ /dev/null @@ -1,164 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index 5aa1641e..00000000 --- a/python/apollo_openapi/model/open_instance_dto.pyi +++ /dev/null @@ -1,164 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_page_dto.py b/python/apollo_openapi/model/open_instance_page_dto.py deleted file mode 100644 index 87be4e06..00000000 --- a/python/apollo_openapi/model/open_instance_page_dto.py +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenInstancePageDTO( - 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 instances( - 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, - ) -> 'instances': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenInstanceDTO': - return super().__getitem__(i) - __annotations__ = { - "page": page, - "size": size, - "total": total, - "instances": instances, - } - - @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["instances"]) -> MetaOapg.properties.instances: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["page", "size", "total", "instances", ], 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["instances"]) -> typing.Union[MetaOapg.properties.instances, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["page", "size", "total", "instances", ], 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, - instances: typing.Union[MetaOapg.properties.instances, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenInstancePageDTO': - return super().__new__( - cls, - *_args, - page=page, - size=size, - total=total, - instances=instances, - _configuration=_configuration, - **kwargs, - ) - -from apollo_openapi.model.open_instance_dto import OpenInstanceDTO diff --git a/python/apollo_openapi/model/open_instance_page_dto.pyi b/python/apollo_openapi/model/open_instance_page_dto.pyi deleted file mode 100644 index 87be4e06..00000000 --- a/python/apollo_openapi/model/open_instance_page_dto.pyi +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenInstancePageDTO( - 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 instances( - 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, - ) -> 'instances': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenInstanceDTO': - return super().__getitem__(i) - __annotations__ = { - "page": page, - "size": size, - "total": total, - "instances": instances, - } - - @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["instances"]) -> MetaOapg.properties.instances: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["page", "size", "total", "instances", ], 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["instances"]) -> typing.Union[MetaOapg.properties.instances, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["page", "size", "total", "instances", ], 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, - instances: typing.Union[MetaOapg.properties.instances, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenInstancePageDTO': - return super().__new__( - cls, - *_args, - page=page, - size=size, - total=total, - instances=instances, - _configuration=_configuration, - **kwargs, - ) - -from apollo_openapi.model.open_instance_dto import OpenInstanceDTO diff --git a/python/apollo_openapi/model/open_item_diff_dto.py b/python/apollo_openapi/model/open_item_diff_dto.py deleted file mode 100644 index 83ea851a..00000000 --- a/python/apollo_openapi/model/open_item_diff_dto.py +++ /dev/null @@ -1,208 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

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

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - - -class OpenItemDiffDTO( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - code = schemas.IntSchema - message = schemas.StrSchema - - @staticmethod - def namespace() -> typing.Type['OpenNamespaceIdentifier']: - return OpenNamespaceIdentifier - - - class createItems( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenItemDTO']: - return OpenItemDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'createItems': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenItemDTO': - return super().__getitem__(i) - - - class deleteItems( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenItemDTO']: - return OpenItemDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'deleteItems': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenItemDTO': - return super().__getitem__(i) - - - class updateItems( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenItemDTO']: - return OpenItemDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenItemDTO'], typing.List['OpenItemDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'updateItems': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenItemDTO': - return super().__getitem__(i) - __annotations__ = { - "code": code, - "message": message, - "namespace": namespace, - "createItems": createItems, - "deleteItems": deleteItems, - "updateItems": updateItems, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["namespace"]) -> 'OpenNamespaceIdentifier': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["createItems"]) -> MetaOapg.properties.createItems: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["deleteItems"]) -> MetaOapg.properties.deleteItems: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["updateItems"]) -> MetaOapg.properties.updateItems: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", "namespace", "createItems", "deleteItems", "updateItems", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> typing.Union[MetaOapg.properties.code, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> typing.Union[MetaOapg.properties.message, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["namespace"]) -> typing.Union['OpenNamespaceIdentifier', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["createItems"]) -> typing.Union[MetaOapg.properties.createItems, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["deleteItems"]) -> typing.Union[MetaOapg.properties.deleteItems, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["updateItems"]) -> typing.Union[MetaOapg.properties.updateItems, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", "namespace", "createItems", "deleteItems", "updateItems", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, decimal.Decimal, int, schemas.Unset] = schemas.unset, - message: typing.Union[MetaOapg.properties.message, str, schemas.Unset] = schemas.unset, - namespace: typing.Union['OpenNamespaceIdentifier', schemas.Unset] = schemas.unset, - createItems: typing.Union[MetaOapg.properties.createItems, list, tuple, schemas.Unset] = schemas.unset, - deleteItems: typing.Union[MetaOapg.properties.deleteItems, list, tuple, schemas.Unset] = schemas.unset, - updateItems: typing.Union[MetaOapg.properties.updateItems, list, tuple, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenItemDiffDTO': - return super().__new__( - cls, - *_args, - code=code, - message=message, - namespace=namespace, - createItems=createItems, - deleteItems=deleteItems, - updateItems=updateItems, - _configuration=_configuration, - **kwargs, - ) - -from apollo_openapi.model.open_item_dto import OpenItemDTO -from apollo_openapi.model.open_namespace_identifier import OpenNamespaceIdentifier diff --git a/python/apollo_openapi/model/open_item_dto.py b/python/apollo_openapi/model/open_item_dto.py deleted file mode 100644 index bb7594fa..00000000 --- a/python/apollo_openapi/model/open_item_dto.py +++ /dev/null @@ -1,194 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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: - key = schemas.StrSchema - value = schemas.StrSchema - type = schemas.IntSchema - comment = schemas.StrSchema - lineNum = schemas.Int32Schema - - @staticmethod - def extendInfo() -> typing.Type['OpenItemExtendDTO']: - return OpenItemExtendDTO - dataChangeCreatedBy = schemas.StrSchema - dataChangeCreatedByDisplayName = schemas.StrSchema - dataChangeLastModifiedBy = schemas.StrSchema - dataChangeLastModifiedByDisplayName = schemas.StrSchema - dataChangeCreatedTime = schemas.StrSchema - dataChangeLastModifiedTime = schemas.StrSchema - __annotations__ = { - "key": key, - "value": value, - "type": type, - "comment": comment, - "lineNum": lineNum, - "extendInfo": extendInfo, - "dataChangeCreatedBy": dataChangeCreatedBy, - "dataChangeCreatedByDisplayName": dataChangeCreatedByDisplayName, - "dataChangeLastModifiedBy": dataChangeLastModifiedBy, - "dataChangeLastModifiedByDisplayName": dataChangeLastModifiedByDisplayName, - "dataChangeCreatedTime": dataChangeCreatedTime, - "dataChangeLastModifiedTime": dataChangeLastModifiedTime, - } - - @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: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lineNum"]) -> MetaOapg.properties.lineNum: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["extendInfo"]) -> 'OpenItemExtendDTO': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedByDisplayName"]) -> MetaOapg.properties.dataChangeCreatedByDisplayName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... - - @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: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["key", "value", "type", "comment", "lineNum", "extendInfo", "dataChangeCreatedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", ], 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: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, 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["lineNum"]) -> typing.Union[MetaOapg.properties.lineNum, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["extendInfo"]) -> typing.Union['OpenItemExtendDTO', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, 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["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, 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: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["key", "value", "type", "comment", "lineNum", "extendInfo", "dataChangeCreatedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - key: typing.Union[MetaOapg.properties.key, str, schemas.Unset] = schemas.unset, - value: typing.Union[MetaOapg.properties.value, str, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, decimal.Decimal, int, schemas.Unset] = schemas.unset, - comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, - lineNum: typing.Union[MetaOapg.properties.lineNum, decimal.Decimal, int, schemas.Unset] = schemas.unset, - extendInfo: typing.Union['OpenItemExtendDTO', schemas.Unset] = schemas.unset, - dataChangeCreatedBy: typing.Union[MetaOapg.properties.dataChangeCreatedBy, str, schemas.Unset] = schemas.unset, - dataChangeCreatedByDisplayName: typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, str, schemas.Unset] = schemas.unset, - dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, 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, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenItemDTO': - return super().__new__( - cls, - *_args, - key=key, - value=value, - type=type, - comment=comment, - lineNum=lineNum, - extendInfo=extendInfo, - dataChangeCreatedBy=dataChangeCreatedBy, - dataChangeCreatedByDisplayName=dataChangeCreatedByDisplayName, - dataChangeLastModifiedBy=dataChangeLastModifiedBy, - dataChangeLastModifiedByDisplayName=dataChangeLastModifiedByDisplayName, - dataChangeCreatedTime=dataChangeCreatedTime, - dataChangeLastModifiedTime=dataChangeLastModifiedTime, - _configuration=_configuration, - **kwargs, - ) - -from apollo_openapi.model.open_item_extend_dto import OpenItemExtendDTO diff --git a/python/apollo_openapi/model/open_item_dto.pyi b/python/apollo_openapi/model/open_item_dto.pyi deleted file mode 100644 index bb7594fa..00000000 --- a/python/apollo_openapi/model/open_item_dto.pyi +++ /dev/null @@ -1,194 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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: - key = schemas.StrSchema - value = schemas.StrSchema - type = schemas.IntSchema - comment = schemas.StrSchema - lineNum = schemas.Int32Schema - - @staticmethod - def extendInfo() -> typing.Type['OpenItemExtendDTO']: - return OpenItemExtendDTO - dataChangeCreatedBy = schemas.StrSchema - dataChangeCreatedByDisplayName = schemas.StrSchema - dataChangeLastModifiedBy = schemas.StrSchema - dataChangeLastModifiedByDisplayName = schemas.StrSchema - dataChangeCreatedTime = schemas.StrSchema - dataChangeLastModifiedTime = schemas.StrSchema - __annotations__ = { - "key": key, - "value": value, - "type": type, - "comment": comment, - "lineNum": lineNum, - "extendInfo": extendInfo, - "dataChangeCreatedBy": dataChangeCreatedBy, - "dataChangeCreatedByDisplayName": dataChangeCreatedByDisplayName, - "dataChangeLastModifiedBy": dataChangeLastModifiedBy, - "dataChangeLastModifiedByDisplayName": dataChangeLastModifiedByDisplayName, - "dataChangeCreatedTime": dataChangeCreatedTime, - "dataChangeLastModifiedTime": dataChangeLastModifiedTime, - } - - @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: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["comment"]) -> MetaOapg.properties.comment: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["lineNum"]) -> MetaOapg.properties.lineNum: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["extendInfo"]) -> 'OpenItemExtendDTO': ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedByDisplayName"]) -> MetaOapg.properties.dataChangeCreatedByDisplayName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... - - @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: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["key", "value", "type", "comment", "lineNum", "extendInfo", "dataChangeCreatedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", ], 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: typing_extensions.Literal["type"]) -> typing.Union[MetaOapg.properties.type, 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["lineNum"]) -> typing.Union[MetaOapg.properties.lineNum, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["extendInfo"]) -> typing.Union['OpenItemExtendDTO', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedBy, 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["dataChangeLastModifiedBy"]) -> typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, 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: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["key", "value", "type", "comment", "lineNum", "extendInfo", "dataChangeCreatedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - key: typing.Union[MetaOapg.properties.key, str, schemas.Unset] = schemas.unset, - value: typing.Union[MetaOapg.properties.value, str, schemas.Unset] = schemas.unset, - type: typing.Union[MetaOapg.properties.type, decimal.Decimal, int, schemas.Unset] = schemas.unset, - comment: typing.Union[MetaOapg.properties.comment, str, schemas.Unset] = schemas.unset, - lineNum: typing.Union[MetaOapg.properties.lineNum, decimal.Decimal, int, schemas.Unset] = schemas.unset, - extendInfo: typing.Union['OpenItemExtendDTO', schemas.Unset] = schemas.unset, - dataChangeCreatedBy: typing.Union[MetaOapg.properties.dataChangeCreatedBy, str, schemas.Unset] = schemas.unset, - dataChangeCreatedByDisplayName: typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, str, schemas.Unset] = schemas.unset, - dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, 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, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenItemDTO': - return super().__new__( - cls, - *_args, - key=key, - value=value, - type=type, - comment=comment, - lineNum=lineNum, - extendInfo=extendInfo, - dataChangeCreatedBy=dataChangeCreatedBy, - dataChangeCreatedByDisplayName=dataChangeCreatedByDisplayName, - dataChangeLastModifiedBy=dataChangeLastModifiedBy, - dataChangeLastModifiedByDisplayName=dataChangeLastModifiedByDisplayName, - dataChangeCreatedTime=dataChangeCreatedTime, - dataChangeLastModifiedTime=dataChangeLastModifiedTime, - _configuration=_configuration, - **kwargs, - ) - -from apollo_openapi.model.open_item_extend_dto import OpenItemExtendDTO diff --git a/python/apollo_openapi/model/open_item_extend_dto.py b/python/apollo_openapi/model/open_item_extend_dto.py deleted file mode 100644 index 0d8b7b37..00000000 --- a/python/apollo_openapi/model/open_item_extend_dto.py +++ /dev/null @@ -1,129 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

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

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

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

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenItemPageDTO( - 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], - ) -> 'OpenItemPageDTO': - 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_item_page_dto.pyi b/python/apollo_openapi/model/open_item_page_dto.pyi deleted file mode 100644 index a7ad0ce5..00000000 --- a/python/apollo_openapi/model/open_item_page_dto.pyi +++ /dev/null @@ -1,136 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenItemPageDTO( - 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], - ) -> 'OpenItemPageDTO': - 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_miss_env_dto.py b/python/apollo_openapi/model/open_miss_env_dto.py deleted file mode 100644 index a69dec41..00000000 --- a/python/apollo_openapi/model/open_miss_env_dto.py +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - - -class OpenMissEnvDTO( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - code = schemas.IntSchema - message = schemas.StrSchema - __annotations__ = { - "code": code, - "message": message, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> typing.Union[MetaOapg.properties.code, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> typing.Union[MetaOapg.properties.message, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, decimal.Decimal, int, schemas.Unset] = schemas.unset, - message: typing.Union[MetaOapg.properties.message, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenMissEnvDTO': - return super().__new__( - cls, - *_args, - code=code, - message=message, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/open_miss_env_dto.pyi b/python/apollo_openapi/model/open_miss_env_dto.pyi deleted file mode 100644 index a69dec41..00000000 --- a/python/apollo_openapi/model/open_miss_env_dto.pyi +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - - -class OpenMissEnvDTO( - schemas.DictSchema -): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - - class MetaOapg: - - class properties: - code = schemas.IntSchema - message = schemas.StrSchema - __annotations__ = { - "code": code, - "message": message, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["code"]) -> MetaOapg.properties.code: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["code"]) -> typing.Union[MetaOapg.properties.code, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> typing.Union[MetaOapg.properties.message, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["code", "message", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - code: typing.Union[MetaOapg.properties.code, decimal.Decimal, int, schemas.Unset] = schemas.unset, - message: typing.Union[MetaOapg.properties.message, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenMissEnvDTO': - return super().__new__( - cls, - *_args, - code=code, - message=message, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/open_namespace_dto.py b/python/apollo_openapi/model/open_namespace_dto.py deleted file mode 100644 index f02c0486..00000000 --- a/python/apollo_openapi/model/open_namespace_dto.py +++ /dev/null @@ -1,240 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 - dataChangeCreatedByDisplayName = schemas.StrSchema - dataChangeLastModifiedBy = schemas.StrSchema - dataChangeLastModifiedByDisplayName = 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) - - @staticmethod - def extendInfo() -> typing.Type['OpenNamespaceExtendDTO']: - return OpenNamespaceExtendDTO - __annotations__ = { - "dataChangeCreatedBy": dataChangeCreatedBy, - "dataChangeCreatedByDisplayName": dataChangeCreatedByDisplayName, - "dataChangeLastModifiedBy": dataChangeLastModifiedBy, - "dataChangeLastModifiedByDisplayName": dataChangeLastModifiedByDisplayName, - "dataChangeCreatedTime": dataChangeCreatedTime, - "dataChangeLastModifiedTime": dataChangeLastModifiedTime, - "appId": appId, - "clusterName": clusterName, - "namespaceName": namespaceName, - "comment": comment, - "format": format, - "isPublic": isPublic, - "items": items, - "extendInfo": extendInfo, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedByDisplayName"]) -> MetaOapg.properties.dataChangeCreatedByDisplayName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... - - @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["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: typing_extensions.Literal["extendInfo"]) -> 'OpenNamespaceExtendDTO': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "comment", "format", "isPublic", "items", "extendInfo", ], 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["dataChangeCreatedByDisplayName"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, 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["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["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: typing_extensions.Literal["extendInfo"]) -> typing.Union['OpenNamespaceExtendDTO', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "comment", "format", "isPublic", "items", "extendInfo", ], 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, - dataChangeCreatedByDisplayName: typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, str, schemas.Unset] = schemas.unset, - dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, 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, - 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, - extendInfo: typing.Union['OpenNamespaceExtendDTO', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenNamespaceDTO': - return super().__new__( - cls, - *_args, - dataChangeCreatedBy=dataChangeCreatedBy, - dataChangeCreatedByDisplayName=dataChangeCreatedByDisplayName, - dataChangeLastModifiedBy=dataChangeLastModifiedBy, - dataChangeLastModifiedByDisplayName=dataChangeLastModifiedByDisplayName, - dataChangeCreatedTime=dataChangeCreatedTime, - dataChangeLastModifiedTime=dataChangeLastModifiedTime, - appId=appId, - clusterName=clusterName, - namespaceName=namespaceName, - comment=comment, - format=format, - isPublic=isPublic, - items=items, - extendInfo=extendInfo, - _configuration=_configuration, - **kwargs, - ) - -from apollo_openapi.model.open_item_dto import OpenItemDTO -from apollo_openapi.model.open_namespace_extend_dto import OpenNamespaceExtendDTO diff --git a/python/apollo_openapi/model/open_namespace_dto.pyi b/python/apollo_openapi/model/open_namespace_dto.pyi deleted file mode 100644 index f02c0486..00000000 --- a/python/apollo_openapi/model/open_namespace_dto.pyi +++ /dev/null @@ -1,240 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 - dataChangeCreatedByDisplayName = schemas.StrSchema - dataChangeLastModifiedBy = schemas.StrSchema - dataChangeLastModifiedByDisplayName = 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) - - @staticmethod - def extendInfo() -> typing.Type['OpenNamespaceExtendDTO']: - return OpenNamespaceExtendDTO - __annotations__ = { - "dataChangeCreatedBy": dataChangeCreatedBy, - "dataChangeCreatedByDisplayName": dataChangeCreatedByDisplayName, - "dataChangeLastModifiedBy": dataChangeLastModifiedBy, - "dataChangeLastModifiedByDisplayName": dataChangeLastModifiedByDisplayName, - "dataChangeCreatedTime": dataChangeCreatedTime, - "dataChangeLastModifiedTime": dataChangeLastModifiedTime, - "appId": appId, - "clusterName": clusterName, - "namespaceName": namespaceName, - "comment": comment, - "format": format, - "isPublic": isPublic, - "items": items, - "extendInfo": extendInfo, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedBy"]) -> MetaOapg.properties.dataChangeCreatedBy: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeCreatedByDisplayName"]) -> MetaOapg.properties.dataChangeCreatedByDisplayName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... - - @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["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: typing_extensions.Literal["extendInfo"]) -> 'OpenNamespaceExtendDTO': ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "comment", "format", "isPublic", "items", "extendInfo", ], 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["dataChangeCreatedByDisplayName"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, 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["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["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: typing_extensions.Literal["extendInfo"]) -> typing.Union['OpenNamespaceExtendDTO', schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["dataChangeCreatedBy", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "dataChangeCreatedTime", "dataChangeLastModifiedTime", "appId", "clusterName", "namespaceName", "comment", "format", "isPublic", "items", "extendInfo", ], 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, - dataChangeCreatedByDisplayName: typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, str, schemas.Unset] = schemas.unset, - dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, 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, - 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, - extendInfo: typing.Union['OpenNamespaceExtendDTO', schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenNamespaceDTO': - return super().__new__( - cls, - *_args, - dataChangeCreatedBy=dataChangeCreatedBy, - dataChangeCreatedByDisplayName=dataChangeCreatedByDisplayName, - dataChangeLastModifiedBy=dataChangeLastModifiedBy, - dataChangeLastModifiedByDisplayName=dataChangeLastModifiedByDisplayName, - dataChangeCreatedTime=dataChangeCreatedTime, - dataChangeLastModifiedTime=dataChangeLastModifiedTime, - appId=appId, - clusterName=clusterName, - namespaceName=namespaceName, - comment=comment, - format=format, - isPublic=isPublic, - items=items, - extendInfo=extendInfo, - _configuration=_configuration, - **kwargs, - ) - -from apollo_openapi.model.open_item_dto import OpenItemDTO -from apollo_openapi.model.open_namespace_extend_dto import OpenNamespaceExtendDTO diff --git a/python/apollo_openapi/model/open_namespace_extend_dto.py b/python/apollo_openapi/model/open_namespace_extend_dto.py deleted file mode 100644 index 0086fe95..00000000 --- a/python/apollo_openapi/model/open_namespace_extend_dto.py +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenNamespaceExtendDTO( - 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: - isConfigHidden = schemas.BoolSchema - parentAppId = schemas.StrSchema - itemModifiedCnt = schemas.IntSchema - __annotations__ = { - "isConfigHidden": isConfigHidden, - "parentAppId": parentAppId, - "itemModifiedCnt": itemModifiedCnt, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["isConfigHidden"]) -> MetaOapg.properties.isConfigHidden: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["parentAppId"]) -> MetaOapg.properties.parentAppId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["itemModifiedCnt"]) -> MetaOapg.properties.itemModifiedCnt: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["isConfigHidden", "parentAppId", "itemModifiedCnt", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["isConfigHidden"]) -> typing.Union[MetaOapg.properties.isConfigHidden, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["parentAppId"]) -> typing.Union[MetaOapg.properties.parentAppId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["itemModifiedCnt"]) -> typing.Union[MetaOapg.properties.itemModifiedCnt, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["isConfigHidden", "parentAppId", "itemModifiedCnt", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - isConfigHidden: typing.Union[MetaOapg.properties.isConfigHidden, bool, schemas.Unset] = schemas.unset, - parentAppId: typing.Union[MetaOapg.properties.parentAppId, str, schemas.Unset] = schemas.unset, - itemModifiedCnt: typing.Union[MetaOapg.properties.itemModifiedCnt, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenNamespaceExtendDTO': - return super().__new__( - cls, - *_args, - isConfigHidden=isConfigHidden, - parentAppId=parentAppId, - itemModifiedCnt=itemModifiedCnt, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/open_namespace_extend_dto.pyi b/python/apollo_openapi/model/open_namespace_extend_dto.pyi deleted file mode 100644 index 0086fe95..00000000 --- a/python/apollo_openapi/model/open_namespace_extend_dto.pyi +++ /dev/null @@ -1,97 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenNamespaceExtendDTO( - 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: - isConfigHidden = schemas.BoolSchema - parentAppId = schemas.StrSchema - itemModifiedCnt = schemas.IntSchema - __annotations__ = { - "isConfigHidden": isConfigHidden, - "parentAppId": parentAppId, - "itemModifiedCnt": itemModifiedCnt, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["isConfigHidden"]) -> MetaOapg.properties.isConfigHidden: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["parentAppId"]) -> MetaOapg.properties.parentAppId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["itemModifiedCnt"]) -> MetaOapg.properties.itemModifiedCnt: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["isConfigHidden", "parentAppId", "itemModifiedCnt", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["isConfigHidden"]) -> typing.Union[MetaOapg.properties.isConfigHidden, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["parentAppId"]) -> typing.Union[MetaOapg.properties.parentAppId, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["itemModifiedCnt"]) -> typing.Union[MetaOapg.properties.itemModifiedCnt, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["isConfigHidden", "parentAppId", "itemModifiedCnt", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - isConfigHidden: typing.Union[MetaOapg.properties.isConfigHidden, bool, schemas.Unset] = schemas.unset, - parentAppId: typing.Union[MetaOapg.properties.parentAppId, str, schemas.Unset] = schemas.unset, - itemModifiedCnt: typing.Union[MetaOapg.properties.itemModifiedCnt, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenNamespaceExtendDTO': - return super().__new__( - cls, - *_args, - isConfigHidden=isConfigHidden, - parentAppId=parentAppId, - itemModifiedCnt=itemModifiedCnt, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/open_namespace_identifier.py b/python/apollo_openapi/model/open_namespace_identifier.py deleted file mode 100644 index a93f7af7..00000000 --- a/python/apollo_openapi/model/open_namespace_identifier.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index a93f7af7..00000000 --- a/python/apollo_openapi/model/open_namespace_identifier.pyi +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index 4c280431..00000000 --- a/python/apollo_openapi/model/open_namespace_lock_dto.py +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 - isEmergencyPublishAllowed = schemas.BoolSchema - __annotations__ = { - "namespaceName": namespaceName, - "isLocked": isLocked, - "lockedBy": lockedBy, - "isEmergencyPublishAllowed": isEmergencyPublishAllowed, - } - - @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: typing_extensions.Literal["isEmergencyPublishAllowed"]) -> MetaOapg.properties.isEmergencyPublishAllowed: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["namespaceName", "isLocked", "lockedBy", "isEmergencyPublishAllowed", ], 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: typing_extensions.Literal["isEmergencyPublishAllowed"]) -> typing.Union[MetaOapg.properties.isEmergencyPublishAllowed, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["namespaceName", "isLocked", "lockedBy", "isEmergencyPublishAllowed", ], 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, - isEmergencyPublishAllowed: typing.Union[MetaOapg.properties.isEmergencyPublishAllowed, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenNamespaceLockDTO': - return super().__new__( - cls, - *_args, - namespaceName=namespaceName, - isLocked=isLocked, - lockedBy=lockedBy, - isEmergencyPublishAllowed=isEmergencyPublishAllowed, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/open_namespace_lock_dto.pyi b/python/apollo_openapi/model/open_namespace_lock_dto.pyi deleted file mode 100644 index 4c280431..00000000 --- a/python/apollo_openapi/model/open_namespace_lock_dto.pyi +++ /dev/null @@ -1,109 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 - isEmergencyPublishAllowed = schemas.BoolSchema - __annotations__ = { - "namespaceName": namespaceName, - "isLocked": isLocked, - "lockedBy": lockedBy, - "isEmergencyPublishAllowed": isEmergencyPublishAllowed, - } - - @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: typing_extensions.Literal["isEmergencyPublishAllowed"]) -> MetaOapg.properties.isEmergencyPublishAllowed: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["namespaceName", "isLocked", "lockedBy", "isEmergencyPublishAllowed", ], 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: typing_extensions.Literal["isEmergencyPublishAllowed"]) -> typing.Union[MetaOapg.properties.isEmergencyPublishAllowed, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["namespaceName", "isLocked", "lockedBy", "isEmergencyPublishAllowed", ], 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, - isEmergencyPublishAllowed: typing.Union[MetaOapg.properties.isEmergencyPublishAllowed, bool, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenNamespaceLockDTO': - return super().__new__( - cls, - *_args, - namespaceName=namespaceName, - isLocked=isLocked, - lockedBy=lockedBy, - isEmergencyPublishAllowed=isEmergencyPublishAllowed, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/open_namespace_role_user_dto.py b/python/apollo_openapi/model/open_namespace_role_user_dto.py deleted file mode 100644 index b76282fa..00000000 --- a/python/apollo_openapi/model/open_namespace_role_user_dto.py +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenNamespaceRoleUserDTO( - 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 - namespaceName = schemas.StrSchema - - - class modifyRoleUsers( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenUserInfoDTO']: - return OpenUserInfoDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenUserInfoDTO'], typing.List['OpenUserInfoDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'modifyRoleUsers': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenUserInfoDTO': - return super().__getitem__(i) - - - class releaseRoleUsers( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenUserInfoDTO']: - return OpenUserInfoDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenUserInfoDTO'], typing.List['OpenUserInfoDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'releaseRoleUsers': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenUserInfoDTO': - return super().__getitem__(i) - __annotations__ = { - "appId": appId, - "namespaceName": namespaceName, - "modifyRoleUsers": modifyRoleUsers, - "releaseRoleUsers": releaseRoleUsers, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["namespaceName"]) -> MetaOapg.properties.namespaceName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["modifyRoleUsers"]) -> MetaOapg.properties.modifyRoleUsers: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["releaseRoleUsers"]) -> MetaOapg.properties.releaseRoleUsers: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["appId", "namespaceName", "modifyRoleUsers", "releaseRoleUsers", ], 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["namespaceName"]) -> typing.Union[MetaOapg.properties.namespaceName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["modifyRoleUsers"]) -> typing.Union[MetaOapg.properties.modifyRoleUsers, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["releaseRoleUsers"]) -> typing.Union[MetaOapg.properties.releaseRoleUsers, 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", "namespaceName", "modifyRoleUsers", "releaseRoleUsers", ], 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, - namespaceName: typing.Union[MetaOapg.properties.namespaceName, str, schemas.Unset] = schemas.unset, - modifyRoleUsers: typing.Union[MetaOapg.properties.modifyRoleUsers, list, tuple, schemas.Unset] = schemas.unset, - releaseRoleUsers: typing.Union[MetaOapg.properties.releaseRoleUsers, 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], - ) -> 'OpenNamespaceRoleUserDTO': - return super().__new__( - cls, - *_args, - appId=appId, - namespaceName=namespaceName, - modifyRoleUsers=modifyRoleUsers, - releaseRoleUsers=releaseRoleUsers, - _configuration=_configuration, - **kwargs, - ) - -from apollo_openapi.model.open_user_info_dto import OpenUserInfoDTO diff --git a/python/apollo_openapi/model/open_namespace_role_user_dto.pyi b/python/apollo_openapi/model/open_namespace_role_user_dto.pyi deleted file mode 100644 index b76282fa..00000000 --- a/python/apollo_openapi/model/open_namespace_role_user_dto.pyi +++ /dev/null @@ -1,159 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenNamespaceRoleUserDTO( - 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 - namespaceName = schemas.StrSchema - - - class modifyRoleUsers( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenUserInfoDTO']: - return OpenUserInfoDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenUserInfoDTO'], typing.List['OpenUserInfoDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'modifyRoleUsers': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenUserInfoDTO': - return super().__getitem__(i) - - - class releaseRoleUsers( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenUserInfoDTO']: - return OpenUserInfoDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenUserInfoDTO'], typing.List['OpenUserInfoDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'releaseRoleUsers': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenUserInfoDTO': - return super().__getitem__(i) - __annotations__ = { - "appId": appId, - "namespaceName": namespaceName, - "modifyRoleUsers": modifyRoleUsers, - "releaseRoleUsers": releaseRoleUsers, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["appId"]) -> MetaOapg.properties.appId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["namespaceName"]) -> MetaOapg.properties.namespaceName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["modifyRoleUsers"]) -> MetaOapg.properties.modifyRoleUsers: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["releaseRoleUsers"]) -> MetaOapg.properties.releaseRoleUsers: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["appId", "namespaceName", "modifyRoleUsers", "releaseRoleUsers", ], 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["namespaceName"]) -> typing.Union[MetaOapg.properties.namespaceName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["modifyRoleUsers"]) -> typing.Union[MetaOapg.properties.modifyRoleUsers, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["releaseRoleUsers"]) -> typing.Union[MetaOapg.properties.releaseRoleUsers, 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", "namespaceName", "modifyRoleUsers", "releaseRoleUsers", ], 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, - namespaceName: typing.Union[MetaOapg.properties.namespaceName, str, schemas.Unset] = schemas.unset, - modifyRoleUsers: typing.Union[MetaOapg.properties.modifyRoleUsers, list, tuple, schemas.Unset] = schemas.unset, - releaseRoleUsers: typing.Union[MetaOapg.properties.releaseRoleUsers, 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], - ) -> 'OpenNamespaceRoleUserDTO': - return super().__new__( - cls, - *_args, - appId=appId, - namespaceName=namespaceName, - modifyRoleUsers=modifyRoleUsers, - releaseRoleUsers=releaseRoleUsers, - _configuration=_configuration, - **kwargs, - ) - -from apollo_openapi.model.open_user_info_dto import OpenUserInfoDTO diff --git a/python/apollo_openapi/model/open_namespace_sync_dto.py b/python/apollo_openapi/model/open_namespace_sync_dto.py deleted file mode 100644 index 52df9f03..00000000 --- a/python/apollo_openapi/model/open_namespace_sync_dto.py +++ /dev/null @@ -1,140 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenNamespaceSyncDTO( - 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], - ) -> 'OpenNamespaceSyncDTO': - 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_dto.pyi b/python/apollo_openapi/model/open_namespace_sync_dto.pyi deleted file mode 100644 index 52df9f03..00000000 --- a/python/apollo_openapi/model/open_namespace_sync_dto.pyi +++ /dev/null @@ -1,140 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenNamespaceSyncDTO( - 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], - ) -> 'OpenNamespaceSyncDTO': - 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 deleted file mode 100644 index 00f0c86b..00000000 --- a/python/apollo_openapi/model/open_namespace_text_model.py +++ /dev/null @@ -1,147 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index 00f0c86b..00000000 --- a/python/apollo_openapi/model/open_namespace_text_model.pyi +++ /dev/null @@ -1,147 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_usage_dto.py b/python/apollo_openapi/model/open_namespace_usage_dto.py deleted file mode 100644 index d34b5917..00000000 --- a/python/apollo_openapi/model/open_namespace_usage_dto.py +++ /dev/null @@ -1,139 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

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

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

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

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index 9fd7770c..00000000 --- a/python/apollo_openapi/model/open_organization_dto.pyi +++ /dev/null @@ -1,87 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_permission_condition_dto.py b/python/apollo_openapi/model/open_permission_condition_dto.py deleted file mode 100644 index 526f3b2a..00000000 --- a/python/apollo_openapi/model/open_permission_condition_dto.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenPermissionConditionDTO( - 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: - hasPermission = schemas.BoolSchema - __annotations__ = { - "hasPermission": hasPermission, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["hasPermission"]) -> MetaOapg.properties.hasPermission: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["hasPermission", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["hasPermission"]) -> typing.Union[MetaOapg.properties.hasPermission, 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["hasPermission", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - hasPermission: typing.Union[MetaOapg.properties.hasPermission, 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], - ) -> 'OpenPermissionConditionDTO': - return super().__new__( - cls, - *_args, - hasPermission=hasPermission, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/open_permission_condition_dto.pyi b/python/apollo_openapi/model/open_permission_condition_dto.pyi deleted file mode 100644 index 526f3b2a..00000000 --- a/python/apollo_openapi/model/open_permission_condition_dto.pyi +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenPermissionConditionDTO( - 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: - hasPermission = schemas.BoolSchema - __annotations__ = { - "hasPermission": hasPermission, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["hasPermission"]) -> MetaOapg.properties.hasPermission: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["hasPermission", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["hasPermission"]) -> typing.Union[MetaOapg.properties.hasPermission, 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["hasPermission", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - hasPermission: typing.Union[MetaOapg.properties.hasPermission, 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], - ) -> 'OpenPermissionConditionDTO': - return super().__new__( - cls, - *_args, - hasPermission=hasPermission, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/open_release_change_dto.py b/python/apollo_openapi/model/open_release_change_dto.py deleted file mode 100644 index 6ecd3139..00000000 --- a/python/apollo_openapi/model/open_release_change_dto.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenReleaseChangeDTO( - 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: - changeType = schemas.StrSchema - key = schemas.StrSchema - newValue = schemas.StrSchema - oldValue = schemas.StrSchema - __annotations__ = { - "changeType": changeType, - "key": key, - "newValue": newValue, - "oldValue": oldValue, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["changeType"]) -> MetaOapg.properties.changeType: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["newValue"]) -> MetaOapg.properties.newValue: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["oldValue"]) -> MetaOapg.properties.oldValue: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["changeType", "key", "newValue", "oldValue", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["changeType"]) -> typing.Union[MetaOapg.properties.changeType, 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["newValue"]) -> typing.Union[MetaOapg.properties.newValue, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["oldValue"]) -> typing.Union[MetaOapg.properties.oldValue, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["changeType", "key", "newValue", "oldValue", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - changeType: typing.Union[MetaOapg.properties.changeType, str, schemas.Unset] = schemas.unset, - key: typing.Union[MetaOapg.properties.key, str, schemas.Unset] = schemas.unset, - newValue: typing.Union[MetaOapg.properties.newValue, str, schemas.Unset] = schemas.unset, - oldValue: typing.Union[MetaOapg.properties.oldValue, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenReleaseChangeDTO': - return super().__new__( - cls, - *_args, - changeType=changeType, - key=key, - newValue=newValue, - oldValue=oldValue, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/open_release_change_dto.pyi b/python/apollo_openapi/model/open_release_change_dto.pyi deleted file mode 100644 index 6ecd3139..00000000 --- a/python/apollo_openapi/model/open_release_change_dto.pyi +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenReleaseChangeDTO( - 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: - changeType = schemas.StrSchema - key = schemas.StrSchema - newValue = schemas.StrSchema - oldValue = schemas.StrSchema - __annotations__ = { - "changeType": changeType, - "key": key, - "newValue": newValue, - "oldValue": oldValue, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["changeType"]) -> MetaOapg.properties.changeType: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["key"]) -> MetaOapg.properties.key: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["newValue"]) -> MetaOapg.properties.newValue: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["oldValue"]) -> MetaOapg.properties.oldValue: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["changeType", "key", "newValue", "oldValue", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["changeType"]) -> typing.Union[MetaOapg.properties.changeType, 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["newValue"]) -> typing.Union[MetaOapg.properties.newValue, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["oldValue"]) -> typing.Union[MetaOapg.properties.oldValue, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["changeType", "key", "newValue", "oldValue", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - changeType: typing.Union[MetaOapg.properties.changeType, str, schemas.Unset] = schemas.unset, - key: typing.Union[MetaOapg.properties.key, str, schemas.Unset] = schemas.unset, - newValue: typing.Union[MetaOapg.properties.newValue, str, schemas.Unset] = schemas.unset, - oldValue: typing.Union[MetaOapg.properties.oldValue, str, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenReleaseChangeDTO': - return super().__new__( - cls, - *_args, - changeType=changeType, - key=key, - newValue=newValue, - oldValue=oldValue, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/open_release_diff_dto.py b/python/apollo_openapi/model/open_release_diff_dto.py deleted file mode 100644 index 8f09b7e7..00000000 --- a/python/apollo_openapi/model/open_release_diff_dto.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenReleaseDiffDTO( - 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 changes( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenReleaseChangeDTO']: - return OpenReleaseChangeDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenReleaseChangeDTO'], typing.List['OpenReleaseChangeDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'changes': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenReleaseChangeDTO': - return super().__getitem__(i) - __annotations__ = { - "changes": changes, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["changes"]) -> MetaOapg.properties.changes: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["changes", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["changes"]) -> typing.Union[MetaOapg.properties.changes, 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["changes", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - changes: typing.Union[MetaOapg.properties.changes, 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], - ) -> 'OpenReleaseDiffDTO': - return super().__new__( - cls, - *_args, - changes=changes, - _configuration=_configuration, - **kwargs, - ) - -from apollo_openapi.model.open_release_change_dto import OpenReleaseChangeDTO diff --git a/python/apollo_openapi/model/open_release_diff_dto.pyi b/python/apollo_openapi/model/open_release_diff_dto.pyi deleted file mode 100644 index 8f09b7e7..00000000 --- a/python/apollo_openapi/model/open_release_diff_dto.pyi +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenReleaseDiffDTO( - 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 changes( - schemas.ListSchema - ): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenReleaseChangeDTO']: - return OpenReleaseChangeDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenReleaseChangeDTO'], typing.List['OpenReleaseChangeDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'changes': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenReleaseChangeDTO': - return super().__getitem__(i) - __annotations__ = { - "changes": changes, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["changes"]) -> MetaOapg.properties.changes: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["changes", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["changes"]) -> typing.Union[MetaOapg.properties.changes, 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["changes", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - changes: typing.Union[MetaOapg.properties.changes, 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], - ) -> 'OpenReleaseDiffDTO': - return super().__new__( - cls, - *_args, - changes=changes, - _configuration=_configuration, - **kwargs, - ) - -from apollo_openapi.model.open_release_change_dto import OpenReleaseChangeDTO diff --git a/python/apollo_openapi/model/open_release_dto.py b/python/apollo_openapi/model/open_release_dto.py deleted file mode 100644 index f88904f2..00000000 --- a/python/apollo_openapi/model/open_release_dto.py +++ /dev/null @@ -1,204 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 - dataChangeCreatedByDisplayName = schemas.StrSchema - dataChangeLastModifiedBy = schemas.StrSchema - dataChangeLastModifiedByDisplayName = 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, - "dataChangeCreatedByDisplayName": dataChangeCreatedByDisplayName, - "dataChangeLastModifiedBy": dataChangeLastModifiedBy, - "dataChangeLastModifiedByDisplayName": dataChangeLastModifiedByDisplayName, - "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["dataChangeCreatedByDisplayName"]) -> MetaOapg.properties.dataChangeCreatedByDisplayName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... - - @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["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", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "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["dataChangeCreatedByDisplayName"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, 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["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["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", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "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, - dataChangeCreatedByDisplayName: typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, str, schemas.Unset] = schemas.unset, - dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, 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, - 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, - dataChangeCreatedByDisplayName=dataChangeCreatedByDisplayName, - dataChangeLastModifiedBy=dataChangeLastModifiedBy, - dataChangeLastModifiedByDisplayName=dataChangeLastModifiedByDisplayName, - 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 deleted file mode 100644 index f88904f2..00000000 --- a/python/apollo_openapi/model/open_release_dto.pyi +++ /dev/null @@ -1,204 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 - dataChangeCreatedByDisplayName = schemas.StrSchema - dataChangeLastModifiedBy = schemas.StrSchema - dataChangeLastModifiedByDisplayName = 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, - "dataChangeCreatedByDisplayName": dataChangeCreatedByDisplayName, - "dataChangeLastModifiedBy": dataChangeLastModifiedBy, - "dataChangeLastModifiedByDisplayName": dataChangeLastModifiedByDisplayName, - "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["dataChangeCreatedByDisplayName"]) -> MetaOapg.properties.dataChangeCreatedByDisplayName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["dataChangeLastModifiedBy"]) -> MetaOapg.properties.dataChangeLastModifiedBy: ... - - @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["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", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "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["dataChangeCreatedByDisplayName"]) -> typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, 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["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["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", "dataChangeCreatedByDisplayName", "dataChangeLastModifiedBy", "dataChangeLastModifiedByDisplayName", "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, - dataChangeCreatedByDisplayName: typing.Union[MetaOapg.properties.dataChangeCreatedByDisplayName, str, schemas.Unset] = schemas.unset, - dataChangeLastModifiedBy: typing.Union[MetaOapg.properties.dataChangeLastModifiedBy, 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, - 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, - dataChangeCreatedByDisplayName=dataChangeCreatedByDisplayName, - dataChangeLastModifiedBy=dataChangeLastModifiedBy, - dataChangeLastModifiedByDisplayName=dataChangeLastModifiedByDisplayName, - 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_user_dto.py b/python/apollo_openapi/model/open_user_dto.py deleted file mode 100644 index ccc5bca1..00000000 --- a/python/apollo_openapi/model/open_user_dto.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenUserDTO( - 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: - username = schemas.StrSchema - userDisplayName = schemas.StrSchema - password = schemas.StrSchema - email = schemas.StrSchema - enabled = schemas.IntSchema - __annotations__ = { - "username": username, - "userDisplayName": userDisplayName, - "password": password, - "email": email, - "enabled": enabled, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["userDisplayName"]) -> MetaOapg.properties.userDisplayName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enabled"]) -> MetaOapg.properties.enabled: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["username", "userDisplayName", "password", "email", "enabled", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["userDisplayName"]) -> typing.Union[MetaOapg.properties.userDisplayName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> typing.Union[MetaOapg.properties.password, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enabled"]) -> typing.Union[MetaOapg.properties.enabled, 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["username", "userDisplayName", "password", "email", "enabled", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, - userDisplayName: typing.Union[MetaOapg.properties.userDisplayName, str, schemas.Unset] = schemas.unset, - password: typing.Union[MetaOapg.properties.password, str, schemas.Unset] = schemas.unset, - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - enabled: typing.Union[MetaOapg.properties.enabled, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenUserDTO': - return super().__new__( - cls, - *_args, - username=username, - userDisplayName=userDisplayName, - password=password, - email=email, - enabled=enabled, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/open_user_dto.pyi b/python/apollo_openapi/model/open_user_dto.pyi deleted file mode 100644 index ccc5bca1..00000000 --- a/python/apollo_openapi/model/open_user_dto.pyi +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenUserDTO( - 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: - username = schemas.StrSchema - userDisplayName = schemas.StrSchema - password = schemas.StrSchema - email = schemas.StrSchema - enabled = schemas.IntSchema - __annotations__ = { - "username": username, - "userDisplayName": userDisplayName, - "password": password, - "email": email, - "enabled": enabled, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["username"]) -> MetaOapg.properties.username: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["userDisplayName"]) -> MetaOapg.properties.userDisplayName: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["password"]) -> MetaOapg.properties.password: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enabled"]) -> MetaOapg.properties.enabled: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["username", "userDisplayName", "password", "email", "enabled", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["username"]) -> typing.Union[MetaOapg.properties.username, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["userDisplayName"]) -> typing.Union[MetaOapg.properties.userDisplayName, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["password"]) -> typing.Union[MetaOapg.properties.password, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enabled"]) -> typing.Union[MetaOapg.properties.enabled, 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["username", "userDisplayName", "password", "email", "enabled", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - username: typing.Union[MetaOapg.properties.username, str, schemas.Unset] = schemas.unset, - userDisplayName: typing.Union[MetaOapg.properties.userDisplayName, str, schemas.Unset] = schemas.unset, - password: typing.Union[MetaOapg.properties.password, str, schemas.Unset] = schemas.unset, - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - enabled: typing.Union[MetaOapg.properties.enabled, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenUserDTO': - return super().__new__( - cls, - *_args, - username=username, - userDisplayName=userDisplayName, - password=password, - email=email, - enabled=enabled, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/open_user_info_dto.py b/python/apollo_openapi/model/open_user_info_dto.py deleted file mode 100644 index e8a5c47b..00000000 --- a/python/apollo_openapi/model/open_user_info_dto.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenUserInfoDTO( - 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: - userId = schemas.StrSchema - name = schemas.StrSchema - email = schemas.StrSchema - enabled = schemas.IntSchema - __annotations__ = { - "userId": userId, - "name": name, - "email": email, - "enabled": enabled, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["userId"]) -> MetaOapg.properties.userId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enabled"]) -> MetaOapg.properties.enabled: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["userId", "name", "email", "enabled", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["userId"]) -> typing.Union[MetaOapg.properties.userId, 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["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enabled"]) -> typing.Union[MetaOapg.properties.enabled, 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["userId", "name", "email", "enabled", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - userId: typing.Union[MetaOapg.properties.userId, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - enabled: typing.Union[MetaOapg.properties.enabled, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenUserInfoDTO': - return super().__new__( - cls, - *_args, - userId=userId, - name=name, - email=email, - enabled=enabled, - _configuration=_configuration, - **kwargs, - ) diff --git a/python/apollo_openapi/model/open_user_info_dto.pyi b/python/apollo_openapi/model/open_user_info_dto.pyi deleted file mode 100644 index e8a5c47b..00000000 --- a/python/apollo_openapi/model/open_user_info_dto.pyi +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 OpenUserInfoDTO( - 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: - userId = schemas.StrSchema - name = schemas.StrSchema - email = schemas.StrSchema - enabled = schemas.IntSchema - __annotations__ = { - "userId": userId, - "name": name, - "email": email, - "enabled": enabled, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["userId"]) -> MetaOapg.properties.userId: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["email"]) -> MetaOapg.properties.email: ... - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["enabled"]) -> MetaOapg.properties.enabled: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["userId", "name", "email", "enabled", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["userId"]) -> typing.Union[MetaOapg.properties.userId, 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["email"]) -> typing.Union[MetaOapg.properties.email, schemas.Unset]: ... - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["enabled"]) -> typing.Union[MetaOapg.properties.enabled, 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["userId", "name", "email", "enabled", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - userId: typing.Union[MetaOapg.properties.userId, str, schemas.Unset] = schemas.unset, - name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, - email: typing.Union[MetaOapg.properties.email, str, schemas.Unset] = schemas.unset, - enabled: typing.Union[MetaOapg.properties.enabled, decimal.Decimal, int, schemas.Unset] = schemas.unset, - _configuration: typing.Optional[schemas.Configuration] = None, - **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], - ) -> 'OpenUserInfoDTO': - return super().__new__( - cls, - *_args, - userId=userId, - name=name, - email=email, - enabled=enabled, - _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 deleted file mode 100644 index cbf22d9e..00000000 --- a/python/apollo_openapi/model/string_to_string_bool_map.py +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index cbf22d9e..00000000 --- a/python/apollo_openapi/model/string_to_string_bool_map.pyi +++ /dev/null @@ -1,84 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index 37a0a05e..00000000 --- a/python/apollo_openapi/models/__init__.py +++ /dev/null @@ -1,54 +0,0 @@ -# coding: utf-8 - -# flake8: noqa - -# 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.map_string import MapString -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_access_key_dto import OpenAccessKeyDTO -from apollo_openapi.model.open_app_dto import OpenAppDTO -from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO -from apollo_openapi.model.open_app_role_user_dto import OpenAppRoleUserDTO -from apollo_openapi.model.open_cluster_dto import OpenClusterDTO -from apollo_openapi.model.open_cluster_namespace_role_user_dto import OpenClusterNamespaceRoleUserDTO -from apollo_openapi.model.open_create_app_dto import OpenCreateAppDTO -from apollo_openapi.model.open_create_namespace_dto import OpenCreateNamespaceDTO -from apollo_openapi.model.open_env_cluster_dto import OpenEnvClusterDTO -from apollo_openapi.model.open_env_cluster_info import OpenEnvClusterInfo -from apollo_openapi.model.open_env_namespace_role_user_dto import OpenEnvNamespaceRoleUserDTO -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_instance_page_dto import OpenInstancePageDTO -from apollo_openapi.model.open_item_dto import OpenItemDTO -from apollo_openapi.model.open_item_diff_dto import OpenItemDiffDTO -from apollo_openapi.model.open_item_extend_dto import OpenItemExtendDTO -from apollo_openapi.model.open_item_page_dto import OpenItemPageDTO -from apollo_openapi.model.open_miss_env_dto import OpenMissEnvDTO -from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO -from apollo_openapi.model.open_namespace_extend_dto import OpenNamespaceExtendDTO -from apollo_openapi.model.open_namespace_identifier import OpenNamespaceIdentifier -from apollo_openapi.model.open_namespace_lock_dto import OpenNamespaceLockDTO -from apollo_openapi.model.open_namespace_role_user_dto import OpenNamespaceRoleUserDTO -from apollo_openapi.model.open_namespace_sync_dto import OpenNamespaceSyncDTO -from apollo_openapi.model.open_namespace_text_model import OpenNamespaceTextModel -from apollo_openapi.model.open_namespace_usage_dto import OpenNamespaceUsageDTO -from apollo_openapi.model.open_organization_dto import OpenOrganizationDto -from apollo_openapi.model.open_permission_condition_dto import OpenPermissionConditionDTO -from apollo_openapi.model.open_release_change_dto import OpenReleaseChangeDTO -from apollo_openapi.model.open_release_dto import OpenReleaseDTO -from apollo_openapi.model.open_release_diff_dto import OpenReleaseDiffDTO -from apollo_openapi.model.open_user_dto import OpenUserDTO -from apollo_openapi.model.open_user_info_dto import OpenUserInfoDTO -from apollo_openapi.model.string_to_string_bool_map import StringToStringBoolMap diff --git a/python/apollo_openapi/paths/__init__.py b/python/apollo_openapi/paths/__init__.py deleted file mode 100644 index a49c1b84..00000000 --- a/python/apollo_openapi/paths/__init__.py +++ /dev/null @@ -1,115 +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.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_ENVCLUSTERINFO = "/openapi/v1/apps/{appId}/env-cluster-info" - OPENAPI_V1_APPS_ENVS_ENV = "/openapi/v1/apps/envs/{env}" - OPENAPI_V1_APPS_APP_ID_MISSENVS = "/openapi/v1/apps/{appId}/miss-envs" - OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_KEY = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" - OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items" - OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ENCODED_ITEMS_KEY = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" - 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_DIFF = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff" - OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNCHRONIZE = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize" - OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_VALIDATION = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation" - OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVOCATION = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation" - OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}" - OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS = "/openapi/v1/envs/{env}/apps/{appId}/clusters" - OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases" - 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_ACTIVE = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active" - OPENAPI_V1_ENVS_ENV_RELEASES_COMPARISON = "/openapi/v1/envs/{env}/releases/comparison" - 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_INSTANCES_BYRELEASE = "/openapi/v1/envs/{env}/instances/by-release" - OPENAPI_V1_ENVS_ENV_INSTANCES_BYNAMESPACE = "/openapi/v1/envs/{env}/instances/by-namespace" - OPENAPI_V1_ENVS_ENV_INSTANCES_BYNAMESPACEANDRELEASESNOTIN = "/openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in" - OPENAPI_V1_NAMESPACES = "/openapi/v1/namespaces" - OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME_USAGE = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage" - OPENAPI_V1_APPS_APP_ID_APPNAMESPACES = "/openapi/v1/apps/{appId}/appnamespaces" - OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces" - OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}" - OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ASSOCIATEDPUBLICNAMESPACE = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace" - OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_LOCK = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock" - OPENAPI_V1_APPNAMESPACES = "/openapi/v1/appnamespaces" - OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" - OPENAPI_V1_APPS_APP_ID_NAMESPACES_RELEASES_STATUS = "/openapi/v1/apps/{appId}/namespaces/releases/status" - OPENAPI_V1_ENVS_ENV_APPNAMESPACES_PUBLIC_NAMESPACE_NAME_INSTANCES = "/openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_USAGE = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_MISSINGNAMESPACES = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}" - OPENAPI_V1_ORGANIZATIONS = "/openapi/v1/organizations" - OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches" - OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_BRANCHES_BRANCH_NAME = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}" - 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" - OPENAPI_V1_ENVS = "/openapi/v1/envs" - OPENAPI_V1_APPS_APP_ID_NAMESPACES_NAMESPACE_NAME_PERMISSIONINIT = "/openapi/v1/apps/{appId}/namespaces/{namespaceName}/permission-init" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_PERMISSIONINIT = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permission-init" - OPENAPI_V1_APPS_APP_ID_PERMISSIONS_PERMISSION_TYPE = "/openapi/v1/apps/{appId}/permissions/{permissionType}" - OPENAPI_V1_APPS_APP_ID_NAMESPACES_NAMESPACE_NAME_PERMISSIONS_PERMISSION_TYPE = "/openapi/v1/apps/{appId}/namespaces/{namespaceName}/permissions/{permissionType}" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_NAMESPACES_NAMESPACE_NAME_PERMISSIONS_PERMISSION_TYPE = "/openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/permissions/{permissionType}" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_PERMISSIONS_PERMISSION_TYPE = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permissions/{permissionType}" - OPENAPI_V1_PERMISSIONS_ROOT = "/openapi/v1/permissions/root" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_NAMESPACES_NAMESPACE_NAME_ROLEUSERS = "/openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/role-users" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_NAMESPACES_NAMESPACE_NAME_ROLES_ROLE_TYPE = "/openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType}" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_ROLEUSERS = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/role-users" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_ROLES_ROLE_TYPE = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/roles/{roleType}" - OPENAPI_V1_APPS_APP_ID_NAMESPACES_NAMESPACE_NAME_ROLEUSERS = "/openapi/v1/apps/{appId}/namespaces/{namespaceName}/role-users" - OPENAPI_V1_APPS_APP_ID_NAMESPACES_NAMESPACE_NAME_ROLES_ROLE_TYPE = "/openapi/v1/apps/{appId}/namespaces/{namespaceName}/roles/{roleType}" - OPENAPI_V1_APPS_APP_ID_ROLEUSERS = "/openapi/v1/apps/{appId}/role-users" - OPENAPI_V1_APPS_APP_ID_ROLES_ROLE_TYPE = "/openapi/v1/apps/{appId}/roles/{roleType}" - OPENAPI_V1_SYSTEM_ROLES_CREATEAPPLICATION = "/openapi/v1/system/roles/create-application" - OPENAPI_V1_SYSTEM_ROLES_CREATEAPPLICATION_ROLEUSERS = "/openapi/v1/system/roles/create-application/role-users" - OPENAPI_V1_APPS_APP_ID_ROLES_MASTER = "/openapi/v1/apps/{appId}/roles/master" - OPENAPI_V1_SYSTEM_ROLE_MANAGEAPPMASTER = "/openapi/v1/system/role/manage-app-master" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_ACCESSKEYS = "/openapi/v1/apps/{appId}/envs/{env}/accesskeys" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_ACCESSKEYS_ACCESS_KEY_ID = "/openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_ACCESSKEYS_ACCESS_KEY_ID_ACTIVATION = "/openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/activation" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_ACCESSKEYS_ACCESS_KEY_ID_DEACTIVATION = "/openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/deactivation" - OPENAPI_V1_USER = "/openapi/v1/user" - OPENAPI_V1_USERS = "/openapi/v1/users" - OPENAPI_V1_USERS_USER_ID = "/openapi/v1/users/{userId}" - OPENAPI_V1_USERS_ENABLED = "/openapi/v1/users/enabled" - OPENAPI_V1_APOLLO_AUDIT_PROPERTIES = "/openapi/v1/apollo/audit/properties" - OPENAPI_V1_APOLLO_AUDIT_LOGS = "/openapi/v1/apollo/audit/logs" - OPENAPI_V1_APOLLO_AUDIT_LOGS_OP_NAME = "/openapi/v1/apollo/audit/logs/opName" - OPENAPI_V1_APOLLO_AUDIT_TRACE = "/openapi/v1/apollo/audit/trace" - OPENAPI_V1_APOLLO_AUDIT_LOGS_DATA_INFLUENCES_FIELD = "/openapi/v1/apollo/audit/logs/dataInfluences/field" - OPENAPI_V1_APOLLO_AUDIT_LOGS_BYNAMEORTYPEOROPERATOR = "/openapi/v1/apollo/audit/logs/by-name-or-type-or-operator" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_COMMITS = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits" - OPENAPI_V1_PAGESETTINGS = "/openapi/v1/page-settings" - OPENAPI_V1_CONSUMERS = "/openapi/v1/consumers" - OPENAPI_V1_CONSUMERTOKENS_BYAPP_ID = "/openapi/v1/consumer-tokens/by-appId" - OPENAPI_V1_CONSUMERS_TOKEN_ASSIGNROLE = "/openapi/v1/consumers/{token}/assign-role" - OPENAPI_V1_CONSUMERS_BYAPP_ID = "/openapi/v1/consumers/by-appId" - OPENAPI_V1_IMPORT = "/openapi/v1/import" - OPENAPI_V1_FAVORITES = "/openapi/v1/favorites" - OPENAPI_V1_FAVORITES_FAVORITE_ID = "/openapi/v1/favorites/{favoriteId}" - OPENAPI_V1_GLOBALSEARCH_ITEMINFO_BYKEYORVALUE = "/openapi/v1/global-search/item-info/by-key-or-value" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_HISTORIES = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories" - OPENAPI_V1_SERVER_PORTALDB_CONFIG = "/openapi/v1/server/portal-db/config" - OPENAPI_V1_SERVER_ENVS_ENV_CONFIGDB_CONFIG = "/openapi/v1/server/envs/{env}/config-db/config" - OPENAPI_V1_SERVER_PORTALDB_CONFIG_FINDALLCONFIG = "/openapi/v1/server/portal-db/config/find-all-config" - OPENAPI_V1_SERVER_ENVS_ENV_CONFIGDB_CONFIG_FINDALLCONFIG = "/openapi/v1/server/envs/{env}/config-db/config/find-all-config" - OPENAPI_V1_SYSTEMINFO = "/openapi/v1/system-info" - OPENAPI_V1_SYSTEMINFO_HEALTH = "/openapi/v1/system-info/health" - OPENAPI_V1_CONFIGS_EXPORT = "/openapi/v1/configs/export" - OPENAPI_V1_CONFIGS_IMPORT = "/openapi/v1/configs/import" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_EXPORT = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_IMPORT = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_EXPORT = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export" - OPENAPI_V1_APPS_SEARCH_BYAPPIDORNAME = "/openapi/v1/apps/search/by-appid-or-name" - OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_IMPORT = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import" diff --git a/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs/__init__.py b/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs/__init__.py deleted file mode 100644 index 39130b4b..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs/__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_apollo_audit_logs import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APOLLO_AUDIT_LOGS diff --git a/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs/get.py b/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs/get.py deleted file mode 100644 index 03d24856..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs/get.py +++ /dev/null @@ -1,324 +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 . import path - -# Query params -PageSchema = schemas.IntSchema -SizeSchema = schemas.IntSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - explode=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _find_audit_logs_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_audit_logs_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_audit_logs_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_audit_logs_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, - ): - """ - 查询审计日志(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 FindAuditLogs(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_audit_logs( - 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_audit_logs( - 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_audit_logs( - 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_audit_logs( - 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_audit_logs_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_audit_logs_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_apollo_audit_logs/get.pyi b/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs/get.pyi deleted file mode 100644 index 7321d4a9..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs/get.pyi +++ /dev/null @@ -1,316 +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 - -# Query params -PageSchema = schemas.IntSchema -SizeSchema = schemas.IntSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - explode=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _find_audit_logs_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_audit_logs_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_audit_logs_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_audit_logs_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, - ): - """ - 查询审计日志(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 FindAuditLogs(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_audit_logs( - 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_audit_logs( - 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_audit_logs( - 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_audit_logs( - 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_audit_logs_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_audit_logs_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_apollo_audit_logs_by_name_or_type_or_operator/__init__.py b/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_by_name_or_type_or_operator/__init__.py deleted file mode 100644 index 205db84b..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_by_name_or_type_or_operator/__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_apollo_audit_logs_by_name_or_type_or_operator import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APOLLO_AUDIT_LOGS_BYNAMEORTYPEOROPERATOR diff --git a/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_by_name_or_type_or_operator/get.py b/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_by_name_or_type_or_operator/get.py deleted file mode 100644 index d7e6e86d..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_by_name_or_type_or_operator/get.py +++ /dev/null @@ -1,334 +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 . import path - -# Query params -QuerySchema = schemas.StrSchema -PageSchema = schemas.IntSchema -SizeSchema = schemas.IntSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'query': typing.Union[QuerySchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_query = api_client.QueryParameter( - name="query", - style=api_client.ParameterStyle.FORM, - schema=QuerySchema, - required=True, - explode=True, -) -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - explode=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _search_audit_logs_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 _search_audit_logs_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 _search_audit_logs_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 _search_audit_logs_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, - ): - """ - 搜索审计日志(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_query, - 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 SearchAuditLogs(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def search_audit_logs( - 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 search_audit_logs( - 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 search_audit_logs( - 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 search_audit_logs( - 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._search_audit_logs_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._search_audit_logs_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_apollo_audit_logs_by_name_or_type_or_operator/get.pyi b/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_by_name_or_type_or_operator/get.pyi deleted file mode 100644 index 325939bd..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_by_name_or_type_or_operator/get.pyi +++ /dev/null @@ -1,326 +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 - -# Query params -QuerySchema = schemas.StrSchema -PageSchema = schemas.IntSchema -SizeSchema = schemas.IntSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'query': typing.Union[QuerySchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_query = api_client.QueryParameter( - name="query", - style=api_client.ParameterStyle.FORM, - schema=QuerySchema, - required=True, - explode=True, -) -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - explode=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _search_audit_logs_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 _search_audit_logs_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 _search_audit_logs_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 _search_audit_logs_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, - ): - """ - 搜索审计日志(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_query, - 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 SearchAuditLogs(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def search_audit_logs( - 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 search_audit_logs( - 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 search_audit_logs( - 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 search_audit_logs( - 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._search_audit_logs_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._search_audit_logs_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_apollo_audit_logs_data_influences_field/__init__.py b/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_data_influences_field/__init__.py deleted file mode 100644 index 48652d88..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_data_influences_field/__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_apollo_audit_logs_data_influences_field import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APOLLO_AUDIT_LOGS_DATA_INFLUENCES_FIELD diff --git a/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_data_influences_field/get.py b/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_data_influences_field/get.py deleted file mode 100644 index 39773f40..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_data_influences_field/get.py +++ /dev/null @@ -1,354 +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 . import path - -# Query params -EntityNameSchema = schemas.StrSchema -EntityIdSchema = schemas.StrSchema -FieldNameSchema = schemas.StrSchema -PageSchema = schemas.IntSchema -SizeSchema = schemas.IntSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'entityName': typing.Union[EntityNameSchema, str, ], - 'entityId': typing.Union[EntityIdSchema, str, ], - 'fieldName': typing.Union[FieldNameSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_entity_name = api_client.QueryParameter( - name="entityName", - style=api_client.ParameterStyle.FORM, - schema=EntityNameSchema, - required=True, - explode=True, -) -request_query_entity_id = api_client.QueryParameter( - name="entityId", - style=api_client.ParameterStyle.FORM, - schema=EntityIdSchema, - required=True, - explode=True, -) -request_query_field_name = api_client.QueryParameter( - name="fieldName", - style=api_client.ParameterStyle.FORM, - schema=FieldNameSchema, - required=True, - explode=True, -) -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - explode=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _find_audit_data_influences_by_field_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_audit_data_influences_by_field_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_audit_data_influences_by_field_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_audit_data_influences_by_field_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, - ): - """ - 查询审计数据影响(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_entity_name, - request_query_entity_id, - request_query_field_name, - 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 FindAuditDataInfluencesByField(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_audit_data_influences_by_field( - 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_audit_data_influences_by_field( - 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_audit_data_influences_by_field( - 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_audit_data_influences_by_field( - 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_audit_data_influences_by_field_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_audit_data_influences_by_field_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_apollo_audit_logs_data_influences_field/get.pyi b/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_data_influences_field/get.pyi deleted file mode 100644 index 1d2a70f7..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_data_influences_field/get.pyi +++ /dev/null @@ -1,346 +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 - -# Query params -EntityNameSchema = schemas.StrSchema -EntityIdSchema = schemas.StrSchema -FieldNameSchema = schemas.StrSchema -PageSchema = schemas.IntSchema -SizeSchema = schemas.IntSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'entityName': typing.Union[EntityNameSchema, str, ], - 'entityId': typing.Union[EntityIdSchema, str, ], - 'fieldName': typing.Union[FieldNameSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_entity_name = api_client.QueryParameter( - name="entityName", - style=api_client.ParameterStyle.FORM, - schema=EntityNameSchema, - required=True, - explode=True, -) -request_query_entity_id = api_client.QueryParameter( - name="entityId", - style=api_client.ParameterStyle.FORM, - schema=EntityIdSchema, - required=True, - explode=True, -) -request_query_field_name = api_client.QueryParameter( - name="fieldName", - style=api_client.ParameterStyle.FORM, - schema=FieldNameSchema, - required=True, - explode=True, -) -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - explode=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _find_audit_data_influences_by_field_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_audit_data_influences_by_field_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_audit_data_influences_by_field_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_audit_data_influences_by_field_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, - ): - """ - 查询审计数据影响(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_entity_name, - request_query_entity_id, - request_query_field_name, - 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 FindAuditDataInfluencesByField(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_audit_data_influences_by_field( - 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_audit_data_influences_by_field( - 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_audit_data_influences_by_field( - 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_audit_data_influences_by_field( - 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_audit_data_influences_by_field_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_audit_data_influences_by_field_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_apollo_audit_logs_op_name/__init__.py b/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_op_name/__init__.py deleted file mode 100644 index 27d051d3..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_op_name/__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_apollo_audit_logs_op_name import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APOLLO_AUDIT_LOGS_OP_NAME diff --git a/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_op_name/get.py b/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_op_name/get.py deleted file mode 100644 index 02c95102..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_op_name/get.py +++ /dev/null @@ -1,352 +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 . import path - -# Query params -OpNameSchema = schemas.StrSchema -PageSchema = schemas.IntSchema -SizeSchema = schemas.IntSchema -StartDateSchema = schemas.StrSchema -EndDateSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'opName': typing.Union[OpNameSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - 'startDate': typing.Union[StartDateSchema, str, ], - 'endDate': typing.Union[EndDateSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_op_name = api_client.QueryParameter( - name="opName", - style=api_client.ParameterStyle.FORM, - schema=OpNameSchema, - required=True, - explode=True, -) -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - explode=True, -) -request_query_start_date = api_client.QueryParameter( - name="startDate", - style=api_client.ParameterStyle.FORM, - schema=StartDateSchema, - explode=True, -) -request_query_end_date = api_client.QueryParameter( - name="endDate", - style=api_client.ParameterStyle.FORM, - schema=EndDateSchema, - explode=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _find_audit_logs_by_op_name_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_audit_logs_by_op_name_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_audit_logs_by_op_name_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_audit_logs_by_op_name_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, - ): - """ - 按操作名查询审计日志(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_op_name, - request_query_page, - request_query_size, - request_query_start_date, - request_query_end_date, - ): - 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 FindAuditLogsByOpName(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_audit_logs_by_op_name( - 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_audit_logs_by_op_name( - 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_audit_logs_by_op_name( - 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_audit_logs_by_op_name( - 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_audit_logs_by_op_name_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_audit_logs_by_op_name_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_apollo_audit_logs_op_name/get.pyi b/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_op_name/get.pyi deleted file mode 100644 index b286c9b2..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apollo_audit_logs_op_name/get.pyi +++ /dev/null @@ -1,344 +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 - -# Query params -OpNameSchema = schemas.StrSchema -PageSchema = schemas.IntSchema -SizeSchema = schemas.IntSchema -StartDateSchema = schemas.StrSchema -EndDateSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'opName': typing.Union[OpNameSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - 'startDate': typing.Union[StartDateSchema, str, ], - 'endDate': typing.Union[EndDateSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_op_name = api_client.QueryParameter( - name="opName", - style=api_client.ParameterStyle.FORM, - schema=OpNameSchema, - required=True, - explode=True, -) -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - explode=True, -) -request_query_start_date = api_client.QueryParameter( - name="startDate", - style=api_client.ParameterStyle.FORM, - schema=StartDateSchema, - explode=True, -) -request_query_end_date = api_client.QueryParameter( - name="endDate", - style=api_client.ParameterStyle.FORM, - schema=EndDateSchema, - explode=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _find_audit_logs_by_op_name_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_audit_logs_by_op_name_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_audit_logs_by_op_name_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_audit_logs_by_op_name_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, - ): - """ - 按操作名查询审计日志(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_op_name, - request_query_page, - request_query_size, - request_query_start_date, - request_query_end_date, - ): - 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 FindAuditLogsByOpName(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_audit_logs_by_op_name( - 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_audit_logs_by_op_name( - 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_audit_logs_by_op_name( - 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_audit_logs_by_op_name( - 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_audit_logs_by_op_name_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_audit_logs_by_op_name_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_apollo_audit_properties/__init__.py b/python/apollo_openapi/paths/openapi_v1_apollo_audit_properties/__init__.py deleted file mode 100644 index 912d6c15..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apollo_audit_properties/__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_apollo_audit_properties import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APOLLO_AUDIT_PROPERTIES diff --git a/python/apollo_openapi/paths/openapi_v1_apollo_audit_properties/get.py b/python/apollo_openapi/paths/openapi_v1_apollo_audit_properties/get.py deleted file mode 100644 index 472bdd04..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apollo_audit_properties/get.py +++ /dev/null @@ -1,239 +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 . import path - -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_audit_properties_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_audit_properties_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_audit_properties_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_audit_properties_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, - ): - """ - 获取审计配置(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 - """ - 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 GetAuditProperties(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_audit_properties( - 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_audit_properties( - 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_audit_properties( - 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_audit_properties( - 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_audit_properties_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_audit_properties_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apollo_audit_properties/get.pyi b/python/apollo_openapi/paths/openapi_v1_apollo_audit_properties/get.pyi deleted file mode 100644 index 5482df4a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apollo_audit_properties/get.pyi +++ /dev/null @@ -1,231 +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 - -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_audit_properties_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_audit_properties_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_audit_properties_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_audit_properties_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, - ): - """ - 获取审计配置(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 - """ - 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 GetAuditProperties(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_audit_properties( - 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_audit_properties( - 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_audit_properties( - 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_audit_properties( - 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_audit_properties_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_audit_properties_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apollo_audit_trace/__init__.py b/python/apollo_openapi/paths/openapi_v1_apollo_audit_trace/__init__.py deleted file mode 100644 index 2408c210..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apollo_audit_trace/__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_apollo_audit_trace import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APOLLO_AUDIT_TRACE diff --git a/python/apollo_openapi/paths/openapi_v1_apollo_audit_trace/get.py b/python/apollo_openapi/paths/openapi_v1_apollo_audit_trace/get.py deleted file mode 100644 index 28070489..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apollo_audit_trace/get.py +++ /dev/null @@ -1,316 +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 . import path - -# Query params -TraceIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'traceId': typing.Union[TraceIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_trace_id = api_client.QueryParameter( - name="traceId", - style=api_client.ParameterStyle.FORM, - schema=TraceIdSchema, - required=True, - explode=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _find_audit_trace_details_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_audit_trace_details_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_audit_trace_details_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_audit_trace_details_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, - ): - """ - 查询审计链路详情(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_trace_id, - ): - 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 FindAuditTraceDetails(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_audit_trace_details( - 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_audit_trace_details( - 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_audit_trace_details( - 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_audit_trace_details( - 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_audit_trace_details_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_audit_trace_details_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_apollo_audit_trace/get.pyi b/python/apollo_openapi/paths/openapi_v1_apollo_audit_trace/get.pyi deleted file mode 100644 index 79b4e16e..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apollo_audit_trace/get.pyi +++ /dev/null @@ -1,308 +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 - -# Query params -TraceIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'traceId': typing.Union[TraceIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_trace_id = api_client.QueryParameter( - name="traceId", - style=api_client.ParameterStyle.FORM, - schema=TraceIdSchema, - required=True, - explode=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _find_audit_trace_details_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_audit_trace_details_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_audit_trace_details_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_audit_trace_details_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, - ): - """ - 查询审计链路详情(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_trace_id, - ): - 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 FindAuditTraceDetails(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_audit_trace_details( - 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_audit_trace_details( - 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_audit_trace_details( - 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_audit_trace_details( - 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_audit_trace_details_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_audit_trace_details_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/__init__.py b/python/apollo_openapi/paths/openapi_v1_appnamespaces/__init__.py deleted file mode 100644 index decbb340..00000000 --- a/python/apollo_openapi/paths/openapi_v1_appnamespaces/__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_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 deleted file mode 100644 index cb5c0a28..00000000 --- a/python/apollo_openapi/paths/openapi_v1_appnamespaces/get.py +++ /dev/null @@ -1,266 +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_app_namespace_dto import OpenAppNamespaceDTO - -from . import path - -_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, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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], - accept_content_types: typing.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, - accept_content_types: typing.Tuple[str] = _all_accept_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, - accept_content_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 - """ - 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 GetAppNamespaces(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_app_namespaces( - 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_app_namespaces( - 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_app_namespaces( - 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_app_namespaces( - 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_app_namespaces_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_app_namespaces_oapg( - 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 deleted file mode 100644 index 37c7827f..00000000 --- a/python/apollo_openapi/paths/openapi_v1_appnamespaces/get.pyi +++ /dev/null @@ -1,258 +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_app_namespace_dto import OpenAppNamespaceDTO - - - -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, - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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], - accept_content_types: typing.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, - accept_content_types: typing.Tuple[str] = _all_accept_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, - accept_content_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 - """ - 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 GetAppNamespaces(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_app_namespaces( - 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_app_namespaces( - 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_app_namespaces( - 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_app_namespaces( - 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_app_namespaces_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_app_namespaces_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/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps/__init__.py deleted file mode 100644 index 42a3c5fd..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps/__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_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 deleted file mode 100644 index 73b2a17d..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps/get.py +++ /dev/null @@ -1,341 +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_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), - }, -) -SchemaFor401ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index 309e5276..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps/get.pyi +++ /dev/null @@ -1,332 +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_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), - }, -) -SchemaFor401ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index 1e0b2615..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps/post.py +++ /dev/null @@ -1,369 +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.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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index 596b9bd9..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps/post.pyi +++ /dev/null @@ -1,359 +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.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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index d3b3e9fd..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id/__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_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 deleted file mode 100644 index 2bf53b88..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id/delete.py +++ /dev/null @@ -1,382 +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.exception_response import ExceptionResponse - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - '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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index e9cd5def..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id/delete.pyi +++ /dev/null @@ -1,372 +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.exception_response import ExceptionResponse - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - '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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index 11c1bd51..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id/get.py +++ /dev/null @@ -1,316 +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_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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index 91c7b1e7..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id/get.pyi +++ /dev/null @@ -1,307 +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_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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index f9b0bb1b..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id/put.py +++ /dev/null @@ -1,483 +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_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', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - '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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index b2f01418..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id/put.pyi +++ /dev/null @@ -1,473 +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_app_dto import OpenAppDTO -from apollo_openapi.model.exception_response import ExceptionResponse - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - '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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index 9479764c..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/__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_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 deleted file mode 100644 index f50c6326..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.py +++ /dev/null @@ -1,320 +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_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_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_app_namespaces_by_app_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_app_namespaces_by_app_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_app_namespaces_by_app_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, - ): - """ - 获取指定应用的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 GetAppNamespacesByAppId(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_app_namespaces_by_app_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_app_namespaces_by_app_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_app_namespaces_by_app_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_app_namespaces_by_app_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_app_namespaces_by_app_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_app_namespaces_by_app_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_apps_app_id_appnamespaces/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.pyi deleted file mode 100644 index a925600f..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/get.pyi +++ /dev/null @@ -1,312 +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_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_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_app_namespaces_by_app_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_app_namespaces_by_app_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_app_namespaces_by_app_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, - ): - """ - 获取指定应用的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 GetAppNamespacesByAppId(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_app_namespaces_by_app_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_app_namespaces_by_app_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_app_namespaces_by_app_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_app_namespaces_by_app_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_app_namespaces_by_app_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_app_namespaces_by_app_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_apps_app_id_appnamespaces/post.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.py deleted file mode 100644 index cb6a364d..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.py +++ /dev/null @@ -1,490 +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_app_namespace_dto import OpenAppNamespaceDTO -from apollo_openapi.model.exception_response import ExceptionResponse - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - '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), - }, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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_namespace_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _create_app_namespace_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _create_app_namespace_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_app_namespace_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_app_namespace_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - 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(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_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 CreateAppNamespace(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_app_namespace( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def create_app_namespace( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def create_app_namespace( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_app_namespace( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_app_namespace( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_app_namespace_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_namespace_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/post.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.pyi deleted file mode 100644 index 68702d38..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces/post.pyi +++ /dev/null @@ -1,480 +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_app_namespace_dto import OpenAppNamespaceDTO -from apollo_openapi.model.exception_response import ExceptionResponse - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - '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), - }, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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_namespace_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _create_app_namespace_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _create_app_namespace_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_app_namespace_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_app_namespace_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - 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(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_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 CreateAppNamespace(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_app_namespace( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def create_app_namespace( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def create_app_namespace( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_app_namespace( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_app_namespace( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_app_namespace_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_namespace_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_namespace_name/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/__init__.py deleted file mode 100644 index b4324118..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/__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_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 deleted file mode 100644 index 2aa3c5bf..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/delete.py +++ /dev/null @@ -1,325 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from apollo_openapi import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_app_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_app_namespace_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - 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(), - 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(), - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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(), - 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(), - 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(), - 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(), - 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, - 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(), - 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(), - 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(), - 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(), - 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, - 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 deleted file mode 100644 index c36210f8..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/delete.pyi +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from apollo_openapi import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_app_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_app_namespace_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - 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(), - 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(), - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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(), - 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(), - 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(), - 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(), - 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, - 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(), - 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(), - 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(), - 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(), - 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, - 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 deleted file mode 100644 index 5e801e11..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.py +++ /dev/null @@ -1,358 +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_app_namespace_dto import OpenAppNamespaceDTO - -from . import path - -# Query params -ExtendInfoSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'extendInfo': typing.Union[ExtendInfoSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_extend_info = api_client.QueryParameter( - name="extendInfo", - style=api_client.ParameterStyle.FORM, - schema=ExtendInfoSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -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 _find_app_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _find_app_namespace_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _find_app_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _find_app_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - 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_extend_info, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FindAppNamespace(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_app_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def find_app_namespace( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def find_app_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def find_app_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_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 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_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.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.pyi deleted file mode 100644 index 554d868c..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name/get.pyi +++ /dev/null @@ -1,350 +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_app_namespace_dto import OpenAppNamespaceDTO - -# Query params -ExtendInfoSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'extendInfo': typing.Union[ExtendInfoSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_extend_info = api_client.QueryParameter( - name="extendInfo", - style=api_client.ParameterStyle.FORM, - schema=ExtendInfoSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -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 _find_app_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _find_app_namespace_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _find_app_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _find_app_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - 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_extend_info, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FindAppNamespace(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_app_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def find_app_namespace( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def find_app_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def find_app_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_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 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_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_usage/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/__init__.py deleted file mode 100644 index dbdf5afd..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/__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_apps_app_id_appnamespaces_namespace_name_usage import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_APPNAMESPACES_NAMESPACE_NAME_USAGE diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/get.py deleted file mode 100644 index e996b065..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/get.py +++ /dev/null @@ -1,329 +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_namespace_usage_dto import OpenNamespaceUsageDTO - -from . import path - -# Path params -AppIdSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_app_id = api_client.PathParameter( - name="appId", - style=api_client.ParameterStyle.SIMPLE, - schema=AppIdSchema, - required=True, -) -request_path_namespace_name = api_client.PathParameter( - name="namespaceName", - style=api_client.ParameterStyle.SIMPLE, - schema=NamespaceNameSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenNamespaceUsageDTO']: - return OpenNamespaceUsageDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenNamespaceUsageDTO'], typing.List['OpenNamespaceUsageDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenNamespaceUsageDTO': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _find_app_namespace_usage_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _find_app_namespace_usage_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _find_app_namespace_usage_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _find_app_namespace_usage_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 查询appnamespace使用情况(new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_app_id, - request_path_namespace_name, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FindAppNamespaceUsage(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_app_namespace_usage( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def find_app_namespace_usage( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def find_app_namespace_usage( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def find_app_namespace_usage( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_app_namespace_usage_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_app_namespace_usage_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/get.pyi deleted file mode 100644 index 4ad4af68..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/get.pyi +++ /dev/null @@ -1,321 +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_namespace_usage_dto import OpenNamespaceUsageDTO - -# Path params -AppIdSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_app_id = api_client.PathParameter( - name="appId", - style=api_client.ParameterStyle.SIMPLE, - schema=AppIdSchema, - required=True, -) -request_path_namespace_name = api_client.PathParameter( - name="namespaceName", - style=api_client.ParameterStyle.SIMPLE, - schema=NamespaceNameSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenNamespaceUsageDTO']: - return OpenNamespaceUsageDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenNamespaceUsageDTO'], typing.List['OpenNamespaceUsageDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenNamespaceUsageDTO': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _find_app_namespace_usage_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _find_app_namespace_usage_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _find_app_namespace_usage_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _find_app_namespace_usage_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 查询appnamespace使用情况(new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_app_id, - request_path_namespace_name, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FindAppNamespaceUsage(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_app_namespace_usage( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def find_app_namespace_usage( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def find_app_namespace_usage( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def find_app_namespace_usage( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_app_namespace_usage_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_app_namespace_usage_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_env_cluster_info/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_env_cluster_info/__init__.py deleted file mode 100644 index 9aaa3077..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_env_cluster_info/__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_apps_app_id_env_cluster_info import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVCLUSTERINFO diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_env_cluster_info/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_env_cluster_info/get.py deleted file mode 100644 index 5eaa1f1f..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_env_cluster_info/get.py +++ /dev/null @@ -1,320 +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_env_cluster_info import OpenEnvClusterInfo - -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['OpenEnvClusterInfo']: - return OpenEnvClusterInfo - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenEnvClusterInfo'], typing.List['OpenEnvClusterInfo']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenEnvClusterInfo': - return super().__getitem__(i) - - -@dataclass -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_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, - ): - """ - 获取应用环境集群详情(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 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_env_cluster_info/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_env_cluster_info/get.pyi deleted file mode 100644 index 336eacc7..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_env_cluster_info/get.pyi +++ /dev/null @@ -1,312 +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_env_cluster_info import OpenEnvClusterInfo - -# 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['OpenEnvClusterInfo']: - return OpenEnvClusterInfo - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenEnvClusterInfo'], typing.List['OpenEnvClusterInfo']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenEnvClusterInfo': - return super().__getitem__(i) - - -@dataclass -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_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, - ): - """ - 获取应用环境集群详情(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 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/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/__init__.py deleted file mode 100644 index b4da727a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/__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_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 deleted file mode 100644 index 12db8cb7..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/get.py +++ /dev/null @@ -1,341 +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_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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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_clusters_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_clusters_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_clusters_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_clusters_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 GetEnvClusters(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_env_clusters( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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_clusters( - 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_clusters( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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_clusters( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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_clusters_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_clusters_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 deleted file mode 100644 index c4dd2554..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envclusters/get.pyi +++ /dev/null @@ -1,332 +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_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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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_clusters_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_clusters_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_clusters_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_clusters_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 GetEnvClusters(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_env_clusters( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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_clusters( - 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_clusters( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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_clusters( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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_clusters_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_clusters_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_accesskeys/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys/__init__.py deleted file mode 100644 index 98906c3a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys/__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_apps_app_id_envs_env_accesskeys import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_ACCESSKEYS diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys/get.py deleted file mode 100644 index 3542372c..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys/get.py +++ /dev/null @@ -1,329 +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_access_key_dto import OpenAccessKeyDTO - -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, -) -_auth = [ - 'ApiKeyAuth', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenAccessKeyDTO']: - return OpenAccessKeyDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenAccessKeyDTO'], typing.List['OpenAccessKeyDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenAccessKeyDTO': - 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_access_keys_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_access_keys_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_access_keys_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_access_keys_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, - ): - """ - 查找AccessKey - :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) - - 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 FindAccessKeys(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_access_keys( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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_access_keys( - 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_access_keys( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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_access_keys( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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_access_keys_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_access_keys_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_accesskeys/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys/get.pyi deleted file mode 100644 index 4ee29dc8..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys/get.pyi +++ /dev/null @@ -1,321 +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_access_key_dto import OpenAccessKeyDTO - -# 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, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenAccessKeyDTO']: - return OpenAccessKeyDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenAccessKeyDTO'], typing.List['OpenAccessKeyDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenAccessKeyDTO': - 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_access_keys_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_access_keys_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_access_keys_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_access_keys_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, - ): - """ - 查找AccessKey - :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) - - 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 FindAccessKeys(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_access_keys( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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_access_keys( - 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_access_keys( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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_access_keys( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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_access_keys_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_access_keys_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_accesskeys/post.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys/post.py deleted file mode 100644 index 8f7fb03d..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys/post.py +++ /dev/null @@ -1,358 +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_access_key_dto import OpenAccessKeyDTO - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -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, -) -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationJson = OpenAccessKeyDTO - - -@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_access_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 _create_access_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 _create_access_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 _create_access_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, - ): - """ - 创建AccessKey - :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, - ): - 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 CreateAccessKey(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_access_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 create_access_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 create_access_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 create_access_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._create_access_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 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_access_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_apps_app_id_envs_env_accesskeys/post.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys/post.pyi deleted file mode 100644 index 0a5f5bc5..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys/post.pyi +++ /dev/null @@ -1,350 +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_access_key_dto import OpenAccessKeyDTO - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -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, -) -SchemaFor200ResponseBodyApplicationJson = OpenAccessKeyDTO - - -@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_access_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 _create_access_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 _create_access_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 _create_access_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, - ): - """ - 创建AccessKey - :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, - ): - 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 CreateAccessKey(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_access_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 create_access_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 create_access_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 create_access_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._create_access_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 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_access_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_apps_app_id_envs_env_accesskeys_access_key_id/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id/__init__.py deleted file mode 100644 index e23cd82c..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id/__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_apps_app_id_envs_env_accesskeys_access_key_id import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_ACCESSKEYS_ACCESS_KEY_ID diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id/delete.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id/delete.py deleted file mode 100644 index 87fccd6f..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id/delete.py +++ /dev/null @@ -1,334 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from apollo_openapi import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -AccessKeyIdSchema = schemas.Int64Schema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'accessKeyId': typing.Union[AccessKeyIdSchema, decimal.Decimal, int, ], - } -) -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_access_key_id = api_client.PathParameter( - name="accessKeyId", - style=api_client.ParameterStyle.SIMPLE, - schema=AccessKeyIdSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_access_key_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_access_key_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_access_key_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_access_key_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 删除AccessKey - :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_access_key_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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 DeleteAccessKey(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_access_key( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete_access_key( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_access_key( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_access_key( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_access_key_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_access_key_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id/delete.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id/delete.pyi deleted file mode 100644 index 9af2c7a6..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id/delete.pyi +++ /dev/null @@ -1,326 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from apollo_openapi import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -AccessKeyIdSchema = schemas.Int64Schema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'accessKeyId': typing.Union[AccessKeyIdSchema, decimal.Decimal, int, ], - } -) -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_access_key_id = api_client.PathParameter( - name="accessKeyId", - style=api_client.ParameterStyle.SIMPLE, - schema=AccessKeyIdSchema, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_access_key_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_access_key_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_access_key_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_access_key_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 删除AccessKey - :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_access_key_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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 DeleteAccessKey(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_access_key( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete_access_key( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_access_key( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_access_key( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_access_key_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_access_key_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation/__init__.py deleted file mode 100644 index d6ea3dd0..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation/__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_apps_app_id_envs_env_accesskeys_access_key_id_activation import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_ACCESSKEYS_ACCESS_KEY_ID_ACTIVATION diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation/put.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation/put.py deleted file mode 100644 index eac9d8f4..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation/put.py +++ /dev/null @@ -1,343 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -ModeSchema = schemas.IntSchema -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'mode': typing.Union[ModeSchema, decimal.Decimal, int, ], - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_mode = api_client.QueryParameter( - name="mode", - style=api_client.ParameterStyle.FORM, - schema=ModeSchema, - explode=True, -) -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -AccessKeyIdSchema = schemas.Int64Schema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'accessKeyId': typing.Union[AccessKeyIdSchema, decimal.Decimal, int, ], - } -) -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_access_key_id = api_client.PathParameter( - name="accessKeyId", - style=api_client.ParameterStyle.SIMPLE, - schema=AccessKeyIdSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _enable_access_key_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _enable_access_key_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _enable_access_key_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _enable_access_key_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 启用AccessKey - :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_access_key_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_mode, - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - 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 EnableAccessKey(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def enable_access_key( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def enable_access_key( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def enable_access_key( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def enable_access_key( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._enable_access_key_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._enable_access_key_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation/put.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation/put.pyi deleted file mode 100644 index 1cebf4d2..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation/put.pyi +++ /dev/null @@ -1,335 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -ModeSchema = schemas.IntSchema -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'mode': typing.Union[ModeSchema, decimal.Decimal, int, ], - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_mode = api_client.QueryParameter( - name="mode", - style=api_client.ParameterStyle.FORM, - schema=ModeSchema, - explode=True, -) -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -AccessKeyIdSchema = schemas.Int64Schema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'accessKeyId': typing.Union[AccessKeyIdSchema, decimal.Decimal, int, ], - } -) -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_access_key_id = api_client.PathParameter( - name="accessKeyId", - style=api_client.ParameterStyle.SIMPLE, - schema=AccessKeyIdSchema, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _enable_access_key_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _enable_access_key_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _enable_access_key_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _enable_access_key_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 启用AccessKey - :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_access_key_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_mode, - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - 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 EnableAccessKey(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def enable_access_key( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def enable_access_key( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def enable_access_key( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def enable_access_key( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._enable_access_key_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._enable_access_key_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation/__init__.py deleted file mode 100644 index 869795bb..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation/__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_apps_app_id_envs_env_accesskeys_access_key_id_deactivation import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_ACCESSKEYS_ACCESS_KEY_ID_DEACTIVATION diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation/put.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation/put.py deleted file mode 100644 index 4c3d27ce..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation/put.py +++ /dev/null @@ -1,334 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from apollo_openapi import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -AccessKeyIdSchema = schemas.Int64Schema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'accessKeyId': typing.Union[AccessKeyIdSchema, decimal.Decimal, int, ], - } -) -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_access_key_id = api_client.PathParameter( - name="accessKeyId", - style=api_client.ParameterStyle.SIMPLE, - schema=AccessKeyIdSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _disable_access_key_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _disable_access_key_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _disable_access_key_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _disable_access_key_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 禁用AccessKey - :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_access_key_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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - 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 DisableAccessKey(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def disable_access_key( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def disable_access_key( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def disable_access_key( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def disable_access_key( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._disable_access_key_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._disable_access_key_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation/put.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation/put.pyi deleted file mode 100644 index fd2425f7..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation/put.pyi +++ /dev/null @@ -1,326 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from apollo_openapi import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -AccessKeyIdSchema = schemas.Int64Schema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'accessKeyId': typing.Union[AccessKeyIdSchema, decimal.Decimal, int, ], - } -) -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_access_key_id = api_client.PathParameter( - name="accessKeyId", - style=api_client.ParameterStyle.SIMPLE, - schema=AccessKeyIdSchema, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _disable_access_key_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _disable_access_key_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _disable_access_key_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _disable_access_key_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 禁用AccessKey - :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_access_key_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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - 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 DisableAccessKey(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def disable_access_key( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def disable_access_key( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def disable_access_key( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def disable_access_key( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._disable_access_key_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._disable_access_key_oapg( - query_params=query_params, - path_params=path_params, - 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_export/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/__init__.py deleted file mode 100644 index 51651bd3..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/__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_apps_app_id_envs_env_clusters_cluster_name_export import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_EXPORT diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/get.py deleted file mode 100644 index 16a16233..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/get.py +++ /dev/null @@ -1,311 +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 . 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', -] -SchemaFor200ResponseBodyApplicationOctetStream = schemas.BinarySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationOctetStream, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/octet-stream': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationOctetStream), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/octet-stream', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _export_app_config_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 _export_app_config_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 _export_app_config_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 _export_app_config_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, - ): - 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 ExportAppConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def export_app_config( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def export_app_config( - 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 export_app_config( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def export_app_config( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._export_app_config_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._export_app_config_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_export/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/get.pyi deleted file mode 100644 index b43c2598..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/get.pyi +++ /dev/null @@ -1,303 +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 - -# 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, -) -SchemaFor200ResponseBodyApplicationOctetStream = schemas.BinarySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationOctetStream, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/octet-stream': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationOctetStream), - }, -) -_all_accept_content_types = ( - 'application/octet-stream', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _export_app_config_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 _export_app_config_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 _export_app_config_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 _export_app_config_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, - ): - 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 ExportAppConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def export_app_config( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def export_app_config( - 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 export_app_config( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def export_app_config( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._export_app_config_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._export_app_config_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_export/head.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/head.py deleted file mode 100644 index 05024460..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/head.py +++ /dev/null @@ -1,280 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _check_export_app_config_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _check_export_app_config_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _check_export_app_config_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _check_export_app_config_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - 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, - ): - 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) - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='head'.upper(), - 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 CheckExportAppConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def check_export_app_config( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def check_export_app_config( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def check_export_app_config( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def check_export_app_config( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._check_export_app_config_oapg( - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForhead(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def head( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def head( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def head( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def head( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._check_export_app_config_oapg( - path_params=path_params, - 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_export/head.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/head.pyi deleted file mode 100644 index 7b23e38d..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/head.pyi +++ /dev/null @@ -1,272 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _check_export_app_config_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _check_export_app_config_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _check_export_app_config_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _check_export_app_config_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - 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, - ): - 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) - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='head'.upper(), - 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 CheckExportAppConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def check_export_app_config( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def check_export_app_config( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def check_export_app_config( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def check_export_app_config( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._check_export_app_config_oapg( - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForhead(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def head( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def head( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def head( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def head( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._check_export_app_config_oapg( - path_params=path_params, - 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_import/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import/__init__.py deleted file mode 100644 index 37e74eb8..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import/__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_apps_app_id_envs_env_clusters_cluster_name_import import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_IMPORT diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import/post.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import/post.py deleted file mode 100644 index 93cd8dbf..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import/post.py +++ /dev/null @@ -1,481 +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 . import path - -# Query params -ConflictActionSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'conflictAction': typing.Union[ConflictActionSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_conflict_action = api_client.QueryParameter( - name="conflictAction", - style=api_client.ParameterStyle.FORM, - schema=ConflictActionSchema, - 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, -) -# body param - - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - file = schemas.BinarySchema - __annotations__ = { - "file": file, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["file"]) -> MetaOapg.properties.file: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["file", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["file"]) -> typing.Union[MetaOapg.properties.file, 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["file", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - file: typing.Union[MetaOapg.properties.file, bytes, io.FileIO, io.BufferedReader, 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], - ) -> 'SchemaForRequestBodyMultipartFormData': - return super().__new__( - cls, - *_args, - file=file, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _import_app_config_oapg( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _import_app_config_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _import_app_config_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _import_app_config_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _import_app_config_oapg( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - 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, - ): - 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_conflict_action, - ): - 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 - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.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 ImportAppConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def import_app_config( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def import_app_config( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def import_app_config( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def import_app_config( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def import_app_config( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._import_app_config_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._import_app_config_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - 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_import/post.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import/post.pyi deleted file mode 100644 index 04325ac0..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import/post.pyi +++ /dev/null @@ -1,473 +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 - -# Query params -ConflictActionSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'conflictAction': typing.Union[ConflictActionSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_conflict_action = api_client.QueryParameter( - name="conflictAction", - style=api_client.ParameterStyle.FORM, - schema=ConflictActionSchema, - 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, -) -# body param - - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - file = schemas.BinarySchema - __annotations__ = { - "file": file, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["file"]) -> MetaOapg.properties.file: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["file", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["file"]) -> typing.Union[MetaOapg.properties.file, 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["file", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - file: typing.Union[MetaOapg.properties.file, bytes, io.FileIO, io.BufferedReader, 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], - ) -> 'SchemaForRequestBodyMultipartFormData': - return super().__new__( - cls, - *_args, - file=file, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _import_app_config_oapg( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _import_app_config_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _import_app_config_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _import_app_config_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _import_app_config_oapg( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - 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, - ): - 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_conflict_action, - ): - 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 - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.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 ImportAppConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def import_app_config( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def import_app_config( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def import_app_config( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def import_app_config( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def import_app_config( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._import_app_config_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._import_app_config_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/__init__.py deleted file mode 100644 index 9103fac2..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/__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_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_MISSINGNAMESPACES diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/get.py deleted file mode 100644 index 3f4e462c..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/get.py +++ /dev/null @@ -1,333 +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 . 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 _find_missing_namespaces_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_missing_namespaces_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_missing_namespaces_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_missing_namespaces_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 FindMissingNamespaces(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_missing_namespaces( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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_missing_namespaces( - 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_missing_namespaces( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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_missing_namespaces( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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_missing_namespaces_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_missing_namespaces_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_missing_namespaces/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/get.pyi deleted file mode 100644 index 2f9e55b7..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/get.pyi +++ /dev/null @@ -1,325 +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 - -# 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 _find_missing_namespaces_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_missing_namespaces_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_missing_namespaces_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_missing_namespaces_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 FindMissingNamespaces(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_missing_namespaces( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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_missing_namespaces( - 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_missing_namespaces( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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_missing_namespaces( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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_missing_namespaces_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_missing_namespaces_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_missing_namespaces/post.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/post.py deleted file mode 100644 index 8cc1d5f0..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/post.py +++ /dev/null @@ -1,334 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from apollo_openapi import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'clusterName': typing.Union[ClusterNameSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_app_id = api_client.PathParameter( - name="appId", - style=api_client.ParameterStyle.SIMPLE, - schema=AppIdSchema, - required=True, -) -request_path_env = api_client.PathParameter( - name="env", - style=api_client.ParameterStyle.SIMPLE, - schema=EnvSchema, - required=True, -) -request_path_cluster_name = api_client.PathParameter( - name="clusterName", - style=api_client.ParameterStyle.SIMPLE, - schema=ClusterNameSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _create_missing_namespaces_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _create_missing_namespaces_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_missing_namespaces_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_missing_namespaces_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 创建缺失的Namespace (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_app_id, - request_path_env, - request_path_cluster_name, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_operator, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateMissingNamespaces(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_missing_namespaces( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def create_missing_namespaces( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_missing_namespaces( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_missing_namespaces( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_missing_namespaces_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_missing_namespaces_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/post.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/post.pyi deleted file mode 100644 index 6dc597e0..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/post.pyi +++ /dev/null @@ -1,326 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from apollo_openapi import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'clusterName': typing.Union[ClusterNameSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_app_id = api_client.PathParameter( - name="appId", - style=api_client.ParameterStyle.SIMPLE, - schema=AppIdSchema, - required=True, -) -request_path_env = api_client.PathParameter( - name="env", - style=api_client.ParameterStyle.SIMPLE, - schema=EnvSchema, - required=True, -) -request_path_cluster_name = api_client.PathParameter( - name="clusterName", - style=api_client.ParameterStyle.SIMPLE, - schema=ClusterNameSchema, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_missing_namespaces_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _create_missing_namespaces_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_missing_namespaces_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_missing_namespaces_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 创建缺失的Namespace (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_app_id, - request_path_env, - request_path_cluster_name, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_operator, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateMissingNamespaces(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_missing_namespaces( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def create_missing_namespaces( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_missing_namespaces( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_missing_namespaces( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_missing_namespaces_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_missing_namespaces_oapg( - query_params=query_params, - path_params=path_params, - 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/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/__init__.py deleted file mode 100644 index 78f2558d..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/__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_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/delete.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/delete.py deleted file mode 100644 index 43214eca..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/delete.py +++ /dev/null @@ -1,343 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from apollo_openapi import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_namespace_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 删除指定的Namespace (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 DeleteNamespace(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete_namespace( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_namespace_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_namespace_oapg( - query_params=query_params, - path_params=path_params, - 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/delete.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/delete.pyi deleted file mode 100644 index 186662f5..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/delete.pyi +++ /dev/null @@ -1,335 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from apollo_openapi import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_namespace_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 删除指定的Namespace (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 DeleteNamespace(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete_namespace( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_namespace_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_namespace_oapg( - query_params=query_params, - path_params=path_params, - 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_commits/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits/__init__.py deleted file mode 100644 index ebf42aea..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits/__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_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_COMMITS diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits/get.py deleted file mode 100644 index 60c8edba..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits/get.py +++ /dev/null @@ -1,414 +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 . import path - -# Query params -KeySchema = schemas.StrSchema -PageSchema = schemas.IntSchema -SizeSchema = schemas.IntSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'key': typing.Union[KeySchema, str, ], - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_key = api_client.QueryParameter( - name="key", - style=api_client.ParameterStyle.FORM, - schema=KeySchema, - explode=True, -) -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - 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: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _find_commits_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_commits_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_commits_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_commits_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_key, - 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 FindCommits(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_commits( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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_commits( - 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_commits( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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_commits( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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_commits_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_commits_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_commits/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits/get.pyi deleted file mode 100644 index 9b21078f..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits/get.pyi +++ /dev/null @@ -1,406 +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 - -# Query params -KeySchema = schemas.StrSchema -PageSchema = schemas.IntSchema -SizeSchema = schemas.IntSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'key': typing.Union[KeySchema, str, ], - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_key = api_client.QueryParameter( - name="key", - style=api_client.ParameterStyle.FORM, - schema=KeySchema, - explode=True, -) -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - 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: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _find_commits_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_commits_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_commits_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_commits_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_key, - 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 FindCommits(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_commits( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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_commits( - 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_commits( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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_commits( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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_commits_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_commits_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_items_export/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export/__init__.py deleted file mode 100644 index 8d7f9360..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export/__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_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_EXPORT diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export/get.py deleted file mode 100644 index 60fa13f1..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export/get.py +++ /dev/null @@ -1,320 +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 . 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', -] -SchemaFor200ResponseBodyApplicationOctetStream = schemas.BinarySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationOctetStream, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/octet-stream': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationOctetStream), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/octet-stream', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _export_namespace_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 _export_namespace_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 _export_namespace_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 _export_namespace_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, - ): - 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 ExportNamespaceItems(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def export_namespace_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 export_namespace_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 export_namespace_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 export_namespace_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._export_namespace_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._export_namespace_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_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export/get.pyi deleted file mode 100644 index 09a27ba9..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export/get.pyi +++ /dev/null @@ -1,312 +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 - -# 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, -) -SchemaFor200ResponseBodyApplicationOctetStream = schemas.BinarySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationOctetStream, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/octet-stream': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationOctetStream), - }, -) -_all_accept_content_types = ( - 'application/octet-stream', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _export_namespace_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 _export_namespace_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 _export_namespace_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 _export_namespace_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, - ): - 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 ExportNamespaceItems(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def export_namespace_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 export_namespace_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 export_namespace_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 export_namespace_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._export_namespace_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._export_namespace_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_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import/__init__.py deleted file mode 100644 index abaf25b4..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import/__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_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_IMPORT diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import/post.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import/post.py deleted file mode 100644 index 90ac1b7d..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import/post.py +++ /dev/null @@ -1,433 +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 . 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 - - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - file = schemas.BinarySchema - __annotations__ = { - "file": file, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["file"]) -> MetaOapg.properties.file: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["file", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["file"]) -> typing.Union[MetaOapg.properties.file, 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["file", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - file: typing.Union[MetaOapg.properties.file, bytes, io.FileIO, io.BufferedReader, 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], - ) -> 'SchemaForRequestBodyMultipartFormData': - return super().__new__( - cls, - *_args, - file=file, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _import_namespace_items_oapg( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _import_namespace_items_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _import_namespace_items_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _import_namespace_items_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _import_namespace_items_oapg( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - 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 - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.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 ImportNamespaceItems(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def import_namespace_items( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def import_namespace_items( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def import_namespace_items( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def import_namespace_items( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def import_namespace_items( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._import_namespace_items_oapg( - body=body, - path_params=path_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._import_namespace_items_oapg( - body=body, - path_params=path_params, - content_type=content_type, - 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_items_import/post.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import/post.pyi deleted file mode 100644 index 15cfb465..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import/post.pyi +++ /dev/null @@ -1,425 +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 - -# 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 - - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - file = schemas.BinarySchema - __annotations__ = { - "file": file, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["file"]) -> MetaOapg.properties.file: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["file", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["file"]) -> typing.Union[MetaOapg.properties.file, 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["file", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - file: typing.Union[MetaOapg.properties.file, bytes, io.FileIO, io.BufferedReader, 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], - ) -> 'SchemaForRequestBodyMultipartFormData': - return super().__new__( - cls, - *_args, - file=file, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _import_namespace_items_oapg( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _import_namespace_items_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _import_namespace_items_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _import_namespace_items_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _import_namespace_items_oapg( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - 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 - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.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 ImportNamespaceItems(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def import_namespace_items( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def import_namespace_items( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def import_namespace_items( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def import_namespace_items( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def import_namespace_items( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._import_namespace_items_oapg( - body=body, - path_params=path_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._import_namespace_items_oapg( - body=body, - path_params=path_params, - content_type=content_type, - 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_releases_histories/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories/__init__.py deleted file mode 100644 index f76cc521..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories/__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_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_RELEASES_HISTORIES diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories/get.py deleted file mode 100644 index 1d7402e5..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories/get.py +++ /dev/null @@ -1,405 +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 . import path - -# Query params -PageSchema = schemas.IntSchema -SizeSchema = schemas.IntSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - 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: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _find_release_histories_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_release_histories_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_release_histories_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_release_histories_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, - ): - """ - 查询命名空间发布历史(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 FindReleaseHistoriesByNamespace(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_release_histories_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_release_histories_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_release_histories_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_release_histories_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_release_histories_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_release_histories_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_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories/get.pyi deleted file mode 100644 index b663e9fb..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories/get.pyi +++ /dev/null @@ -1,397 +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 - -# Query params -PageSchema = schemas.IntSchema -SizeSchema = schemas.IntSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - 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: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _find_release_histories_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_release_histories_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_release_histories_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_release_histories_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, - ): - """ - 查询命名空间发布历史(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 FindReleaseHistoriesByNamespace(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_release_histories_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_release_histories_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_release_histories_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_release_histories_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_release_histories_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_release_histories_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_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/__init__.py deleted file mode 100644 index be1e916b..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/__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_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_USAGE diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/get.py deleted file mode 100644 index b532584e..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/get.py +++ /dev/null @@ -1,347 +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_namespace_usage_dto import OpenNamespaceUsageDTO - -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', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenNamespaceUsageDTO']: - return OpenNamespaceUsageDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenNamespaceUsageDTO'], typing.List['OpenNamespaceUsageDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenNamespaceUsageDTO': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _find_namespace_usage_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _find_namespace_usage_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _find_namespace_usage_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _find_namespace_usage_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 查询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 FindNamespaceUsage(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_namespace_usage( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def find_namespace_usage( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def find_namespace_usage( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def find_namespace_usage( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_namespace_usage_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_namespace_usage_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/get.pyi deleted file mode 100644 index a7f64463..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/get.pyi +++ /dev/null @@ -1,339 +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_namespace_usage_dto import OpenNamespaceUsageDTO - -# 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['OpenNamespaceUsageDTO']: - return OpenNamespaceUsageDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenNamespaceUsageDTO'], typing.List['OpenNamespaceUsageDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenNamespaceUsageDTO': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _find_namespace_usage_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _find_namespace_usage_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _find_namespace_usage_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _find_namespace_usage_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 查询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 FindNamespaceUsage(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_namespace_usage( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def find_namespace_usage( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def find_namespace_usage( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def find_namespace_usage( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_namespace_usage_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_namespace_usage_oapg( - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init/__init__.py deleted file mode 100644 index eefe4b2b..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init/__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_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_PERMISSIONINIT diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init/post.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init/post.py deleted file mode 100644 index b26b3acd..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init/post.py +++ /dev/null @@ -1,334 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from apollo_openapi import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'clusterName': typing.Union[ClusterNameSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_app_id = api_client.PathParameter( - name="appId", - style=api_client.ParameterStyle.SIMPLE, - schema=AppIdSchema, - required=True, -) -request_path_env = api_client.PathParameter( - name="env", - style=api_client.ParameterStyle.SIMPLE, - schema=EnvSchema, - required=True, -) -request_path_cluster_name = api_client.PathParameter( - name="clusterName", - style=api_client.ParameterStyle.SIMPLE, - schema=ClusterNameSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _init_cluster_namespace_permission_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _init_cluster_namespace_permission_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _init_cluster_namespace_permission_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _init_cluster_namespace_permission_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 初始化集群Namespace权限 (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_app_id, - request_path_env, - request_path_cluster_name, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_operator, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - 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 InitClusterNamespacePermission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def init_cluster_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def init_cluster_namespace_permission( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def init_cluster_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def init_cluster_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._init_cluster_namespace_permission_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._init_cluster_namespace_permission_oapg( - query_params=query_params, - path_params=path_params, - 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_permission_init/post.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init/post.pyi deleted file mode 100644 index a4f3783d..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init/post.pyi +++ /dev/null @@ -1,326 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from apollo_openapi import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'clusterName': typing.Union[ClusterNameSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_app_id = api_client.PathParameter( - name="appId", - style=api_client.ParameterStyle.SIMPLE, - schema=AppIdSchema, - required=True, -) -request_path_env = api_client.PathParameter( - name="env", - style=api_client.ParameterStyle.SIMPLE, - schema=EnvSchema, - required=True, -) -request_path_cluster_name = api_client.PathParameter( - name="clusterName", - style=api_client.ParameterStyle.SIMPLE, - schema=ClusterNameSchema, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _init_cluster_namespace_permission_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _init_cluster_namespace_permission_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _init_cluster_namespace_permission_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _init_cluster_namespace_permission_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 初始化集群Namespace权限 (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_app_id, - request_path_env, - request_path_cluster_name, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_operator, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - 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 InitClusterNamespacePermission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def init_cluster_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def init_cluster_namespace_permission( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def init_cluster_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def init_cluster_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._init_cluster_namespace_permission_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._init_cluster_namespace_permission_oapg( - query_params=query_params, - path_params=path_params, - 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_permissions_permission_type/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type/__init__.py deleted file mode 100644 index d479b22f..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type/__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_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_PERMISSIONS_PERMISSION_TYPE diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type/get.py deleted file mode 100644 index f233a032..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type/get.py +++ /dev/null @@ -1,377 +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_permission_condition_dto import OpenPermissionConditionDTO - -from . import path - -# Query params -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -PermissionTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'clusterName': typing.Union[ClusterNameSchema, str, ], - 'permissionType': typing.Union[PermissionTypeSchema, 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_permission_type = api_client.PathParameter( - name="permissionType", - style=api_client.ParameterStyle.SIMPLE, - schema=PermissionTypeSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationJson = OpenPermissionConditionDTO - - -@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 _has_cluster_namespace_permission_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 _has_cluster_namespace_permission_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 _has_cluster_namespace_permission_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 _has_cluster_namespace_permission_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_permission_type, - ): - 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_user_id, - ): - 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 HasClusterNamespacePermission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def has_cluster_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def has_cluster_namespace_permission( - 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 has_cluster_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def has_cluster_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._has_cluster_namespace_permission_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._has_cluster_namespace_permission_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_permissions_permission_type/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type/get.pyi deleted file mode 100644 index 3a7f6ede..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type/get.pyi +++ /dev/null @@ -1,369 +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_permission_condition_dto import OpenPermissionConditionDTO - -# Query params -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -PermissionTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'clusterName': typing.Union[ClusterNameSchema, str, ], - 'permissionType': typing.Union[PermissionTypeSchema, 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_permission_type = api_client.PathParameter( - name="permissionType", - style=api_client.ParameterStyle.SIMPLE, - schema=PermissionTypeSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = OpenPermissionConditionDTO - - -@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 _has_cluster_namespace_permission_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 _has_cluster_namespace_permission_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 _has_cluster_namespace_permission_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 _has_cluster_namespace_permission_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_permission_type, - ): - 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_user_id, - ): - 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 HasClusterNamespacePermission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def has_cluster_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def has_cluster_namespace_permission( - 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 has_cluster_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def has_cluster_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._has_cluster_namespace_permission_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._has_cluster_namespace_permission_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_role_users/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users/__init__.py deleted file mode 100644 index edc8e32e..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users/__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_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_NAMESPACES_ROLEUSERS diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users/get.py deleted file mode 100644 index 64dea30e..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users/get.py +++ /dev/null @@ -1,313 +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_cluster_namespace_role_user_dto import OpenClusterNamespaceRoleUserDTO - -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', -] -SchemaFor200ResponseBodyApplicationJson = OpenClusterNamespaceRoleUserDTO - - -@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_cluster_namespace_roles_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_namespace_roles_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_namespace_roles_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_namespace_roles_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 GetClusterNamespaceRoles(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_cluster_namespace_roles( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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_namespace_roles( - 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_namespace_roles( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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_namespace_roles( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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_namespace_roles_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_namespace_roles_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_role_users/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users/get.pyi deleted file mode 100644 index d9a45df0..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users/get.pyi +++ /dev/null @@ -1,305 +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_cluster_namespace_role_user_dto import OpenClusterNamespaceRoleUserDTO - -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'clusterName': typing.Union[ClusterNameSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_app_id = api_client.PathParameter( - name="appId", - style=api_client.ParameterStyle.SIMPLE, - schema=AppIdSchema, - required=True, -) -request_path_env = api_client.PathParameter( - name="env", - style=api_client.ParameterStyle.SIMPLE, - schema=EnvSchema, - required=True, -) -request_path_cluster_name = api_client.PathParameter( - name="clusterName", - style=api_client.ParameterStyle.SIMPLE, - schema=ClusterNameSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = OpenClusterNamespaceRoleUserDTO - - -@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_cluster_namespace_roles_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_namespace_roles_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_namespace_roles_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_namespace_roles_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 GetClusterNamespaceRoles(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_cluster_namespace_roles( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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_namespace_roles( - 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_namespace_roles( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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_namespace_roles( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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_namespace_roles_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_namespace_roles_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_roles_role_type/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/__init__.py deleted file mode 100644 index 1bebcfd1..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/__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_apps_app_id_envs_env_clusters_cluster_name_roles_role_type import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_CLUSTERS_CLUSTER_NAME_ROLES_ROLE_TYPE diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/delete.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/delete.py deleted file mode 100644 index ad5e9ecd..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/delete.py +++ /dev/null @@ -1,353 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -RoleTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'clusterName': typing.Union[ClusterNameSchema, str, ], - 'roleType': typing.Union[RoleTypeSchema, 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_role_type = api_client.PathParameter( - name="roleType", - style=api_client.ParameterStyle.SIMPLE, - schema=RoleTypeSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _remove_cluster_namespace_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _remove_cluster_namespace_role_from_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _remove_cluster_namespace_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _remove_cluster_namespace_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 移除集群Namespace角色 (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - 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_role_type, - ): - 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, - request_query_user_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 RemoveClusterNamespaceRoleFromUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def remove_cluster_namespace_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def remove_cluster_namespace_role_from_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def remove_cluster_namespace_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def remove_cluster_namespace_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_cluster_namespace_role_from_user_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_cluster_namespace_role_from_user_oapg( - query_params=query_params, - path_params=path_params, - 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_roles_role_type/delete.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/delete.pyi deleted file mode 100644 index 42ffe4a8..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/delete.pyi +++ /dev/null @@ -1,345 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -RoleTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'clusterName': typing.Union[ClusterNameSchema, str, ], - 'roleType': typing.Union[RoleTypeSchema, 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_role_type = api_client.PathParameter( - name="roleType", - style=api_client.ParameterStyle.SIMPLE, - schema=RoleTypeSchema, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _remove_cluster_namespace_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _remove_cluster_namespace_role_from_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _remove_cluster_namespace_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _remove_cluster_namespace_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 移除集群Namespace角色 (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - 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_role_type, - ): - 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, - request_query_user_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 RemoveClusterNamespaceRoleFromUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def remove_cluster_namespace_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def remove_cluster_namespace_role_from_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def remove_cluster_namespace_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def remove_cluster_namespace_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_cluster_namespace_role_from_user_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_cluster_namespace_role_from_user_oapg( - query_params=query_params, - path_params=path_params, - 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_roles_role_type/post.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/post.py deleted file mode 100644 index b8cfeaa0..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/post.py +++ /dev/null @@ -1,353 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -RoleTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'clusterName': typing.Union[ClusterNameSchema, str, ], - 'roleType': typing.Union[RoleTypeSchema, 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_role_type = api_client.PathParameter( - name="roleType", - style=api_client.ParameterStyle.SIMPLE, - schema=RoleTypeSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _assign_cluster_namespace_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _assign_cluster_namespace_role_to_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _assign_cluster_namespace_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _assign_cluster_namespace_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 分配集群Namespace角色 (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - 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_role_type, - ): - 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, - request_query_user_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - 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 AssignClusterNamespaceRoleToUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def assign_cluster_namespace_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def assign_cluster_namespace_role_to_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def assign_cluster_namespace_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def assign_cluster_namespace_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._assign_cluster_namespace_role_to_user_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._assign_cluster_namespace_role_to_user_oapg( - query_params=query_params, - path_params=path_params, - 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_roles_role_type/post.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/post.pyi deleted file mode 100644 index 95966211..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/post.pyi +++ /dev/null @@ -1,345 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -RoleTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'clusterName': typing.Union[ClusterNameSchema, str, ], - 'roleType': typing.Union[RoleTypeSchema, 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_role_type = api_client.PathParameter( - name="roleType", - style=api_client.ParameterStyle.SIMPLE, - schema=RoleTypeSchema, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _assign_cluster_namespace_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _assign_cluster_namespace_role_to_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _assign_cluster_namespace_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _assign_cluster_namespace_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 分配集群Namespace角色 (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - 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_role_type, - ): - 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, - request_query_user_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - 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 AssignClusterNamespaceRoleToUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def assign_cluster_namespace_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def assign_cluster_namespace_role_to_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def assign_cluster_namespace_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def assign_cluster_namespace_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._assign_cluster_namespace_role_to_user_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._assign_cluster_namespace_role_to_user_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type/__init__.py deleted file mode 100644 index 04a24b51..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type/__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_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_NAMESPACES_NAMESPACE_NAME_PERMISSIONS_PERMISSION_TYPE diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type/get.py deleted file mode 100644 index a4476853..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type/get.py +++ /dev/null @@ -1,377 +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_permission_condition_dto import OpenPermissionConditionDTO - -from . import path - -# Query params -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -PermissionTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - 'permissionType': typing.Union[PermissionTypeSchema, 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_namespace_name = api_client.PathParameter( - name="namespaceName", - style=api_client.ParameterStyle.SIMPLE, - schema=NamespaceNameSchema, - required=True, -) -request_path_permission_type = api_client.PathParameter( - name="permissionType", - style=api_client.ParameterStyle.SIMPLE, - schema=PermissionTypeSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationJson = OpenPermissionConditionDTO - - -@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 _has_env_namespace_permission_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 _has_env_namespace_permission_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 _has_env_namespace_permission_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 _has_env_namespace_permission_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_namespace_name, - request_path_permission_type, - ): - 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_user_id, - ): - 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 HasEnvNamespacePermission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def has_env_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def has_env_namespace_permission( - 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 has_env_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def has_env_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._has_env_namespace_permission_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._has_env_namespace_permission_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_namespaces_namespace_name_permissions_permission_type/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type/get.pyi deleted file mode 100644 index 618ca248..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type/get.pyi +++ /dev/null @@ -1,369 +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_permission_condition_dto import OpenPermissionConditionDTO - -# Query params -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -PermissionTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - 'permissionType': typing.Union[PermissionTypeSchema, 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_namespace_name = api_client.PathParameter( - name="namespaceName", - style=api_client.ParameterStyle.SIMPLE, - schema=NamespaceNameSchema, - required=True, -) -request_path_permission_type = api_client.PathParameter( - name="permissionType", - style=api_client.ParameterStyle.SIMPLE, - schema=PermissionTypeSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = OpenPermissionConditionDTO - - -@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 _has_env_namespace_permission_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 _has_env_namespace_permission_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 _has_env_namespace_permission_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 _has_env_namespace_permission_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_namespace_name, - request_path_permission_type, - ): - 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_user_id, - ): - 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 HasEnvNamespacePermission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def has_env_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def has_env_namespace_permission( - 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 has_env_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def has_env_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._has_env_namespace_permission_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._has_env_namespace_permission_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_namespaces_namespace_name_role_users/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users/__init__.py deleted file mode 100644 index d5fa1dd5..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users/__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_apps_app_id_envs_env_namespaces_namespace_name_role_users import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_NAMESPACES_NAMESPACE_NAME_ROLEUSERS diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users/get.py deleted file mode 100644 index b6799d15..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users/get.py +++ /dev/null @@ -1,313 +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_env_namespace_role_user_dto import OpenEnvNamespaceRoleUserDTO - -from . import path - -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, 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_namespace_name = api_client.PathParameter( - name="namespaceName", - style=api_client.ParameterStyle.SIMPLE, - schema=NamespaceNameSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationJson = OpenEnvNamespaceRoleUserDTO - - -@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_env_role_users_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_env_role_users_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_env_role_users_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_env_role_users_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_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 GetNamespaceEnvRoleUsers(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_namespace_env_role_users( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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_env_role_users( - 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_env_role_users( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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_env_role_users( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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_env_role_users_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_env_role_users_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_namespaces_namespace_name_role_users/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users/get.pyi deleted file mode 100644 index 50097764..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users/get.pyi +++ /dev/null @@ -1,305 +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_env_namespace_role_user_dto import OpenEnvNamespaceRoleUserDTO - -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, 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_namespace_name = api_client.PathParameter( - name="namespaceName", - style=api_client.ParameterStyle.SIMPLE, - schema=NamespaceNameSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = OpenEnvNamespaceRoleUserDTO - - -@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_env_role_users_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_env_role_users_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_env_role_users_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_env_role_users_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_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 GetNamespaceEnvRoleUsers(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_namespace_env_role_users( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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_env_role_users( - 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_env_role_users( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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_env_role_users( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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_env_role_users_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_env_role_users_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_namespaces_namespace_name_roles_role_type/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/__init__.py deleted file mode 100644 index 2eb05364..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/__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_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ENVS_ENV_NAMESPACES_NAMESPACE_NAME_ROLES_ROLE_TYPE diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/delete.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/delete.py deleted file mode 100644 index 1dcf0735..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/delete.py +++ /dev/null @@ -1,353 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -RoleTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - 'roleType': typing.Union[RoleTypeSchema, 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_namespace_name = api_client.PathParameter( - name="namespaceName", - style=api_client.ParameterStyle.SIMPLE, - schema=NamespaceNameSchema, - required=True, -) -request_path_role_type = api_client.PathParameter( - name="roleType", - style=api_client.ParameterStyle.SIMPLE, - schema=RoleTypeSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _remove_namespace_env_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _remove_namespace_env_role_from_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _remove_namespace_env_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _remove_namespace_env_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 移除环境Namespace角色 (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - 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_namespace_name, - request_path_role_type, - ): - 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, - request_query_user_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 RemoveNamespaceEnvRoleFromUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def remove_namespace_env_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def remove_namespace_env_role_from_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def remove_namespace_env_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def remove_namespace_env_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_namespace_env_role_from_user_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_namespace_env_role_from_user_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/delete.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/delete.pyi deleted file mode 100644 index 1c453d97..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/delete.pyi +++ /dev/null @@ -1,345 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -RoleTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - 'roleType': typing.Union[RoleTypeSchema, 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_namespace_name = api_client.PathParameter( - name="namespaceName", - style=api_client.ParameterStyle.SIMPLE, - schema=NamespaceNameSchema, - required=True, -) -request_path_role_type = api_client.PathParameter( - name="roleType", - style=api_client.ParameterStyle.SIMPLE, - schema=RoleTypeSchema, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _remove_namespace_env_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _remove_namespace_env_role_from_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _remove_namespace_env_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _remove_namespace_env_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 移除环境Namespace角色 (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - 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_namespace_name, - request_path_role_type, - ): - 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, - request_query_user_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 RemoveNamespaceEnvRoleFromUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def remove_namespace_env_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def remove_namespace_env_role_from_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def remove_namespace_env_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def remove_namespace_env_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_namespace_env_role_from_user_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_namespace_env_role_from_user_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/post.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/post.py deleted file mode 100644 index 3c0d682d..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/post.py +++ /dev/null @@ -1,353 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -RoleTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - 'roleType': typing.Union[RoleTypeSchema, 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_namespace_name = api_client.PathParameter( - name="namespaceName", - style=api_client.ParameterStyle.SIMPLE, - schema=NamespaceNameSchema, - required=True, -) -request_path_role_type = api_client.PathParameter( - name="roleType", - style=api_client.ParameterStyle.SIMPLE, - schema=RoleTypeSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _assign_namespace_env_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _assign_namespace_env_role_to_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _assign_namespace_env_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _assign_namespace_env_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 分配环境Namespace角色 (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - 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_namespace_name, - request_path_role_type, - ): - 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, - request_query_user_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - 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 AssignNamespaceEnvRoleToUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def assign_namespace_env_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def assign_namespace_env_role_to_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def assign_namespace_env_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def assign_namespace_env_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._assign_namespace_env_role_to_user_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._assign_namespace_env_role_to_user_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/post.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/post.pyi deleted file mode 100644 index ce088a1b..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/post.pyi +++ /dev/null @@ -1,345 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -RoleTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'env': typing.Union[EnvSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - 'roleType': typing.Union[RoleTypeSchema, 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_namespace_name = api_client.PathParameter( - name="namespaceName", - style=api_client.ParameterStyle.SIMPLE, - schema=NamespaceNameSchema, - required=True, -) -request_path_role_type = api_client.PathParameter( - name="roleType", - style=api_client.ParameterStyle.SIMPLE, - schema=RoleTypeSchema, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _assign_namespace_env_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _assign_namespace_env_role_to_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _assign_namespace_env_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _assign_namespace_env_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 分配环境Namespace角色 (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - 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_namespace_name, - request_path_role_type, - ): - 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, - request_query_user_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - 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 AssignNamespaceEnvRoleToUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def assign_namespace_env_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def assign_namespace_env_role_to_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def assign_namespace_env_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def assign_namespace_env_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._assign_namespace_env_role_to_user_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._assign_namespace_env_role_to_user_oapg( - query_params=query_params, - path_params=path_params, - 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 deleted file mode 100644 index 904314c4..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/__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_apps_app_id_miss_envs import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_MISSENVS diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/get.py deleted file mode 100644 index 452b9da2..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/get.py +++ /dev/null @@ -1,341 +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_miss_env_dto import OpenMissEnvDTO -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['OpenMissEnvDTO']: - return OpenMissEnvDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenMissEnvDTO'], typing.List['OpenMissEnvDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenMissEnvDTO': - return super().__getitem__(i) - - -@dataclass -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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index e06a2383..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_miss_envs/get.pyi +++ /dev/null @@ -1,332 +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_miss_env_dto import OpenMissEnvDTO -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['OpenMissEnvDTO']: - return OpenMissEnvDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenMissEnvDTO'], typing.List['OpenMissEnvDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenMissEnvDTO': - return super().__getitem__(i) - - -@dataclass -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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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_namespace_name_permission_init/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permission_init/__init__.py deleted file mode 100644 index 71361dd8..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permission_init/__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_apps_app_id_namespaces_namespace_name_permission_init import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_NAMESPACES_NAMESPACE_NAME_PERMISSIONINIT diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permission_init/post.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permission_init/post.py deleted file mode 100644 index 762c76c7..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permission_init/post.py +++ /dev/null @@ -1,325 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from apollo_openapi import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _init_app_permission_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _init_app_permission_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _init_app_permission_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _init_app_permission_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - 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_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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - 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 InitAppPermission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def init_app_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def init_app_permission( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def init_app_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def init_app_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._init_app_permission_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._init_app_permission_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permission_init/post.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permission_init/post.pyi deleted file mode 100644 index 4f25cc6b..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permission_init/post.pyi +++ /dev/null @@ -1,317 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from apollo_openapi import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _init_app_permission_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _init_app_permission_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _init_app_permission_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _init_app_permission_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - 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_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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - 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 InitAppPermission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def init_app_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def init_app_permission( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def init_app_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def init_app_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._init_app_permission_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._init_app_permission_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type/__init__.py deleted file mode 100644 index 7737627b..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type/__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_apps_app_id_namespaces_namespace_name_permissions_permission_type import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_NAMESPACES_NAMESPACE_NAME_PERMISSIONS_PERMISSION_TYPE diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type/get.py deleted file mode 100644 index 2c657cfa..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type/get.py +++ /dev/null @@ -1,368 +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_permission_condition_dto import OpenPermissionConditionDTO - -from . import path - -# Query params -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -PermissionTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - 'permissionType': typing.Union[PermissionTypeSchema, 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, -) -request_path_permission_type = api_client.PathParameter( - name="permissionType", - style=api_client.ParameterStyle.SIMPLE, - schema=PermissionTypeSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationJson = OpenPermissionConditionDTO - - -@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 _has_namespace_permission_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 _has_namespace_permission_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 _has_namespace_permission_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 _has_namespace_permission_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_namespace_name, - request_path_permission_type, - ): - 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_user_id, - ): - 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 HasNamespacePermission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def has_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def has_namespace_permission( - 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 has_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def has_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._has_namespace_permission_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._has_namespace_permission_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_namespaces_namespace_name_permissions_permission_type/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type/get.pyi deleted file mode 100644 index 213c0df8..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type/get.pyi +++ /dev/null @@ -1,360 +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_permission_condition_dto import OpenPermissionConditionDTO - -# Query params -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -PermissionTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - 'permissionType': typing.Union[PermissionTypeSchema, 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, -) -request_path_permission_type = api_client.PathParameter( - name="permissionType", - style=api_client.ParameterStyle.SIMPLE, - schema=PermissionTypeSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = OpenPermissionConditionDTO - - -@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 _has_namespace_permission_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 _has_namespace_permission_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 _has_namespace_permission_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 _has_namespace_permission_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_namespace_name, - request_path_permission_type, - ): - 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_user_id, - ): - 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 HasNamespacePermission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def has_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def has_namespace_permission( - 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 has_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def has_namespace_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._has_namespace_permission_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._has_namespace_permission_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_namespaces_namespace_name_role_users/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_role_users/__init__.py deleted file mode 100644 index d386af8e..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_role_users/__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_apps_app_id_namespaces_namespace_name_role_users import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_NAMESPACES_NAMESPACE_NAME_ROLEUSERS diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_role_users/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_role_users/get.py deleted file mode 100644 index 127d34a3..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_role_users/get.py +++ /dev/null @@ -1,304 +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_namespace_role_user_dto import OpenNamespaceRoleUserDTO - -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 = OpenNamespaceRoleUserDTO - - -@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_roles_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_roles_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_roles_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_roles_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_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 GetNamespaceRoles(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_namespace_roles( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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_roles( - 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_roles( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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_roles( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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_roles_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_roles_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_namespace_name_role_users/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_role_users/get.pyi deleted file mode 100644 index 4ceca9ac..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_role_users/get.pyi +++ /dev/null @@ -1,296 +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_namespace_role_user_dto import OpenNamespaceRoleUserDTO - -# 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 = OpenNamespaceRoleUserDTO - - -@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_roles_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_roles_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_roles_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_roles_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_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 GetNamespaceRoles(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_namespace_roles( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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_roles( - 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_roles( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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_roles( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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_roles_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_roles_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_namespace_name_roles_role_type/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/__init__.py deleted file mode 100644 index 99fe1db3..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/__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_apps_app_id_namespaces_namespace_name_roles_role_type import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_NAMESPACES_NAMESPACE_NAME_ROLES_ROLE_TYPE diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/delete.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/delete.py deleted file mode 100644 index 90f40c57..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/delete.py +++ /dev/null @@ -1,344 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -RoleTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - 'roleType': typing.Union[RoleTypeSchema, 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, -) -request_path_role_type = api_client.PathParameter( - name="roleType", - style=api_client.ParameterStyle.SIMPLE, - schema=RoleTypeSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _remove_namespace_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _remove_namespace_role_from_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _remove_namespace_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _remove_namespace_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 移除Namespace角色 (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - 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, - request_path_role_type, - ): - 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, - request_query_user_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 RemoveNamespaceRoleFromUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def remove_namespace_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def remove_namespace_role_from_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def remove_namespace_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def remove_namespace_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_namespace_role_from_user_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_namespace_role_from_user_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/delete.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/delete.pyi deleted file mode 100644 index 2b55cf2a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/delete.pyi +++ /dev/null @@ -1,336 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -RoleTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - 'roleType': typing.Union[RoleTypeSchema, 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, -) -request_path_role_type = api_client.PathParameter( - name="roleType", - style=api_client.ParameterStyle.SIMPLE, - schema=RoleTypeSchema, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _remove_namespace_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _remove_namespace_role_from_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _remove_namespace_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _remove_namespace_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 移除Namespace角色 (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - 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, - request_path_role_type, - ): - 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, - request_query_user_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 RemoveNamespaceRoleFromUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def remove_namespace_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def remove_namespace_role_from_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def remove_namespace_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def remove_namespace_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_namespace_role_from_user_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_namespace_role_from_user_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/post.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/post.py deleted file mode 100644 index 8981ba91..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/post.py +++ /dev/null @@ -1,344 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -RoleTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - 'roleType': typing.Union[RoleTypeSchema, 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, -) -request_path_role_type = api_client.PathParameter( - name="roleType", - style=api_client.ParameterStyle.SIMPLE, - schema=RoleTypeSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _assign_namespace_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _assign_namespace_role_to_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _assign_namespace_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _assign_namespace_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 分配Namespace角色 (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - 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, - request_path_role_type, - ): - 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, - request_query_user_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - 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 AssignNamespaceRoleToUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def assign_namespace_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def assign_namespace_role_to_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def assign_namespace_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def assign_namespace_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._assign_namespace_role_to_user_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._assign_namespace_role_to_user_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/post.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/post.pyi deleted file mode 100644 index 1c562e5f..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/post.pyi +++ /dev/null @@ -1,336 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -RoleTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - 'roleType': typing.Union[RoleTypeSchema, 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, -) -request_path_role_type = api_client.PathParameter( - name="roleType", - style=api_client.ParameterStyle.SIMPLE, - schema=RoleTypeSchema, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _assign_namespace_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _assign_namespace_role_to_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _assign_namespace_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _assign_namespace_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 分配Namespace角色 (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - 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, - request_path_role_type, - ): - 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, - request_query_user_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - 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 AssignNamespaceRoleToUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def assign_namespace_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def assign_namespace_role_to_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def assign_namespace_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def assign_namespace_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._assign_namespace_role_to_user_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._assign_namespace_role_to_user_oapg( - query_params=query_params, - path_params=path_params, - 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 deleted file mode 100644 index 2b340346..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_releases_status/__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_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 deleted file mode 100644 index c3f559a2..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_releases_status/get.py +++ /dev/null @@ -1,295 +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.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 deleted file mode 100644 index ce916f2b..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_namespaces_releases_status/get.pyi +++ /dev/null @@ -1,287 +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.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_permissions_permission_type/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_permissions_permission_type/__init__.py deleted file mode 100644 index a07fd7a2..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_permissions_permission_type/__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_apps_app_id_permissions_permission_type import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_PERMISSIONS_PERMISSION_TYPE diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_permissions_permission_type/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_permissions_permission_type/get.py deleted file mode 100644 index 6f27f42b..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_permissions_permission_type/get.py +++ /dev/null @@ -1,359 +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_permission_condition_dto import OpenPermissionConditionDTO - -from . import path - -# Query params -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -PermissionTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'permissionType': typing.Union[PermissionTypeSchema, 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_permission_type = api_client.PathParameter( - name="permissionType", - style=api_client.ParameterStyle.SIMPLE, - schema=PermissionTypeSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationJson = OpenPermissionConditionDTO - - -@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 _has_app_permission_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 _has_app_permission_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 _has_app_permission_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 _has_app_permission_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_permission_type, - ): - 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_user_id, - ): - 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 HasAppPermission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def has_app_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def has_app_permission( - 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 has_app_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def has_app_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._has_app_permission_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._has_app_permission_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_permissions_permission_type/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_permissions_permission_type/get.pyi deleted file mode 100644 index f2fce347..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_permissions_permission_type/get.pyi +++ /dev/null @@ -1,351 +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_permission_condition_dto import OpenPermissionConditionDTO - -# Query params -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -PermissionTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'permissionType': typing.Union[PermissionTypeSchema, 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_permission_type = api_client.PathParameter( - name="permissionType", - style=api_client.ParameterStyle.SIMPLE, - schema=PermissionTypeSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = OpenPermissionConditionDTO - - -@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 _has_app_permission_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 _has_app_permission_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 _has_app_permission_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 _has_app_permission_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_permission_type, - ): - 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_user_id, - ): - 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 HasAppPermission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def has_app_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def has_app_permission( - 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 has_app_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def has_app_permission( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._has_app_permission_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._has_app_permission_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_role_users/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_role_users/__init__.py deleted file mode 100644 index 87c5b741..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_role_users/__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_apps_app_id_role_users import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ROLEUSERS diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_role_users/get.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_role_users/get.py deleted file mode 100644 index cf6f4a63..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_role_users/get.py +++ /dev/null @@ -1,295 +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_app_role_user_dto import OpenAppRoleUserDTO - -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 = OpenAppRoleUserDTO - - -@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_roles_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_roles_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_roles_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_roles_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 GetAppRoles(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_app_roles( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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_roles( - 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_roles( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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_roles( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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_roles_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_roles_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_role_users/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_role_users/get.pyi deleted file mode 100644 index 24304d19..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_role_users/get.pyi +++ /dev/null @@ -1,287 +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_app_role_user_dto import OpenAppRoleUserDTO - -# 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 = OpenAppRoleUserDTO - - -@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_roles_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_roles_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_roles_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_roles_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 GetAppRoles(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_app_roles( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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_roles( - 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_roles( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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_roles( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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_roles_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_roles_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_roles_master/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_master/__init__.py deleted file mode 100644 index 97c38500..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_master/__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_apps_app_id_roles_master import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ROLES_MASTER diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_master/delete.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_master/delete.py deleted file mode 100644 index 3737c7ff..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_master/delete.py +++ /dev/null @@ -1,326 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - 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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _remove_manage_app_master_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _remove_manage_app_master_role_from_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _remove_manage_app_master_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _remove_manage_app_master_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 移除AppMaster (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, - request_query_user_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 RemoveManageAppMasterRoleFromUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def remove_manage_app_master_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def remove_manage_app_master_role_from_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def remove_manage_app_master_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def remove_manage_app_master_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_manage_app_master_role_from_user_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_manage_app_master_role_from_user_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_master/delete.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_master/delete.pyi deleted file mode 100644 index ae103b0b..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_master/delete.pyi +++ /dev/null @@ -1,318 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - 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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _remove_manage_app_master_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _remove_manage_app_master_role_from_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _remove_manage_app_master_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _remove_manage_app_master_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 移除AppMaster (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, - request_query_user_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 RemoveManageAppMasterRoleFromUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def remove_manage_app_master_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def remove_manage_app_master_role_from_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def remove_manage_app_master_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def remove_manage_app_master_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_manage_app_master_role_from_user_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_manage_app_master_role_from_user_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_master/post.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_master/post.py deleted file mode 100644 index cacdbdc0..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_master/post.py +++ /dev/null @@ -1,326 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - 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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _add_manage_app_master_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _add_manage_app_master_role_to_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _add_manage_app_master_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _add_manage_app_master_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 分配AppMaster (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, - request_query_user_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - 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 AddManageAppMasterRoleToUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def add_manage_app_master_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def add_manage_app_master_role_to_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def add_manage_app_master_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def add_manage_app_master_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_manage_app_master_role_to_user_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_manage_app_master_role_to_user_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_master/post.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_master/post.pyi deleted file mode 100644 index cd7ccb31..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_master/post.pyi +++ /dev/null @@ -1,318 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - 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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _add_manage_app_master_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _add_manage_app_master_role_to_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _add_manage_app_master_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _add_manage_app_master_role_to_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 分配AppMaster (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, - request_query_user_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - 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 AddManageAppMasterRoleToUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def add_manage_app_master_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def add_manage_app_master_role_to_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def add_manage_app_master_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def add_manage_app_master_role_to_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_manage_app_master_role_to_user_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_manage_app_master_role_to_user_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_role_type/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_role_type/__init__.py deleted file mode 100644 index 6104a199..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_role_type/__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_apps_app_id_roles_role_type import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_APP_ID_ROLES_ROLE_TYPE diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_role_type/delete.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_role_type/delete.py deleted file mode 100644 index fc1bc4ba..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_role_type/delete.py +++ /dev/null @@ -1,335 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -RoleTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'roleType': typing.Union[RoleTypeSchema, 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_role_type = api_client.PathParameter( - name="roleType", - style=api_client.ParameterStyle.SIMPLE, - schema=RoleTypeSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _remove_app_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _remove_app_role_from_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _remove_app_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _remove_app_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - 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_role_type, - ): - 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, - request_query_user_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 RemoveAppRoleFromUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def remove_app_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def remove_app_role_from_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def remove_app_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def remove_app_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_app_role_from_user_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_app_role_from_user_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_role_type/delete.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_role_type/delete.pyi deleted file mode 100644 index 92405b20..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_role_type/delete.pyi +++ /dev/null @@ -1,327 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -RoleTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'roleType': typing.Union[RoleTypeSchema, 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_role_type = api_client.PathParameter( - name="roleType", - style=api_client.ParameterStyle.SIMPLE, - schema=RoleTypeSchema, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _remove_app_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _remove_app_role_from_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _remove_app_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _remove_app_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - 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_role_type, - ): - 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, - request_query_user_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 RemoveAppRoleFromUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def remove_app_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def remove_app_role_from_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def remove_app_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def remove_app_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_app_role_from_user_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._remove_app_role_from_user_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_role_type/post.py b/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_role_type/post.py deleted file mode 100644 index a6547f16..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_role_type/post.py +++ /dev/null @@ -1,433 +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 . import path - -# Query params -OperatorSchema = schemas.StrSchema -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -RoleTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'roleType': typing.Union[RoleTypeSchema, 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_role_type = api_client.PathParameter( - name="roleType", - style=api_client.ParameterStyle.SIMPLE, - schema=RoleTypeSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = schemas.StrSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _assign_app_role_to_user_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _assign_app_role_to_user_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _assign_app_role_to_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _assign_app_role_to_user_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _assign_app_role_to_user_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - 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_role_type, - ): - 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, - request_query_user_id, - ): - 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 - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.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 AssignAppRoleToUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def assign_app_role_to_user( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def assign_app_role_to_user( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def assign_app_role_to_user( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def assign_app_role_to_user( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def assign_app_role_to_user( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._assign_app_role_to_user_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._assign_app_role_to_user_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_role_type/post.pyi b/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_role_type/post.pyi deleted file mode 100644 index 0e6e44e1..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_app_id_roles_role_type/post.pyi +++ /dev/null @@ -1,425 +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 - -# Query params -OperatorSchema = schemas.StrSchema -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -RoleTypeSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'roleType': typing.Union[RoleTypeSchema, 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_role_type = api_client.PathParameter( - name="roleType", - style=api_client.ParameterStyle.SIMPLE, - schema=RoleTypeSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = schemas.StrSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _assign_app_role_to_user_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _assign_app_role_to_user_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _assign_app_role_to_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _assign_app_role_to_user_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _assign_app_role_to_user_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - 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_role_type, - ): - 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, - request_query_user_id, - ): - 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 - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.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 AssignAppRoleToUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def assign_app_role_to_user( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def assign_app_role_to_user( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def assign_app_role_to_user( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def assign_app_role_to_user( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def assign_app_role_to_user( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._assign_app_role_to_user_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, str, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._assign_app_role_to_user_oapg( - body=body, - query_params=query_params, - path_params=path_params, - content_type=content_type, - 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 deleted file mode 100644 index 5dec5044..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_authorized/__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_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 deleted file mode 100644 index 94f58a8e..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_authorized/get.py +++ /dev/null @@ -1,287 +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_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), - }, -) -SchemaFor401ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index a6822d6d..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_authorized/get.pyi +++ /dev/null @@ -1,278 +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_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), - }, -) -SchemaFor401ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index 3f1e90ca..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_by_self/__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_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 deleted file mode 100644 index 656cfd90..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_by_self/get.py +++ /dev/null @@ -1,368 +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_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), - }, -) -SchemaFor401ResponseBodyApplicationJson = ExceptionResponse - - -@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/User的应用列表(分页)(new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - 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 deleted file mode 100644 index b2b38ccc..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_by_self/get.pyi +++ /dev/null @@ -1,353 +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_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), - }, -) -SchemaFor401ResponseBodyApplicationJson = ExceptionResponse - - -@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/User的应用列表(分页)(new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - 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 deleted file mode 100644 index 59a0afa2..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_envs_env/__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_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 deleted file mode 100644 index 581c0893..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_envs_env/post.py +++ /dev/null @@ -1,483 +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_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', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index 394d528a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_envs_env/post.pyi +++ /dev/null @@ -1,473 +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_app_dto import OpenAppDTO -from apollo_openapi.model.exception_response import ExceptionResponse - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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_apps_search_by_appid_or_name/__init__.py b/python/apollo_openapi/paths/openapi_v1_apps_search_by_appid_or_name/__init__.py deleted file mode 100644 index 44896243..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_search_by_appid_or_name/__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_apps_search_by_appid_or_name import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_APPS_SEARCH_BYAPPIDORNAME diff --git a/python/apollo_openapi/paths/openapi_v1_apps_search_by_appid_or_name/get.py b/python/apollo_openapi/paths/openapi_v1_apps_search_by_appid_or_name/get.py deleted file mode 100644 index f2349d7a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_search_by_appid_or_name/get.py +++ /dev/null @@ -1,311 +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 . import path - -# Query params -QuerySchema = schemas.StrSchema -PageSchema = schemas.IntSchema -SizeSchema = schemas.IntSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'query': typing.Union[QuerySchema, str, ], - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_query = api_client.QueryParameter( - name="query", - style=api_client.ParameterStyle.FORM, - schema=QuerySchema, - explode=True, -) -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - explode=True, -) -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _search_apps_by_app_id_or_name_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 _search_apps_by_app_id_or_name_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 _search_apps_by_app_id_or_name_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 _search_apps_by_app_id_or_name_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, - ): - """ - 按应用ID或名称搜索应用(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_query, - 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 SearchAppsByAppIdOrName(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def search_apps_by_app_id_or_name( - 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 search_apps_by_app_id_or_name( - 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 search_apps_by_app_id_or_name( - 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 search_apps_by_app_id_or_name( - 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._search_apps_by_app_id_or_name_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._search_apps_by_app_id_or_name_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_search_by_appid_or_name/get.pyi b/python/apollo_openapi/paths/openapi_v1_apps_search_by_appid_or_name/get.pyi deleted file mode 100644 index e58d4e8a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_apps_search_by_appid_or_name/get.pyi +++ /dev/null @@ -1,303 +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 - -# Query params -QuerySchema = schemas.StrSchema -PageSchema = schemas.IntSchema -SizeSchema = schemas.IntSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'query': typing.Union[QuerySchema, str, ], - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_query = api_client.QueryParameter( - name="query", - style=api_client.ParameterStyle.FORM, - schema=QuerySchema, - explode=True, -) -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - explode=True, -) -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _search_apps_by_app_id_or_name_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 _search_apps_by_app_id_or_name_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 _search_apps_by_app_id_or_name_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 _search_apps_by_app_id_or_name_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, - ): - """ - 按应用ID或名称搜索应用(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_query, - 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 SearchAppsByAppIdOrName(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def search_apps_by_app_id_or_name( - 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 search_apps_by_app_id_or_name( - 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 search_apps_by_app_id_or_name( - 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 search_apps_by_app_id_or_name( - 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._search_apps_by_app_id_or_name_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._search_apps_by_app_id_or_name_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_configs_export/__init__.py b/python/apollo_openapi/paths/openapi_v1_configs_export/__init__.py deleted file mode 100644 index 797f9aba..00000000 --- a/python/apollo_openapi/paths/openapi_v1_configs_export/__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_configs_export import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_CONFIGS_EXPORT diff --git a/python/apollo_openapi/paths/openapi_v1_configs_export/get.py b/python/apollo_openapi/paths/openapi_v1_configs_export/get.py deleted file mode 100644 index 45b77799..00000000 --- a/python/apollo_openapi/paths/openapi_v1_configs_export/get.py +++ /dev/null @@ -1,294 +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 . import path - -# Query params -EnvsSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'envs': typing.Union[EnvsSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_envs = api_client.QueryParameter( - name="envs", - style=api_client.ParameterStyle.FORM, - schema=EnvsSchema, - required=True, - explode=True, -) -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationOctetStream = schemas.BinarySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationOctetStream, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/octet-stream': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationOctetStream), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/octet-stream', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _export_all_configs_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 _export_all_configs_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 _export_all_configs_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 _export_all_configs_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, - ): - """ - 导出所有配置(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_envs, - ): - 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 ExportAllConfigs(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def export_all_configs( - 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 export_all_configs( - 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 export_all_configs( - 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 export_all_configs( - 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._export_all_configs_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._export_all_configs_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_configs_export/get.pyi b/python/apollo_openapi/paths/openapi_v1_configs_export/get.pyi deleted file mode 100644 index 86c92ae5..00000000 --- a/python/apollo_openapi/paths/openapi_v1_configs_export/get.pyi +++ /dev/null @@ -1,286 +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 - -# Query params -EnvsSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'envs': typing.Union[EnvsSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_envs = api_client.QueryParameter( - name="envs", - style=api_client.ParameterStyle.FORM, - schema=EnvsSchema, - required=True, - explode=True, -) -SchemaFor200ResponseBodyApplicationOctetStream = schemas.BinarySchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationOctetStream, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/octet-stream': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationOctetStream), - }, -) -_all_accept_content_types = ( - 'application/octet-stream', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _export_all_configs_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 _export_all_configs_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 _export_all_configs_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 _export_all_configs_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, - ): - """ - 导出所有配置(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_envs, - ): - 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 ExportAllConfigs(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def export_all_configs( - 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 export_all_configs( - 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 export_all_configs( - 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 export_all_configs( - 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._export_all_configs_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._export_all_configs_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_configs_import/__init__.py b/python/apollo_openapi/paths/openapi_v1_configs_import/__init__.py deleted file mode 100644 index eca0bacb..00000000 --- a/python/apollo_openapi/paths/openapi_v1_configs_import/__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_configs_import import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_CONFIGS_IMPORT diff --git a/python/apollo_openapi/paths/openapi_v1_configs_import/post.py b/python/apollo_openapi/paths/openapi_v1_configs_import/post.py deleted file mode 100644 index e736aad7..00000000 --- a/python/apollo_openapi/paths/openapi_v1_configs_import/post.py +++ /dev/null @@ -1,416 +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 . import path - -# Query params -EnvsSchema = schemas.StrSchema -ConflictActionSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'envs': typing.Union[EnvsSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'conflictAction': typing.Union[ConflictActionSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_envs = api_client.QueryParameter( - name="envs", - style=api_client.ParameterStyle.FORM, - schema=EnvsSchema, - required=True, - explode=True, -) -request_query_conflict_action = api_client.QueryParameter( - name="conflictAction", - style=api_client.ParameterStyle.FORM, - schema=ConflictActionSchema, - explode=True, -) -# body param - - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - file = schemas.BinarySchema - __annotations__ = { - "file": file, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["file"]) -> MetaOapg.properties.file: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["file", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["file"]) -> typing.Union[MetaOapg.properties.file, 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["file", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - file: typing.Union[MetaOapg.properties.file, bytes, io.FileIO, io.BufferedReader, 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], - ) -> 'SchemaForRequestBodyMultipartFormData': - return super().__new__( - cls, - *_args, - file=file, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _import_all_configs_oapg( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _import_all_configs_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _import_all_configs_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _import_all_configs_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _import_all_configs_oapg( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - 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) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_envs, - request_query_conflict_action, - ): - 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 - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.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 ImportAllConfigs(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def import_all_configs( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def import_all_configs( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def import_all_configs( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def import_all_configs( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def import_all_configs( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._import_all_configs_oapg( - body=body, - query_params=query_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._import_all_configs_oapg( - body=body, - query_params=query_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_configs_import/post.pyi b/python/apollo_openapi/paths/openapi_v1_configs_import/post.pyi deleted file mode 100644 index c59f848b..00000000 --- a/python/apollo_openapi/paths/openapi_v1_configs_import/post.pyi +++ /dev/null @@ -1,408 +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 - -# Query params -EnvsSchema = schemas.StrSchema -ConflictActionSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'envs': typing.Union[EnvsSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'conflictAction': typing.Union[ConflictActionSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_envs = api_client.QueryParameter( - name="envs", - style=api_client.ParameterStyle.FORM, - schema=EnvsSchema, - required=True, - explode=True, -) -request_query_conflict_action = api_client.QueryParameter( - name="conflictAction", - style=api_client.ParameterStyle.FORM, - schema=ConflictActionSchema, - explode=True, -) -# body param - - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - file = schemas.BinarySchema - __annotations__ = { - "file": file, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["file"]) -> MetaOapg.properties.file: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["file", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["file"]) -> typing.Union[MetaOapg.properties.file, 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["file", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - file: typing.Union[MetaOapg.properties.file, bytes, io.FileIO, io.BufferedReader, 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], - ) -> 'SchemaForRequestBodyMultipartFormData': - return super().__new__( - cls, - *_args, - file=file, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _import_all_configs_oapg( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _import_all_configs_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _import_all_configs_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _import_all_configs_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _import_all_configs_oapg( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - 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) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_envs, - request_query_conflict_action, - ): - 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 - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.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 ImportAllConfigs(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def import_all_configs( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def import_all_configs( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def import_all_configs( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def import_all_configs( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def import_all_configs( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._import_all_configs_oapg( - body=body, - query_params=query_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._import_all_configs_oapg( - body=body, - query_params=query_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_consumer_tokens_by_app_id/__init__.py b/python/apollo_openapi/paths/openapi_v1_consumer_tokens_by_app_id/__init__.py deleted file mode 100644 index c734b467..00000000 --- a/python/apollo_openapi/paths/openapi_v1_consumer_tokens_by_app_id/__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_consumer_tokens_by_app_id import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_CONSUMERTOKENS_BYAPP_ID diff --git a/python/apollo_openapi/paths/openapi_v1_consumer_tokens_by_app_id/get.py b/python/apollo_openapi/paths/openapi_v1_consumer_tokens_by_app_id/get.py deleted file mode 100644 index e686fef7..00000000 --- a/python/apollo_openapi/paths/openapi_v1_consumer_tokens_by_app_id/get.py +++ /dev/null @@ -1,294 +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 . import path - -# Query params -AppIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_app_id = api_client.QueryParameter( - name="appId", - style=api_client.ParameterStyle.FORM, - schema=AppIdSchema, - required=True, - explode=True, -) -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_consumer_token_by_app_id_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_consumer_token_by_app_id_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_consumer_token_by_app_id_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_consumer_token_by_app_id_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, - ): - """ - 按应用ID查询消费者Token(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_app_id, - ): - 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 GetConsumerTokenByAppId(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_consumer_token_by_app_id( - 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_consumer_token_by_app_id( - 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_consumer_token_by_app_id( - 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_consumer_token_by_app_id( - 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_consumer_token_by_app_id_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_consumer_token_by_app_id_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_consumer_tokens_by_app_id/get.pyi b/python/apollo_openapi/paths/openapi_v1_consumer_tokens_by_app_id/get.pyi deleted file mode 100644 index 0d65bd82..00000000 --- a/python/apollo_openapi/paths/openapi_v1_consumer_tokens_by_app_id/get.pyi +++ /dev/null @@ -1,286 +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 - -# Query params -AppIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_app_id = api_client.QueryParameter( - name="appId", - style=api_client.ParameterStyle.FORM, - schema=AppIdSchema, - required=True, - explode=True, -) -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_consumer_token_by_app_id_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_consumer_token_by_app_id_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_consumer_token_by_app_id_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_consumer_token_by_app_id_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, - ): - """ - 按应用ID查询消费者Token(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_app_id, - ): - 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 GetConsumerTokenByAppId(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_consumer_token_by_app_id( - 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_consumer_token_by_app_id( - 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_consumer_token_by_app_id( - 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_consumer_token_by_app_id( - 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_consumer_token_by_app_id_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_consumer_token_by_app_id_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_consumers/__init__.py b/python/apollo_openapi/paths/openapi_v1_consumers/__init__.py deleted file mode 100644 index 4e4ec51e..00000000 --- a/python/apollo_openapi/paths/openapi_v1_consumers/__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_consumers import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_CONSUMERS diff --git a/python/apollo_openapi/paths/openapi_v1_consumers/get.py b/python/apollo_openapi/paths/openapi_v1_consumers/get.py deleted file mode 100644 index a1925445..00000000 --- a/python/apollo_openapi/paths/openapi_v1_consumers/get.py +++ /dev/null @@ -1,324 +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 . import path - -# Query params -PageSchema = schemas.IntSchema -SizeSchema = schemas.IntSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - explode=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _get_consumer_list_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_consumer_list_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_consumer_list_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_consumer_list_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, - ): - """ - 查询开放平台消费者列表(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 GetConsumerList(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_consumer_list( - 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_consumer_list( - 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_consumer_list( - 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_consumer_list( - 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_consumer_list_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_consumer_list_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_consumers/get.pyi b/python/apollo_openapi/paths/openapi_v1_consumers/get.pyi deleted file mode 100644 index 8cb91c70..00000000 --- a/python/apollo_openapi/paths/openapi_v1_consumers/get.pyi +++ /dev/null @@ -1,316 +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 - -# Query params -PageSchema = schemas.IntSchema -SizeSchema = schemas.IntSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - explode=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _get_consumer_list_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_consumer_list_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_consumer_list_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_consumer_list_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, - ): - """ - 查询开放平台消费者列表(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 GetConsumerList(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_consumer_list( - 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_consumer_list( - 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_consumer_list( - 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_consumer_list( - 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_consumer_list_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_consumer_list_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_consumers/post.py b/python/apollo_openapi/paths/openapi_v1_consumers/post.py deleted file mode 100644 index c8e63f3e..00000000 --- a/python/apollo_openapi/paths/openapi_v1_consumers/post.py +++ /dev/null @@ -1,390 +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 . import path - -# Query params -ExpiresSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'expires': typing.Union[ExpiresSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_expires = api_client.QueryParameter( - name="expires", - style=api_client.ParameterStyle.FORM, - schema=ExpiresSchema, - explode=True, -) -# body param -SchemaForRequestBodyApplicationJson = schemas.DictSchema - - -request_body_body = 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), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_consumer_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - 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 _create_consumer_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - 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 _create_consumer_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - 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 _create_consumer_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - 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 _create_consumer_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - 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, - ): - """ - 创建开放平台消费者(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_expires, - ): - 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_body.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 CreateConsumer(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_consumer( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - 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 create_consumer( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - 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 create_consumer( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - 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 create_consumer( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - 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 create_consumer( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - 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._create_consumer_oapg( - body=body, - query_params=query_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,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - 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 post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - 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 post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - 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 post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - 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 post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - 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._create_consumer_oapg( - body=body, - query_params=query_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_consumers/post.pyi b/python/apollo_openapi/paths/openapi_v1_consumers/post.pyi deleted file mode 100644 index f654cf1c..00000000 --- a/python/apollo_openapi/paths/openapi_v1_consumers/post.pyi +++ /dev/null @@ -1,382 +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 - -# Query params -ExpiresSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'expires': typing.Union[ExpiresSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_expires = api_client.QueryParameter( - name="expires", - style=api_client.ParameterStyle.FORM, - schema=ExpiresSchema, - explode=True, -) -# body param -SchemaForRequestBodyApplicationJson = schemas.DictSchema - - -request_body_body = 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), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_consumer_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - 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 _create_consumer_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - 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 _create_consumer_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - 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 _create_consumer_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - 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 _create_consumer_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - 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, - ): - """ - 创建开放平台消费者(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_expires, - ): - 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_body.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 CreateConsumer(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_consumer( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - 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 create_consumer( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - 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 create_consumer( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - 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 create_consumer( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - 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 create_consumer( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - 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._create_consumer_oapg( - body=body, - query_params=query_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,dict, frozendict.frozendict, ], - content_type: typing_extensions.Literal["application/json"] = ..., - 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 post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - 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 post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - 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 post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = ..., - 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 post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - content_type: str = 'application/json', - 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._create_consumer_oapg( - body=body, - query_params=query_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_consumers_by_app_id/__init__.py b/python/apollo_openapi/paths/openapi_v1_consumers_by_app_id/__init__.py deleted file mode 100644 index 9ad8d22d..00000000 --- a/python/apollo_openapi/paths/openapi_v1_consumers_by_app_id/__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_consumers_by_app_id import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_CONSUMERS_BYAPP_ID diff --git a/python/apollo_openapi/paths/openapi_v1_consumers_by_app_id/delete.py b/python/apollo_openapi/paths/openapi_v1_consumers_by_app_id/delete.py deleted file mode 100644 index 8b40f798..00000000 --- a/python/apollo_openapi/paths/openapi_v1_consumers_by_app_id/delete.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -AppIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_app_id = api_client.QueryParameter( - name="appId", - style=api_client.ParameterStyle.FORM, - schema=AppIdSchema, - required=True, - explode=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_consumer_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_consumer_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_consumer_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_consumer_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 按应用ID删除消费者(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_app_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 DeleteConsumer(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_consumer( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete_consumer( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_consumer( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_consumer( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_consumer_oapg( - query_params=query_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_consumer_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_consumers_by_app_id/delete.pyi b/python/apollo_openapi/paths/openapi_v1_consumers_by_app_id/delete.pyi deleted file mode 100644 index 18a3017c..00000000 --- a/python/apollo_openapi/paths/openapi_v1_consumers_by_app_id/delete.pyi +++ /dev/null @@ -1,255 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -AppIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_app_id = api_client.QueryParameter( - name="appId", - style=api_client.ParameterStyle.FORM, - schema=AppIdSchema, - required=True, - explode=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_consumer_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_consumer_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_consumer_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_consumer_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 按应用ID删除消费者(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_app_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 DeleteConsumer(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_consumer( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete_consumer( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_consumer( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_consumer( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_consumer_oapg( - query_params=query_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_consumer_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_consumers_token_assign_role/__init__.py b/python/apollo_openapi/paths/openapi_v1_consumers_token_assign_role/__init__.py deleted file mode 100644 index 760fa729..00000000 --- a/python/apollo_openapi/paths/openapi_v1_consumers_token_assign_role/__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_consumers_token_assign_role import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_CONSUMERS_TOKEN_ASSIGNROLE diff --git a/python/apollo_openapi/paths/openapi_v1_consumers_token_assign_role/post.py b/python/apollo_openapi/paths/openapi_v1_consumers_token_assign_role/post.py deleted file mode 100644 index 0164b396..00000000 --- a/python/apollo_openapi/paths/openapi_v1_consumers_token_assign_role/post.py +++ /dev/null @@ -1,479 +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 . import path - -# Query params -TypeSchema = schemas.StrSchema -EnvsSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'type': typing.Union[TypeSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'envs': typing.Union[EnvsSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_type = api_client.QueryParameter( - name="type", - style=api_client.ParameterStyle.FORM, - schema=TypeSchema, - required=True, - explode=True, -) -request_query_envs = api_client.QueryParameter( - name="envs", - style=api_client.ParameterStyle.FORM, - schema=EnvsSchema, - explode=True, -) -# Path params -TokenSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'token': typing.Union[TokenSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_token = api_client.PathParameter( - name="token", - style=api_client.ParameterStyle.SIMPLE, - schema=TokenSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = schemas.DictSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _assign_role_to_consumer_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 _assign_role_to_consumer_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 _assign_role_to_consumer_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 _assign_role_to_consumer_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 _assign_role_to_consumer_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_token, - ): - 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_type, - request_query_envs, - ): - 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_body.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 AssignRoleToConsumer(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def assign_role_to_consumer( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 assign_role_to_consumer( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 assign_role_to_consumer( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 assign_role_to_consumer( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 assign_role_to_consumer( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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._assign_role_to_consumer_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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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._assign_role_to_consumer_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_consumers_token_assign_role/post.pyi b/python/apollo_openapi/paths/openapi_v1_consumers_token_assign_role/post.pyi deleted file mode 100644 index 3998e0ae..00000000 --- a/python/apollo_openapi/paths/openapi_v1_consumers_token_assign_role/post.pyi +++ /dev/null @@ -1,471 +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 - -# Query params -TypeSchema = schemas.StrSchema -EnvsSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'type': typing.Union[TypeSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'envs': typing.Union[EnvsSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_type = api_client.QueryParameter( - name="type", - style=api_client.ParameterStyle.FORM, - schema=TypeSchema, - required=True, - explode=True, -) -request_query_envs = api_client.QueryParameter( - name="envs", - style=api_client.ParameterStyle.FORM, - schema=EnvsSchema, - explode=True, -) -# Path params -TokenSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'token': typing.Union[TokenSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_token = api_client.PathParameter( - name="token", - style=api_client.ParameterStyle.SIMPLE, - schema=TokenSchema, - required=True, -) -# body param -SchemaForRequestBodyApplicationJson = schemas.DictSchema - - -request_body_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _assign_role_to_consumer_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 _assign_role_to_consumer_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 _assign_role_to_consumer_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 _assign_role_to_consumer_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 _assign_role_to_consumer_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_token, - ): - 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_type, - request_query_envs, - ): - 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_body.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 AssignRoleToConsumer(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def assign_role_to_consumer( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 assign_role_to_consumer( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 assign_role_to_consumer( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 assign_role_to_consumer( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 assign_role_to_consumer( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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._assign_role_to_consumer_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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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._assign_role_to_consumer_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/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs/__init__.py deleted file mode 100644 index 8b1a6645..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs/__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 import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_ENVS diff --git a/python/apollo_openapi/paths/openapi_v1_envs/get.py b/python/apollo_openapi/paths/openapi_v1_envs/get.py deleted file mode 100644 index 834b579c..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs/get.py +++ /dev/null @@ -1,261 +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 . import path - -_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 _get_envs_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_envs_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_envs_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_envs_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, - ): - """ - 获取所有环境 - :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 GetEnvs(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_envs( - 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_envs( - 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_envs( - 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_envs( - 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_envs_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_envs_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs/get.pyi deleted file mode 100644 index 51500d6a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs/get.pyi +++ /dev/null @@ -1,253 +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 - - - -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 _get_envs_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_envs_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_envs_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_envs_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, - ): - """ - 获取所有环境 - :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 GetEnvs(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_envs( - 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_envs( - 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_envs( - 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_envs( - 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_envs_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_envs_oapg( - 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 deleted file mode 100644 index a550ce3e..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/__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_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 deleted file mode 100644 index faeefe4a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/get.py +++ /dev/null @@ -1,394 +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_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 deleted file mode 100644 index d61e70f9..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/get.pyi +++ /dev/null @@ -1,386 +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_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 deleted file mode 100644 index 228b0f06..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/__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 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 deleted file mode 100644 index b2970629..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/post.py +++ /dev/null @@ -1,442 +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_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), - }, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index e5b3c090..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters/post.pyi +++ /dev/null @@ -1,432 +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_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), - }, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index 4c2df02f..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/__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 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 deleted file mode 100644 index 5854cc4f..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.py +++ /dev/null @@ -1,420 +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.exception_response import ExceptionResponse - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index 35823635..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/delete.pyi +++ /dev/null @@ -1,409 +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.exception_response import ExceptionResponse - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index 7bfa28b3..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/get.py +++ /dev/null @@ -1,334 +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_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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index 73225290..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name/get.pyi +++ /dev/null @@ -1,325 +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_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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index 5267386a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/__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 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 deleted file mode 100644 index 8e0927a0..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/get.py +++ /dev/null @@ -1,402 +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_namespace_dto import OpenNamespaceDTO - -from . import path - -# Query params -FillItemDetailSchema = schemas.BoolSchema -ExtendInfoSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'fillItemDetail': typing.Union[FillItemDetailSchema, bool, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'extendInfo': typing.Union[ExtendInfoSchema, bool, ], - }, - 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, -) -request_query_extend_info = api_client.QueryParameter( - name="extendInfo", - style=api_client.ParameterStyle.FORM, - schema=ExtendInfoSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -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, - request_query_extend_info, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class 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 deleted file mode 100644 index 987da41b..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/get.pyi +++ /dev/null @@ -1,394 +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_namespace_dto import OpenNamespaceDTO - -# Query params -FillItemDetailSchema = schemas.BoolSchema -ExtendInfoSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'fillItemDetail': typing.Union[FillItemDetailSchema, bool, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'extendInfo': typing.Union[ExtendInfoSchema, bool, ], - }, - 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, -) -request_query_extend_info = api_client.QueryParameter( - name="extendInfo", - style=api_client.ParameterStyle.FORM, - schema=ExtendInfoSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -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, - request_query_extend_info, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class 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 deleted file mode 100644 index facabde4..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/__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 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 deleted file mode 100644 index 6fcd7279..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/get.py +++ /dev/null @@ -1,386 +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_namespace_dto import OpenNamespaceDTO - -from . import path - -# Query params -FillItemDetailSchema = schemas.BoolSchema -ExtendInfoSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'fillItemDetail': typing.Union[FillItemDetailSchema, bool, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'extendInfo': typing.Union[ExtendInfoSchema, bool, ], - }, - 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, -) -request_query_extend_info = api_client.QueryParameter( - name="extendInfo", - style=api_client.ParameterStyle.FORM, - schema=ExtendInfoSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -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 _find_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_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_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_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, - request_query_extend_info, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FindNamespace(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_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_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_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_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_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_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 deleted file mode 100644 index ff06d04d..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/get.pyi +++ /dev/null @@ -1,378 +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_namespace_dto import OpenNamespaceDTO - -# Query params -FillItemDetailSchema = schemas.BoolSchema -ExtendInfoSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'fillItemDetail': typing.Union[FillItemDetailSchema, bool, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'extendInfo': typing.Union[ExtendInfoSchema, bool, ], - }, - 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, -) -request_query_extend_info = api_client.QueryParameter( - name="extendInfo", - style=api_client.ParameterStyle.FORM, - schema=ExtendInfoSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -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 _find_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_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_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_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, - request_query_extend_info, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FindNamespace(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_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_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_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_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_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_namespace_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/__init__.py deleted file mode 100644 index 9a93cdd9..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/__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_associated_public_namespace import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ASSOCIATEDPUBLICNAMESPACE diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/get.py deleted file mode 100644 index 59bc514f..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/get.py +++ /dev/null @@ -1,376 +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_namespace_dto import OpenNamespaceDTO - -from . import path - -# Query params -ExtendInfoSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'extendInfo': typing.Union[ExtendInfoSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_extend_info = api_client.QueryParameter( - name="extendInfo", - style=api_client.ParameterStyle.FORM, - schema=ExtendInfoSchema, - explode=True, -) -# Path params -EnvSchema = schemas.StrSchema -AppIdSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'env': typing.Union[EnvSchema, str, ], - 'appId': typing.Union[AppIdSchema, str, ], - 'clusterName': typing.Union[ClusterNameSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_env = api_client.PathParameter( - name="env", - style=api_client.ParameterStyle.SIMPLE, - schema=EnvSchema, - required=True, -) -request_path_app_id = api_client.PathParameter( - name="appId", - style=api_client.ParameterStyle.SIMPLE, - schema=AppIdSchema, - required=True, -) -request_path_cluster_name = api_client.PathParameter( - name="clusterName", - style=api_client.ParameterStyle.SIMPLE, - schema=ClusterNameSchema, - required=True, -) -request_path_namespace_name = api_client.PathParameter( - name="namespaceName", - style=api_client.ParameterStyle.SIMPLE, - schema=NamespaceNameSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationJson = OpenNamespaceDTO - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _find_public_namespace_for_associated_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _find_public_namespace_for_associated_namespace_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _find_public_namespace_for_associated_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _find_public_namespace_for_associated_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 查询关联Namespace对应的公共Namespace详情 (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_env, - request_path_app_id, - request_path_cluster_name, - request_path_namespace_name, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_extend_info, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FindPublicNamespaceForAssociatedNamespace(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_public_namespace_for_associated_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def find_public_namespace_for_associated_namespace( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def find_public_namespace_for_associated_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def find_public_namespace_for_associated_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_public_namespace_for_associated_namespace_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_public_namespace_for_associated_namespace_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/get.pyi deleted file mode 100644 index c77a84eb..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/get.pyi +++ /dev/null @@ -1,368 +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_namespace_dto import OpenNamespaceDTO - -# Query params -ExtendInfoSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'extendInfo': typing.Union[ExtendInfoSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_extend_info = api_client.QueryParameter( - name="extendInfo", - style=api_client.ParameterStyle.FORM, - schema=ExtendInfoSchema, - explode=True, -) -# Path params -EnvSchema = schemas.StrSchema -AppIdSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'env': typing.Union[EnvSchema, str, ], - 'appId': typing.Union[AppIdSchema, str, ], - 'clusterName': typing.Union[ClusterNameSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_env = api_client.PathParameter( - name="env", - style=api_client.ParameterStyle.SIMPLE, - schema=EnvSchema, - required=True, -) -request_path_app_id = api_client.PathParameter( - name="appId", - style=api_client.ParameterStyle.SIMPLE, - schema=AppIdSchema, - required=True, -) -request_path_cluster_name = api_client.PathParameter( - name="clusterName", - style=api_client.ParameterStyle.SIMPLE, - schema=ClusterNameSchema, - required=True, -) -request_path_namespace_name = api_client.PathParameter( - name="namespaceName", - style=api_client.ParameterStyle.SIMPLE, - schema=NamespaceNameSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = OpenNamespaceDTO - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _find_public_namespace_for_associated_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _find_public_namespace_for_associated_namespace_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _find_public_namespace_for_associated_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _find_public_namespace_for_associated_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 查询关联Namespace对应的公共Namespace详情 (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_env, - request_path_app_id, - request_path_cluster_name, - request_path_namespace_name, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_extend_info, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FindPublicNamespaceForAssociatedNamespace(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_public_namespace_for_associated_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def find_public_namespace_for_associated_namespace( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def find_public_namespace_for_associated_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def find_public_namespace_for_associated_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_public_namespace_for_associated_namespace_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._find_public_namespace_for_associated_namespace_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/__init__.py deleted file mode 100644 index dca847e6..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/__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_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 deleted file mode 100644 index 4765ab94..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/get.py +++ /dev/null @@ -1,397 +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_namespace_dto import OpenNamespaceDTO -from apollo_openapi.model.exception_response import ExceptionResponse - -from . import path - -# Query params -ExtendInfoSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'extendInfo': typing.Union[ExtendInfoSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_extend_info = api_client.QueryParameter( - name="extendInfo", - style=api_client.ParameterStyle.FORM, - schema=ExtendInfoSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_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_extend_info, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FindBranch(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_branch( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - 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], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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( - 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_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/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/get.pyi deleted file mode 100644 index 76a38d07..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/get.pyi +++ /dev/null @@ -1,388 +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_namespace_dto import OpenNamespaceDTO -from apollo_openapi.model.exception_response import ExceptionResponse - -# Query params -ExtendInfoSchema = schemas.BoolSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'extendInfo': typing.Union[ExtendInfoSchema, bool, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_extend_info = api_client.QueryParameter( - name="extendInfo", - style=api_client.ParameterStyle.FORM, - schema=ExtendInfoSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_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_extend_info, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FindBranch(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_branch( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - 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], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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( - 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_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.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.py deleted file mode 100644 index eb143381..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.py +++ /dev/null @@ -1,376 +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_namespace_dto import OpenNamespaceDTO - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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 deleted file mode 100644 index a78e26b2..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/post.pyi +++ /dev/null @@ -1,368 +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_namespace_dto import OpenNamespaceDTO - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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 deleted file mode 100644 index c76ff7bf..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/__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_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 deleted file mode 100644 index 5050cf60..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/delete.py +++ /dev/null @@ -1,352 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from apollo_openapi import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_branch_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_branch_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - 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(), - 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(), - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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(), - 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(), - 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(), - 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(), - 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, - 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(), - 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(), - 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(), - 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(), - 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, - 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 deleted file mode 100644 index 8baba1fd..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/delete.pyi +++ /dev/null @@ -1,344 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from apollo_openapi import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_branch_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_branch_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - 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(), - 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(), - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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(), - 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(), - 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(), - 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(), - 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, - 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(), - 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(), - 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(), - 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(), - 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, - 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/post.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/post.py deleted file mode 100644 index 50aae891..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/post.py +++ /dev/null @@ -1,496 +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_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, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - 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, - 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='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 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 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_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/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/post.pyi deleted file mode 100644 index 72efd702..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/post.pyi +++ /dev/null @@ -1,488 +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_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, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - 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, - 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='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 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 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_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 deleted file mode 100644 index 53181b9b..00000000 --- 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 +++ /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_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 deleted file mode 100644 index 94578ee9..00000000 --- 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 +++ /dev/null @@ -1,486 +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_release_dto import OpenReleaseDTO -from apollo_openapi.model.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_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_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"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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, - 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_gray_del_release_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/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 deleted file mode 100644 index ed44b886..00000000 --- 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 +++ /dev/null @@ -1,478 +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_release_dto import OpenReleaseDTO -from apollo_openapi.model.namespace_gray_del_release_dto import NamespaceGrayDelReleaseDTO - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_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_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"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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, - 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_gray_del_release_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_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 deleted file mode 100644 index a5034e8a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/__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_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 deleted file mode 100644 index 7149cdf9..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/get.py +++ /dev/null @@ -1,377 +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_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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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_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 _find_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 _find_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 _find_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 FindBranchItems(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_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 find_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 find_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 find_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._find_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._find_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 deleted file mode 100644 index 0c00e7c1..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_items/get.pyi +++ /dev/null @@ -1,368 +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_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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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_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 _find_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 _find_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 _find_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 FindBranchItems(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_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 find_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 find_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 find_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._find_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._find_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 deleted file mode 100644 index 271d5e9b..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/__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_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 deleted file mode 100644 index 16e8bb35..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/post.py +++ /dev/null @@ -1,528 +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_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), - }, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index 88fb9924..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_merge/post.pyi +++ /dev/null @@ -1,518 +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_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), - }, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index 2b996f0b..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/__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_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 deleted file mode 100644 index 8e436e9d..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/post.py +++ /dev/null @@ -1,486 +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_release_dto import OpenReleaseDTO -from apollo_openapi.model.namespace_release_dto import NamespaceReleaseDTO - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_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_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"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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, - 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_gray_release_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/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 deleted file mode 100644 index ecd01c34..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_releases/post.pyi +++ /dev/null @@ -1,478 +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_release_dto import OpenReleaseDTO -from apollo_openapi.model.namespace_release_dto import NamespaceReleaseDTO - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_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_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"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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, - 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_gray_release_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/__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 deleted file mode 100644 index 88c7513d..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/__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_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 deleted file mode 100644 index 4daaf289..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/get.py +++ /dev/null @@ -1,331 +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_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 deleted file mode 100644 index bf2123bc..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/get.pyi +++ /dev/null @@ -1,323 +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_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 deleted file mode 100644 index 42262fc0..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/put.py +++ /dev/null @@ -1,455 +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_gray_release_rule_dto import OpenGrayReleaseRuleDTO - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _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(), - 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(), - 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(), - 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(), - 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(), - 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 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(), - 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(), - 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(), - 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(), - 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(), - 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, - 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(), - 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(), - 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(), - 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(), - 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(), - 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, - 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 deleted file mode 100644 index 113b2411..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name_rules/put.pyi +++ /dev/null @@ -1,447 +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_gray_release_rule_dto import OpenGrayReleaseRuleDTO - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _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(), - 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(), - 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(), - 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(), - 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(), - 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 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(), - 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(), - 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(), - 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(), - 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(), - 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, - 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(), - 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(), - 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(), - 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(), - 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(), - 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, - 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 deleted file mode 100644 index 992f8a40..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/__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_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 deleted file mode 100644 index 0de0e73a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/delete.py +++ /dev/null @@ -1,353 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_item_by_encoded_key_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_item_by_encoded_key_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - 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(), - 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(), - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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(), - 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(), - 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(), - 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(), - 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, - 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(), - 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(), - 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(), - 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(), - 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, - 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 deleted file mode 100644 index 4f25b3ab..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/delete.pyi +++ /dev/null @@ -1,345 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_item_by_encoded_key_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_item_by_encoded_key_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - 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(), - 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(), - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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(), - 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(), - 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(), - 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(), - 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, - 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(), - 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(), - 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(), - 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(), - 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, - 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 deleted file mode 100644 index d277d899..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/get.py +++ /dev/null @@ -1,352 +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_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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index 1c9cbc40..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/get.pyi +++ /dev/null @@ -1,343 +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_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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index c2e639ac..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/put.py +++ /dev/null @@ -1,549 +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_item_dto import OpenItemDTO -from apollo_openapi.model.exception_response import ExceptionResponse - -from . import path - -# Query params -CreateIfNotExistsSchema = schemas.BoolSchema -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'createIfNotExists': typing.Union[CreateIfNotExistsSchema, bool, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - 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, -) -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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, - 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='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 deleted file mode 100644 index b6841c96..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_encoded_items_key/put.pyi +++ /dev/null @@ -1,538 +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_item_dto import OpenItemDTO -from apollo_openapi.model.exception_response import ExceptionResponse - -# Query params -CreateIfNotExistsSchema = schemas.BoolSchema -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'createIfNotExists': typing.Union[CreateIfNotExistsSchema, bool, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - 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, -) -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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, - 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='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 deleted file mode 100644 index a63adc52..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/__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 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 deleted file mode 100644 index 8a7ea7ed..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/get.py +++ /dev/null @@ -1,320 +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 . 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 deleted file mode 100644 index a6faafcd..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/get.pyi +++ /dev/null @@ -1,312 +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 - -# 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_items/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/__init__.py deleted file mode 100644 index 859c2943..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/__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_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 deleted file mode 100644 index 8d2f746d..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/get.py +++ /dev/null @@ -1,424 +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_item_page_dto import OpenItemPageDTO -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 = OpenItemPageDTO - - -@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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index c62b5e67..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/get.pyi +++ /dev/null @@ -1,409 +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_item_page_dto import OpenItemPageDTO -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 = OpenItemPageDTO - - -@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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index 54264971..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/post.py +++ /dev/null @@ -1,517 +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_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', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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), - }, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index b4563f0a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/post.pyi +++ /dev/null @@ -1,507 +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_item_dto import OpenItemDTO -from apollo_openapi.model.exception_response import ExceptionResponse - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -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), - }, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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/put.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/put.py deleted file mode 100644 index 17ba9d5b..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/put.py +++ /dev/null @@ -1,490 +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.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', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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/put.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/put.pyi deleted file mode 100644 index 232f0f27..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/put.pyi +++ /dev/null @@ -1,481 +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.exception_response import ExceptionResponse -from apollo_openapi.model.open_namespace_text_model import OpenNamespaceTextModel - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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_diff/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/__init__.py deleted file mode 100644 index 651390c3..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/__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_items_diff import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_DIFF diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/post.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/post.py deleted file mode 100644 index 7050249a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/post.py +++ /dev/null @@ -1,445 +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_namespace_sync_dto import OpenNamespaceSyncDTO -from apollo_openapi.model.open_item_diff_dto import OpenItemDiffDTO - -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 = OpenNamespaceSyncDTO - - -request_body_open_namespace_sync_dto = 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['OpenItemDiffDTO']: - return OpenItemDiffDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenItemDiffDTO'], typing.List['OpenItemDiffDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenItemDiffDTO': - 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_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 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_diff/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/post.pyi deleted file mode 100644 index fcd5058a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/post.pyi +++ /dev/null @@ -1,437 +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_namespace_sync_dto import OpenNamespaceSyncDTO -from apollo_openapi.model.open_item_diff_dto import OpenItemDiffDTO - -# 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 = OpenNamespaceSyncDTO - - -request_body_open_namespace_sync_dto = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenItemDiffDTO']: - return OpenItemDiffDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenItemDiffDTO'], typing.List['OpenItemDiffDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenItemDiffDTO': - 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_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 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 deleted file mode 100644 index cdee9b53..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/__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_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 deleted file mode 100644 index 945dff3e..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/delete.py +++ /dev/null @@ -1,352 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from apollo_openapi import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_item_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_item_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - 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(), - 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(), - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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(), - 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(), - 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(), - 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(), - 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, - 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(), - 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(), - 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(), - 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(), - 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, - 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 deleted file mode 100644 index 3ad59aef..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/delete.pyi +++ /dev/null @@ -1,344 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -from apollo_openapi import api_client, exceptions -from datetime import date, datetime # noqa: F401 -import decimal # noqa: F401 -import functools # noqa: F401 -import io # noqa: F401 -import re # noqa: F401 -import typing # noqa: F401 -import typing_extensions # noqa: F401 -import uuid # noqa: F401 - -import frozendict # noqa: F401 - -from apollo_openapi import schemas # noqa: F401 - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_item_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_item_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - 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(), - 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(), - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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(), - 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(), - 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(), - 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(), - 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, - 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(), - 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(), - 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(), - 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(), - 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, - 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 deleted file mode 100644 index 8bed8ee3..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/get.py +++ /dev/null @@ -1,352 +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_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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index b0f2901f..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/get.pyi +++ /dev/null @@ -1,343 +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_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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index a886cc2d..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/put.py +++ /dev/null @@ -1,549 +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_item_dto import OpenItemDTO -from apollo_openapi.model.exception_response import ExceptionResponse - -from . import path - -# Query params -CreateIfNotExistsSchema = schemas.BoolSchema -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'createIfNotExists': typing.Union[CreateIfNotExistsSchema, bool, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - 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, -) -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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, - 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='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 deleted file mode 100644 index 4a60a8f8..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/put.pyi +++ /dev/null @@ -1,538 +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_item_dto import OpenItemDTO -from apollo_openapi.model.exception_response import ExceptionResponse - -# Query params -CreateIfNotExistsSchema = schemas.BoolSchema -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'createIfNotExists': typing.Union[CreateIfNotExistsSchema, bool, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - 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, -) -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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, - 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='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_revocation/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/__init__.py deleted file mode 100644 index 4a754f9c..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/__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_items_revocation import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_REVOCATION diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/post.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/post.py deleted file mode 100644 index 9ce08977..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/post.py +++ /dev/null @@ -1,409 +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.exception_response import ExceptionResponse - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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_revocation/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/post.pyi deleted file mode 100644 index 129777aa..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/post.pyi +++ /dev/null @@ -1,399 +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.exception_response import ExceptionResponse - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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_synchronize/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/__init__.py deleted file mode 100644 index b6ee685c..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/__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_items_synchronize import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_SYNCHRONIZE diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/post.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/post.py deleted file mode 100644 index 1af11809..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/post.py +++ /dev/null @@ -1,510 +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_namespace_sync_dto import OpenNamespaceSyncDTO -from apollo_openapi.model.exception_response import ExceptionResponse - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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 = OpenNamespaceSyncDTO - - -request_body_open_namespace_sync_dto = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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_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 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_synchronize/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/post.pyi deleted file mode 100644 index 9b3399c1..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/post.pyi +++ /dev/null @@ -1,500 +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_namespace_sync_dto import OpenNamespaceSyncDTO -from apollo_openapi.model.exception_response import ExceptionResponse - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -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 = OpenNamespaceSyncDTO - - -request_body_open_namespace_sync_dto = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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_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 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_validation/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/__init__.py deleted file mode 100644 index 43d665ea..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/__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_items_validation import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_ENVS_ENV_APPS_APP_ID_CLUSTERS_CLUSTER_NAME_NAMESPACES_NAMESPACE_NAME_ITEMS_VALIDATION diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/post.py b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/post.py deleted file mode 100644 index adfb852f..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/post.py +++ /dev/null @@ -1,433 +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.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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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 _syntax_check_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 _syntax_check_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 _syntax_check_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 _syntax_check_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 _syntax_check_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 SyntaxCheck(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def syntax_check( - 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 syntax_check( - 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 syntax_check( - 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 syntax_check( - 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 syntax_check( - 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._syntax_check_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._syntax_check_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_validation/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/post.pyi deleted file mode 100644 index 8c2c9b7b..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/post.pyi +++ /dev/null @@ -1,424 +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.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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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 _syntax_check_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 _syntax_check_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 _syntax_check_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 _syntax_check_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 _syntax_check_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 SyntaxCheck(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def syntax_check( - 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 syntax_check( - 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 syntax_check( - 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 syntax_check( - 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 syntax_check( - 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._syntax_check_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._syntax_check_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 deleted file mode 100644 index 39040879..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/__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_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 deleted file mode 100644 index 09e2f2ee..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/get.py +++ /dev/null @@ -1,322 +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_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 deleted file mode 100644 index 2c80c230..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/get.pyi +++ /dev/null @@ -1,314 +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_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 deleted file mode 100644 index f775f750..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/__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_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 deleted file mode 100644 index 6a93040c..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/post.py +++ /dev/null @@ -1,518 +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_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 -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -EnvSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -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), - }, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_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_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"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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, - 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_release_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_releases/post.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/post.pyi deleted file mode 100644 index 62a8c1e0..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/post.pyi +++ /dev/null @@ -1,508 +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_release_dto import OpenReleaseDTO -from apollo_openapi.model.namespace_release_dto import NamespaceReleaseDTO -from apollo_openapi.model.exception_response import ExceptionResponse - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# Path params -AppIdSchema = schemas.StrSchema -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), - }, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_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_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"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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 = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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', - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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, - 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_release_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_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 deleted file mode 100644 index 6777bea7..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/__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_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 deleted file mode 100644 index df1ea8f1..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/get.py +++ /dev/null @@ -1,412 +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_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 deleted file mode 100644 index fb7dd89c..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/get.pyi +++ /dev/null @@ -1,404 +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_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_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 deleted file mode 100644 index 2965d5be..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/__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_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 deleted file mode 100644 index 2f845fc5..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/get.py +++ /dev/null @@ -1,343 +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_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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index 9fdda611..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/get.pyi +++ /dev/null @@ -1,334 +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_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), - }, -) -SchemaFor404ResponseBodyApplicationJson = ExceptionResponse - - -@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_instances_by_namespace/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace/__init__.py deleted file mode 100644 index f0522eb2..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace/__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_instances_by_namespace import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_ENVS_ENV_INSTANCES_BYNAMESPACE diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace/get.py deleted file mode 100644 index f30b3679..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace/get.py +++ /dev/null @@ -1,415 +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_page_dto import OpenInstancePageDTO - -from . import path - -# Query params -AppIdSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -InstanceAppIdSchema = schemas.StrSchema - - -class PageSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_minimum = 0 - - -class SizeSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_minimum = 0 -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'clusterName': typing.Union[ClusterNameSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'instanceAppId': typing.Union[InstanceAppIdSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_app_id = api_client.QueryParameter( - name="appId", - style=api_client.ParameterStyle.FORM, - schema=AppIdSchema, - required=True, - explode=True, -) -request_query_cluster_name = api_client.QueryParameter( - name="clusterName", - style=api_client.ParameterStyle.FORM, - schema=ClusterNameSchema, - required=True, - explode=True, -) -request_query_namespace_name = api_client.QueryParameter( - name="namespaceName", - style=api_client.ParameterStyle.FORM, - schema=NamespaceNameSchema, - required=True, - explode=True, -) -request_query_instance_app_id = api_client.QueryParameter( - name="instanceAppId", - style=api_client.ParameterStyle.FORM, - schema=InstanceAppIdSchema, - explode=True, -) -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - required=True, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - required=True, - explode=True, -) -# Path params -EnvSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'env': typing.Union[EnvSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_env = api_client.PathParameter( - name="env", - style=api_client.ParameterStyle.SIMPLE, - schema=EnvSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationJson = OpenInstancePageDTO - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_by_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_by_namespace_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_by_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_by_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 根据namespaceName查询实例(new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_env, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_app_id, - request_query_cluster_name, - request_query_namespace_name, - request_query_instance_app_id, - request_query_page, - request_query_size, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetByNamespace(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_by_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_by_namespace( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_by_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_by_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_by_namespace_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_by_namespace_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace/get.pyi deleted file mode 100644 index 084686b1..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace/get.pyi +++ /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_page_dto import OpenInstancePageDTO - -# Query params -AppIdSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -InstanceAppIdSchema = schemas.StrSchema - - -class PageSchema( - schemas.IntSchema -): - pass - - -class SizeSchema( - schemas.IntSchema -): - pass -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'clusterName': typing.Union[ClusterNameSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'instanceAppId': typing.Union[InstanceAppIdSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_app_id = api_client.QueryParameter( - name="appId", - style=api_client.ParameterStyle.FORM, - schema=AppIdSchema, - required=True, - explode=True, -) -request_query_cluster_name = api_client.QueryParameter( - name="clusterName", - style=api_client.ParameterStyle.FORM, - schema=ClusterNameSchema, - required=True, - explode=True, -) -request_query_namespace_name = api_client.QueryParameter( - name="namespaceName", - style=api_client.ParameterStyle.FORM, - schema=NamespaceNameSchema, - required=True, - explode=True, -) -request_query_instance_app_id = api_client.QueryParameter( - name="instanceAppId", - style=api_client.ParameterStyle.FORM, - schema=InstanceAppIdSchema, - explode=True, -) -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - required=True, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - required=True, - explode=True, -) -# Path params -EnvSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'env': typing.Union[EnvSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_env = api_client.PathParameter( - name="env", - style=api_client.ParameterStyle.SIMPLE, - schema=EnvSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = OpenInstancePageDTO - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_by_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_by_namespace_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_by_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_by_namespace_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 根据namespaceName查询实例(new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_env, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_app_id, - request_query_cluster_name, - request_query_namespace_name, - request_query_instance_app_id, - request_query_page, - request_query_size, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetByNamespace(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_by_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_by_namespace( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_by_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_by_namespace( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_by_namespace_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_by_namespace_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/__init__.py deleted file mode 100644 index cdb2b28a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/__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_instances_by_namespace_and_releases_not_in import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_ENVS_ENV_INSTANCES_BYNAMESPACEANDRELEASESNOTIN diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/get.py deleted file mode 100644 index 971d80b5..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/get.py +++ /dev/null @@ -1,405 +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 -AppIdSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -ReleaseIdsSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'clusterName': typing.Union[ClusterNameSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - 'releaseIds': typing.Union[ReleaseIdsSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_app_id = api_client.QueryParameter( - name="appId", - style=api_client.ParameterStyle.FORM, - schema=AppIdSchema, - required=True, - explode=True, -) -request_query_cluster_name = api_client.QueryParameter( - name="clusterName", - style=api_client.ParameterStyle.FORM, - schema=ClusterNameSchema, - required=True, - explode=True, -) -request_query_namespace_name = api_client.QueryParameter( - name="namespaceName", - style=api_client.ParameterStyle.FORM, - schema=NamespaceNameSchema, - required=True, - explode=True, -) -request_query_release_ids = api_client.QueryParameter( - name="releaseIds", - style=api_client.ParameterStyle.FORM, - schema=ReleaseIdsSchema, - required=True, - explode=True, -) -# Path params -EnvSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'env': typing.Union[EnvSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_env = api_client.PathParameter( - name="env", - style=api_client.ParameterStyle.SIMPLE, - schema=EnvSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenInstanceDTO']: - return OpenInstanceDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenInstanceDTO'], typing.List['OpenInstanceDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenInstanceDTO': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_by_releases_and_namespace_not_in_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_by_releases_and_namespace_not_in_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_by_releases_and_namespace_not_in_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_by_releases_and_namespace_not_in_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 查询不在指定发布版本中的实例 (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_env, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_app_id, - request_query_cluster_name, - request_query_namespace_name, - request_query_release_ids, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetByReleasesAndNamespaceNotIn(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_by_releases_and_namespace_not_in( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_by_releases_and_namespace_not_in( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_by_releases_and_namespace_not_in( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_by_releases_and_namespace_not_in( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_by_releases_and_namespace_not_in_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_by_releases_and_namespace_not_in_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/get.pyi deleted file mode 100644 index 72c1f4b0..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/get.pyi +++ /dev/null @@ -1,397 +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 -AppIdSchema = schemas.StrSchema -ClusterNameSchema = schemas.StrSchema -NamespaceNameSchema = schemas.StrSchema -ReleaseIdsSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'appId': typing.Union[AppIdSchema, str, ], - 'clusterName': typing.Union[ClusterNameSchema, str, ], - 'namespaceName': typing.Union[NamespaceNameSchema, str, ], - 'releaseIds': typing.Union[ReleaseIdsSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_app_id = api_client.QueryParameter( - name="appId", - style=api_client.ParameterStyle.FORM, - schema=AppIdSchema, - required=True, - explode=True, -) -request_query_cluster_name = api_client.QueryParameter( - name="clusterName", - style=api_client.ParameterStyle.FORM, - schema=ClusterNameSchema, - required=True, - explode=True, -) -request_query_namespace_name = api_client.QueryParameter( - name="namespaceName", - style=api_client.ParameterStyle.FORM, - schema=NamespaceNameSchema, - required=True, - explode=True, -) -request_query_release_ids = api_client.QueryParameter( - name="releaseIds", - style=api_client.ParameterStyle.FORM, - schema=ReleaseIdsSchema, - 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, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenInstanceDTO']: - return OpenInstanceDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenInstanceDTO'], typing.List['OpenInstanceDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenInstanceDTO': - return super().__getitem__(i) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_by_releases_and_namespace_not_in_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_by_releases_and_namespace_not_in_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_by_releases_and_namespace_not_in_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_by_releases_and_namespace_not_in_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 查询不在指定发布版本中的实例 (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_env, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_app_id, - request_query_cluster_name, - request_query_namespace_name, - request_query_release_ids, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetByReleasesAndNamespaceNotIn(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_by_releases_and_namespace_not_in( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_by_releases_and_namespace_not_in( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_by_releases_and_namespace_not_in( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_by_releases_and_namespace_not_in( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_by_releases_and_namespace_not_in_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_by_releases_and_namespace_not_in_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/__init__.py deleted file mode 100644 index b45c58c1..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/__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_instances_by_release import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_ENVS_ENV_INSTANCES_BYRELEASE diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/get.py deleted file mode 100644 index 78716c6e..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/get.py +++ /dev/null @@ -1,370 +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_page_dto import OpenInstancePageDTO - -from . import path - -# Query params -ReleaseIdSchema = schemas.Int64Schema -PageSchema = schemas.IntSchema -SizeSchema = schemas.IntSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'releaseId': typing.Union[ReleaseIdSchema, decimal.Decimal, int, ], - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_release_id = api_client.QueryParameter( - name="releaseId", - style=api_client.ParameterStyle.FORM, - schema=ReleaseIdSchema, - required=True, - explode=True, -) -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - required=True, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - required=True, - explode=True, -) -# Path params -EnvSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'env': typing.Union[EnvSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_env = api_client.PathParameter( - name="env", - style=api_client.ParameterStyle.SIMPLE, - schema=EnvSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationJson = OpenInstancePageDTO - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_by_release_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_by_release_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_by_release_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_by_release_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 根据发布版本查询实例(支持分页) (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_env, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_release_id, - request_query_page, - request_query_size, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetByRelease(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_by_release( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_by_release( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_by_release( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_by_release( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_by_release_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_by_release_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/get.pyi deleted file mode 100644 index d5a7684a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_instances_by_release/get.pyi +++ /dev/null @@ -1,362 +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_page_dto import OpenInstancePageDTO - -# Query params -ReleaseIdSchema = schemas.Int64Schema -PageSchema = schemas.IntSchema -SizeSchema = schemas.IntSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'releaseId': typing.Union[ReleaseIdSchema, decimal.Decimal, int, ], - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_release_id = api_client.QueryParameter( - name="releaseId", - style=api_client.ParameterStyle.FORM, - schema=ReleaseIdSchema, - required=True, - explode=True, -) -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - required=True, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - required=True, - explode=True, -) -# Path params -EnvSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'env': typing.Union[EnvSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_env = api_client.PathParameter( - name="env", - style=api_client.ParameterStyle.SIMPLE, - schema=EnvSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = OpenInstancePageDTO - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_by_release_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _get_by_release_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _get_by_release_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _get_by_release_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 根据发布版本查询实例(支持分页) (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) - used_path = path.value - - _path_params = {} - for parameter in ( - request_path_env, - ): - parameter_data = path_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - serialized_data = parameter.serialize(parameter_data) - _path_params.update(serialized_data) - - for k, v in _path_params.items(): - used_path = used_path.replace('{%s}' % k, v) - - prefix_separator_iterator = None - for parameter in ( - request_query_release_id, - request_query_page, - request_query_size, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class GetByRelease(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_by_release( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get_by_release( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get_by_release( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get_by_release( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_by_release_oapg( - query_params=query_params, - path_params=path_params, - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForget(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def get( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def get( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._get_by_release_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_comparison/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_comparison/__init__.py deleted file mode 100644 index ca1acbec..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_comparison/__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_releases_comparison import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_ENVS_ENV_RELEASES_COMPARISON diff --git a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_comparison/get.py b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_comparison/get.py deleted file mode 100644 index 226f14de..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_comparison/get.py +++ /dev/null @@ -1,360 +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_release_diff_dto import OpenReleaseDiffDTO - -from . import path - -# Query params -BaseReleaseIdSchema = schemas.Int64Schema -ToCompareReleaseIdSchema = schemas.Int64Schema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'baseReleaseId': typing.Union[BaseReleaseIdSchema, decimal.Decimal, int, ], - 'toCompareReleaseId': typing.Union[ToCompareReleaseIdSchema, decimal.Decimal, int, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_base_release_id = api_client.QueryParameter( - name="baseReleaseId", - style=api_client.ParameterStyle.FORM, - schema=BaseReleaseIdSchema, - required=True, - explode=True, -) -request_query_to_compare_release_id = api_client.QueryParameter( - name="toCompareReleaseId", - style=api_client.ParameterStyle.FORM, - schema=ToCompareReleaseIdSchema, - required=True, - explode=True, -) -# Path params -EnvSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'env': typing.Union[EnvSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_env = api_client.PathParameter( - name="env", - style=api_client.ParameterStyle.SIMPLE, - schema=EnvSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationJson = OpenReleaseDiffDTO - - -@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_release_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 _compare_release_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 _compare_release_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 _compare_release_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, - ): - """ - Compare two releases - :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_base_release_id, - request_query_to_compare_release_id, - ): - 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 CompareRelease(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def compare_release( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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_release( - 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 compare_release( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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_release( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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_release_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._compare_release_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_comparison/get.pyi b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_comparison/get.pyi deleted file mode 100644 index 9e592671..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_comparison/get.pyi +++ /dev/null @@ -1,352 +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_release_diff_dto import OpenReleaseDiffDTO - -# Query params -BaseReleaseIdSchema = schemas.Int64Schema -ToCompareReleaseIdSchema = schemas.Int64Schema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'baseReleaseId': typing.Union[BaseReleaseIdSchema, decimal.Decimal, int, ], - 'toCompareReleaseId': typing.Union[ToCompareReleaseIdSchema, decimal.Decimal, int, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_base_release_id = api_client.QueryParameter( - name="baseReleaseId", - style=api_client.ParameterStyle.FORM, - schema=BaseReleaseIdSchema, - required=True, - explode=True, -) -request_query_to_compare_release_id = api_client.QueryParameter( - name="toCompareReleaseId", - style=api_client.ParameterStyle.FORM, - schema=ToCompareReleaseIdSchema, - required=True, - explode=True, -) -# Path params -EnvSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'env': typing.Union[EnvSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_env = api_client.PathParameter( - name="env", - style=api_client.ParameterStyle.SIMPLE, - schema=EnvSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = OpenReleaseDiffDTO - - -@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_release_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 _compare_release_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 _compare_release_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 _compare_release_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, - ): - """ - Compare two releases - :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_base_release_id, - request_query_to_compare_release_id, - ): - 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 CompareRelease(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def compare_release( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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_release( - 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 compare_release( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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_release( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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_release_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._compare_release_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/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id/__init__.py deleted file mode 100644 index bcfd370a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id/__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_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 deleted file mode 100644 index 438525f2..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id/get.py +++ /dev/null @@ -1,304 +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_release_dto import OpenReleaseDTO - -from . import path - -# 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', -] -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 deleted file mode 100644 index 5e7c3750..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id/get.pyi +++ /dev/null @@ -1,296 +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_release_dto import OpenReleaseDTO - -# 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, -) -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_rollback/__init__.py b/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/__init__.py deleted file mode 100644 index e2075ef5..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/__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_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 deleted file mode 100644 index 7b1a77a7..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/put.py +++ /dev/null @@ -1,334 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -ToReleaseIdSchema = schemas.Int64Schema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - 'toReleaseId': typing.Union[ToReleaseIdSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_to_release_id = api_client.QueryParameter( - name="toReleaseId", - style=api_client.ParameterStyle.FORM, - schema=ToReleaseIdSchema, - 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', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _rollback_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _rollback_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - 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(), - 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(), - 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, - request_query_to_release_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - 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(), - 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(), - 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(), - 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(), - 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, - 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(), - 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(), - 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(), - 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(), - 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, - 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 deleted file mode 100644 index df891c7a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_envs_env_releases_release_id_rollback/put.pyi +++ /dev/null @@ -1,326 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -ToReleaseIdSchema = schemas.Int64Schema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - 'toReleaseId': typing.Union[ToReleaseIdSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_to_release_id = api_client.QueryParameter( - name="toReleaseId", - style=api_client.ParameterStyle.FORM, - schema=ToReleaseIdSchema, - 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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _rollback_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _rollback_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - 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(), - 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(), - 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, - request_query_to_release_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - 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(), - 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(), - 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(), - 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(), - 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, - 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(), - 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(), - 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(), - 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(), - 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, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_favorites/__init__.py b/python/apollo_openapi/paths/openapi_v1_favorites/__init__.py deleted file mode 100644 index ea0818df..00000000 --- a/python/apollo_openapi/paths/openapi_v1_favorites/__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_favorites import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_FAVORITES diff --git a/python/apollo_openapi/paths/openapi_v1_favorites/get.py b/python/apollo_openapi/paths/openapi_v1_favorites/get.py deleted file mode 100644 index aee72522..00000000 --- a/python/apollo_openapi/paths/openapi_v1_favorites/get.py +++ /dev/null @@ -1,342 +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 . import path - -# Query params -UserIdSchema = schemas.StrSchema -AppIdSchema = schemas.StrSchema -PageSchema = schemas.IntSchema -SizeSchema = schemas.IntSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - 'appId': typing.Union[AppIdSchema, str, ], - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - explode=True, -) -request_query_app_id = api_client.QueryParameter( - name="appId", - style=api_client.ParameterStyle.FORM, - schema=AppIdSchema, - explode=True, -) -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - explode=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _find_favorites_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_favorites_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_favorites_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_favorites_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, - ): - """ - 查询收藏(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_user_id, - request_query_app_id, - request_query_page, - request_query_size, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FindFavorites(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_favorites( - 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_favorites( - 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_favorites( - 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_favorites( - 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_favorites_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_favorites_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_favorites/get.pyi b/python/apollo_openapi/paths/openapi_v1_favorites/get.pyi deleted file mode 100644 index f832d312..00000000 --- a/python/apollo_openapi/paths/openapi_v1_favorites/get.pyi +++ /dev/null @@ -1,334 +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 - -# Query params -UserIdSchema = schemas.StrSchema -AppIdSchema = schemas.StrSchema -PageSchema = schemas.IntSchema -SizeSchema = schemas.IntSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - 'appId': typing.Union[AppIdSchema, str, ], - 'page': typing.Union[PageSchema, decimal.Decimal, int, ], - 'size': typing.Union[SizeSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - explode=True, -) -request_query_app_id = api_client.QueryParameter( - name="appId", - style=api_client.ParameterStyle.FORM, - schema=AppIdSchema, - explode=True, -) -request_query_page = api_client.QueryParameter( - name="page", - style=api_client.ParameterStyle.FORM, - schema=PageSchema, - explode=True, -) -request_query_size = api_client.QueryParameter( - name="size", - style=api_client.ParameterStyle.FORM, - schema=SizeSchema, - explode=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _find_favorites_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_favorites_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_favorites_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_favorites_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, - ): - """ - 查询收藏(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_user_id, - request_query_app_id, - request_query_page, - request_query_size, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if accept_content_types: - for accept_content_type in accept_content_types: - _headers.add('Accept', accept_content_type) - - response = self.api_client.call_api( - resource_path=used_path, - method='get'.upper(), - headers=_headers, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class FindFavorites(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_favorites( - 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_favorites( - 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_favorites( - 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_favorites( - 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_favorites_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_favorites_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_favorites/post.py b/python/apollo_openapi/paths/openapi_v1_favorites/post.py deleted file mode 100644 index 0104955c..00000000 --- a/python/apollo_openapi/paths/openapi_v1_favorites/post.py +++ /dev/null @@ -1,333 +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 . import path - -# body param -SchemaForRequestBodyApplicationJson = schemas.DictSchema - - -request_body_body = 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), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _add_favorite_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 _add_favorite_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 _add_favorite_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 _add_favorite_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 _add_favorite_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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, - ): - """ - 添加收藏(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 - """ - 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_body.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 AddFavorite(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def add_favorite( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 add_favorite( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 add_favorite( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 add_favorite( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 add_favorite( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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._add_favorite_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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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._add_favorite_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_favorites/post.pyi b/python/apollo_openapi/paths/openapi_v1_favorites/post.pyi deleted file mode 100644 index f9142fb5..00000000 --- a/python/apollo_openapi/paths/openapi_v1_favorites/post.pyi +++ /dev/null @@ -1,325 +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 - -# body param -SchemaForRequestBodyApplicationJson = schemas.DictSchema - - -request_body_body = 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), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _add_favorite_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 _add_favorite_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 _add_favorite_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 _add_favorite_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 _add_favorite_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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, - ): - """ - 添加收藏(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 - """ - 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_body.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 AddFavorite(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def add_favorite( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 add_favorite( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 add_favorite( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 add_favorite( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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 add_favorite( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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._add_favorite_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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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._add_favorite_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_favorites_favorite_id/__init__.py b/python/apollo_openapi/paths/openapi_v1_favorites_favorite_id/__init__.py deleted file mode 100644 index 8216d438..00000000 --- a/python/apollo_openapi/paths/openapi_v1_favorites_favorite_id/__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_favorites_favorite_id import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_FAVORITES_FAVORITE_ID diff --git a/python/apollo_openapi/paths/openapi_v1_favorites_favorite_id/delete.py b/python/apollo_openapi/paths/openapi_v1_favorites_favorite_id/delete.py deleted file mode 100644 index 1ec224a5..00000000 --- a/python/apollo_openapi/paths/openapi_v1_favorites_favorite_id/delete.py +++ /dev/null @@ -1,262 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -FavoriteIdSchema = schemas.Int64Schema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'favoriteId': typing.Union[FavoriteIdSchema, decimal.Decimal, int, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_favorite_id = api_client.PathParameter( - name="favoriteId", - style=api_client.ParameterStyle.SIMPLE, - schema=FavoriteIdSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_favorite_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_favorite_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_favorite_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_favorite_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - 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_favorite_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) - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 DeleteFavorite(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_favorite( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete_favorite( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_favorite( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_favorite( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_favorite_oapg( - path_params=path_params, - 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, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_favorite_oapg( - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_favorites_favorite_id/delete.pyi b/python/apollo_openapi/paths/openapi_v1_favorites_favorite_id/delete.pyi deleted file mode 100644 index 06c91ce8..00000000 --- a/python/apollo_openapi/paths/openapi_v1_favorites_favorite_id/delete.pyi +++ /dev/null @@ -1,254 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -FavoriteIdSchema = schemas.Int64Schema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'favoriteId': typing.Union[FavoriteIdSchema, decimal.Decimal, int, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_favorite_id = api_client.PathParameter( - name="favoriteId", - style=api_client.ParameterStyle.SIMPLE, - schema=FavoriteIdSchema, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_favorite_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_favorite_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_favorite_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_favorite_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - 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_favorite_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) - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 DeleteFavorite(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_favorite( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete_favorite( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_favorite( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_favorite( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_favorite_oapg( - path_params=path_params, - 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, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_favorite_oapg( - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_favorites_favorite_id/put.py b/python/apollo_openapi/paths/openapi_v1_favorites_favorite_id/put.py deleted file mode 100644 index ad5552cb..00000000 --- a/python/apollo_openapi/paths/openapi_v1_favorites_favorite_id/put.py +++ /dev/null @@ -1,262 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -FavoriteIdSchema = schemas.Int64Schema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'favoriteId': typing.Union[FavoriteIdSchema, decimal.Decimal, int, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_favorite_id = api_client.PathParameter( - name="favoriteId", - style=api_client.ParameterStyle.SIMPLE, - schema=FavoriteIdSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _top_favorite_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _top_favorite_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _top_favorite_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _top_favorite_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - 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_favorite_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) - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - 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 TopFavorite(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def top_favorite( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def top_favorite( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def top_favorite( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def top_favorite( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._top_favorite_oapg( - path_params=path_params, - 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, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._top_favorite_oapg( - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_favorites_favorite_id/put.pyi b/python/apollo_openapi/paths/openapi_v1_favorites_favorite_id/put.pyi deleted file mode 100644 index 63f34d78..00000000 --- a/python/apollo_openapi/paths/openapi_v1_favorites_favorite_id/put.pyi +++ /dev/null @@ -1,254 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -FavoriteIdSchema = schemas.Int64Schema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'favoriteId': typing.Union[FavoriteIdSchema, decimal.Decimal, int, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_favorite_id = api_client.PathParameter( - name="favoriteId", - style=api_client.ParameterStyle.SIMPLE, - schema=FavoriteIdSchema, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _top_favorite_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _top_favorite_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _top_favorite_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _top_favorite_oapg( - self, - path_params: RequestPathParams = frozendict.frozendict(), - 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_favorite_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) - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='put'.upper(), - 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 TopFavorite(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def top_favorite( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def top_favorite( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def top_favorite( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def top_favorite( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._top_favorite_oapg( - path_params=path_params, - 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, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def put( - self, - skip_deserialization: typing_extensions.Literal[True], - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def put( - self, - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._top_favorite_oapg( - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_global_search_item_info_by_key_or_value/__init__.py b/python/apollo_openapi/paths/openapi_v1_global_search_item_info_by_key_or_value/__init__.py deleted file mode 100644 index 24f10116..00000000 --- a/python/apollo_openapi/paths/openapi_v1_global_search_item_info_by_key_or_value/__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_global_search_item_info_by_key_or_value import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_GLOBALSEARCH_ITEMINFO_BYKEYORVALUE diff --git a/python/apollo_openapi/paths/openapi_v1_global_search_item_info_by_key_or_value/get.py b/python/apollo_openapi/paths/openapi_v1_global_search_item_info_by_key_or_value/get.py deleted file mode 100644 index 764536a7..00000000 --- a/python/apollo_openapi/paths/openapi_v1_global_search_item_info_by_key_or_value/get.py +++ /dev/null @@ -1,302 +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 . import path - -# Query params -KeySchema = schemas.StrSchema -ValueSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'key': typing.Union[KeySchema, str, ], - 'value': typing.Union[ValueSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_key = api_client.QueryParameter( - name="key", - style=api_client.ParameterStyle.FORM, - schema=KeySchema, - explode=True, -) -request_query_value = api_client.QueryParameter( - name="value", - style=api_client.ParameterStyle.FORM, - schema=ValueSchema, - explode=True, -) -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _search_item_info_by_key_or_value_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 _search_item_info_by_key_or_value_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 _search_item_info_by_key_or_value_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 _search_item_info_by_key_or_value_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, - ): - """ - 按Key或Value全局搜索配置(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_key, - request_query_value, - ): - 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 SearchItemInfoByKeyOrValue(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def search_item_info_by_key_or_value( - 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 search_item_info_by_key_or_value( - 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 search_item_info_by_key_or_value( - 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 search_item_info_by_key_or_value( - 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._search_item_info_by_key_or_value_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._search_item_info_by_key_or_value_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_global_search_item_info_by_key_or_value/get.pyi b/python/apollo_openapi/paths/openapi_v1_global_search_item_info_by_key_or_value/get.pyi deleted file mode 100644 index beed6ba3..00000000 --- a/python/apollo_openapi/paths/openapi_v1_global_search_item_info_by_key_or_value/get.pyi +++ /dev/null @@ -1,294 +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 - -# Query params -KeySchema = schemas.StrSchema -ValueSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'key': typing.Union[KeySchema, str, ], - 'value': typing.Union[ValueSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_key = api_client.QueryParameter( - name="key", - style=api_client.ParameterStyle.FORM, - schema=KeySchema, - explode=True, -) -request_query_value = api_client.QueryParameter( - name="value", - style=api_client.ParameterStyle.FORM, - schema=ValueSchema, - explode=True, -) -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _search_item_info_by_key_or_value_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 _search_item_info_by_key_or_value_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 _search_item_info_by_key_or_value_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 _search_item_info_by_key_or_value_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, - ): - """ - 按Key或Value全局搜索配置(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_key, - request_query_value, - ): - 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 SearchItemInfoByKeyOrValue(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def search_item_info_by_key_or_value( - 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 search_item_info_by_key_or_value( - 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 search_item_info_by_key_or_value( - 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 search_item_info_by_key_or_value( - 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._search_item_info_by_key_or_value_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._search_item_info_by_key_or_value_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_import/__init__.py b/python/apollo_openapi/paths/openapi_v1_import/__init__.py deleted file mode 100644 index d07ffd91..00000000 --- a/python/apollo_openapi/paths/openapi_v1_import/__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_import import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_IMPORT diff --git a/python/apollo_openapi/paths/openapi_v1_import/post.py b/python/apollo_openapi/paths/openapi_v1_import/post.py deleted file mode 100644 index b71dedc6..00000000 --- a/python/apollo_openapi/paths/openapi_v1_import/post.py +++ /dev/null @@ -1,416 +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 . import path - -# Query params -EnvsSchema = schemas.StrSchema -ConflictActionSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'envs': typing.Union[EnvsSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'conflictAction': typing.Union[ConflictActionSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_envs = api_client.QueryParameter( - name="envs", - style=api_client.ParameterStyle.FORM, - schema=EnvsSchema, - required=True, - explode=True, -) -request_query_conflict_action = api_client.QueryParameter( - name="conflictAction", - style=api_client.ParameterStyle.FORM, - schema=ConflictActionSchema, - explode=True, -) -# body param - - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - file = schemas.BinarySchema - __annotations__ = { - "file": file, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["file"]) -> MetaOapg.properties.file: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["file", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["file"]) -> typing.Union[MetaOapg.properties.file, 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["file", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - file: typing.Union[MetaOapg.properties.file, bytes, io.FileIO, io.BufferedReader, 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], - ) -> 'SchemaForRequestBodyMultipartFormData': - return super().__new__( - cls, - *_args, - file=file, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _import_config_oapg( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _import_config_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _import_config_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _import_config_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _import_config_oapg( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - 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) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_envs, - request_query_conflict_action, - ): - 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 - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.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 ImportConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def import_config( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def import_config( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def import_config( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def import_config( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def import_config( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._import_config_oapg( - body=body, - query_params=query_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._import_config_oapg( - body=body, - query_params=query_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_import/post.pyi b/python/apollo_openapi/paths/openapi_v1_import/post.pyi deleted file mode 100644 index e5f95d30..00000000 --- a/python/apollo_openapi/paths/openapi_v1_import/post.pyi +++ /dev/null @@ -1,408 +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 - -# Query params -EnvsSchema = schemas.StrSchema -ConflictActionSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'envs': typing.Union[EnvsSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'conflictAction': typing.Union[ConflictActionSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_envs = api_client.QueryParameter( - name="envs", - style=api_client.ParameterStyle.FORM, - schema=EnvsSchema, - required=True, - explode=True, -) -request_query_conflict_action = api_client.QueryParameter( - name="conflictAction", - style=api_client.ParameterStyle.FORM, - schema=ConflictActionSchema, - explode=True, -) -# body param - - -class SchemaForRequestBodyMultipartFormData( - schemas.DictSchema -): - - - class MetaOapg: - - class properties: - file = schemas.BinarySchema - __annotations__ = { - "file": file, - } - - @typing.overload - def __getitem__(self, name: typing_extensions.Literal["file"]) -> MetaOapg.properties.file: ... - - @typing.overload - def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - - def __getitem__(self, name: typing.Union[typing_extensions.Literal["file", ], str]): - # dict_instance[name] accessor - return super().__getitem__(name) - - - @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["file"]) -> typing.Union[MetaOapg.properties.file, 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["file", ], str]): - return super().get_item_oapg(name) - - - def __new__( - cls, - *_args: typing.Union[dict, frozendict.frozendict, ], - file: typing.Union[MetaOapg.properties.file, bytes, io.FileIO, io.BufferedReader, 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], - ) -> 'SchemaForRequestBodyMultipartFormData': - return super().__new__( - cls, - *_args, - file=file, - _configuration=_configuration, - **kwargs, - ) - - -request_body_body = api_client.RequestBody( - content={ - 'multipart/form-data': api_client.MediaType( - schema=SchemaForRequestBodyMultipartFormData), - }, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _import_config_oapg( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _import_config_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _import_config_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _import_config_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _import_config_oapg( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - 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) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_envs, - request_query_conflict_action, - ): - 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 - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_body.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 ImportConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def import_config( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def import_config( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def import_config( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def import_config( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def import_config( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._import_config_oapg( - body=body, - query_params=query_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["multipart/form-data"] = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'multipart/form-data', - body: typing.Union[SchemaForRequestBodyMultipartFormData, dict, frozendict.frozendict, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._import_config_oapg( - body=body, - query_params=query_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_namespaces/__init__.py b/python/apollo_openapi/paths/openapi_v1_namespaces/__init__.py deleted file mode 100644 index e0f1bd3f..00000000 --- a/python/apollo_openapi/paths/openapi_v1_namespaces/__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_namespaces import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_NAMESPACES diff --git a/python/apollo_openapi/paths/openapi_v1_namespaces/post.py b/python/apollo_openapi/paths/openapi_v1_namespaces/post.py deleted file mode 100644 index d7b9acaa..00000000 --- a/python/apollo_openapi/paths/openapi_v1_namespaces/post.py +++ /dev/null @@ -1,387 +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_create_namespace_dto import OpenCreateNamespaceDTO - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenCreateNamespaceDTO']: - return OpenCreateNamespaceDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenCreateNamespaceDTO'], typing.List['OpenCreateNamespaceDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenCreateNamespaceDTO': - return super().__getitem__(i) - - -request_body_open_create_namespace_dto = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _create_namespaces_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _create_namespaces_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _create_namespaces_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_namespaces_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_namespaces_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 创建Namespace (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_operator, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_open_create_namespace_dto.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateNamespaces(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_namespaces( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def create_namespaces( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def create_namespaces( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_namespaces( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_namespaces( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_namespaces_oapg( - body=body, - query_params=query_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_namespaces_oapg( - body=body, - query_params=query_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_namespaces/post.pyi b/python/apollo_openapi/paths/openapi_v1_namespaces/post.pyi deleted file mode 100644 index 58cf02c1..00000000 --- a/python/apollo_openapi/paths/openapi_v1_namespaces/post.pyi +++ /dev/null @@ -1,379 +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_create_namespace_dto import OpenCreateNamespaceDTO - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenCreateNamespaceDTO']: - return OpenCreateNamespaceDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenCreateNamespaceDTO'], typing.List['OpenCreateNamespaceDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenCreateNamespaceDTO': - return super().__getitem__(i) - - -request_body_open_create_namespace_dto = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_namespaces_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _create_namespaces_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _create_namespaces_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _create_namespaces_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _create_namespaces_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 创建Namespace (new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_operator, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - if body is schemas.unset: - raise exceptions.ApiValueError( - 'The required body parameter has an invalid value of: unset. Set a valid value instead') - _fields = None - _body = None - serialized_data = request_body_open_create_namespace_dto.serialize(body, content_type) - _headers.add('Content-Type', content_type) - if 'fields' in serialized_data: - _fields = serialized_data['fields'] - elif 'body' in serialized_data: - _body = serialized_data['body'] - response = self.api_client.call_api( - resource_path=used_path, - method='post'.upper(), - headers=_headers, - fields=_fields, - body=_body, - auth_settings=_auth, - stream=stream, - timeout=timeout, - ) - - if skip_deserialization: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - else: - response_for_status = _status_code_to_response.get(str(response.status)) - if response_for_status: - api_response = response_for_status.deserialize(response, self.api_client.configuration) - else: - api_response = api_client.ApiResponseWithoutDeserialization(response=response) - - if not 200 <= response.status <= 299: - raise exceptions.ApiException( - status=response.status, - reason=response.reason, - api_response=api_response - ) - - return api_response - - -class CreateNamespaces(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_namespaces( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def create_namespaces( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def create_namespaces( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def create_namespaces( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def create_namespaces( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_namespaces_oapg( - body=body, - query_params=query_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: typing_extensions.Literal["application/json"] = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = ..., - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,list, tuple, ], - content_type: str = 'application/json', - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._create_namespaces_oapg( - body=body, - query_params=query_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_organizations/__init__.py b/python/apollo_openapi/paths/openapi_v1_organizations/__init__.py deleted file mode 100644 index 5dbe4893..00000000 --- a/python/apollo_openapi/paths/openapi_v1_organizations/__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_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 deleted file mode 100644 index 62b8c7fa..00000000 --- a/python/apollo_openapi/paths/openapi_v1_organizations/get.py +++ /dev/null @@ -1,287 +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.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), - }, -) -SchemaFor401ResponseBodyApplicationJson = ExceptionResponse - - -@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 deleted file mode 100644 index 69189a92..00000000 --- a/python/apollo_openapi/paths/openapi_v1_organizations/get.pyi +++ /dev/null @@ -1,278 +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.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), - }, -) -SchemaFor401ResponseBodyApplicationJson = ExceptionResponse - - -@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/paths/openapi_v1_page_settings/__init__.py b/python/apollo_openapi/paths/openapi_v1_page_settings/__init__.py deleted file mode 100644 index 0965fe15..00000000 --- a/python/apollo_openapi/paths/openapi_v1_page_settings/__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_page_settings import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_PAGESETTINGS diff --git a/python/apollo_openapi/paths/openapi_v1_page_settings/get.py b/python/apollo_openapi/paths/openapi_v1_page_settings/get.py deleted file mode 100644 index ea88dacd..00000000 --- a/python/apollo_openapi/paths/openapi_v1_page_settings/get.py +++ /dev/null @@ -1,239 +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 . import path - -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_page_settings_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_page_settings_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_page_settings_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_page_settings_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, - ): - """ - 获取Portal页面配置(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 - """ - 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 GetPageSettings(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_page_settings( - 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_page_settings( - 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_page_settings( - 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_page_settings( - 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_page_settings_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_page_settings_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_page_settings/get.pyi b/python/apollo_openapi/paths/openapi_v1_page_settings/get.pyi deleted file mode 100644 index c40f0c6b..00000000 --- a/python/apollo_openapi/paths/openapi_v1_page_settings/get.pyi +++ /dev/null @@ -1,231 +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 - -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_page_settings_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_page_settings_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_page_settings_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_page_settings_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, - ): - """ - 获取Portal页面配置(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 - """ - 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 GetPageSettings(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_page_settings( - 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_page_settings( - 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_page_settings( - 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_page_settings( - 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_page_settings_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_page_settings_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_permissions_root/__init__.py b/python/apollo_openapi/paths/openapi_v1_permissions_root/__init__.py deleted file mode 100644 index 76bd6b5c..00000000 --- a/python/apollo_openapi/paths/openapi_v1_permissions_root/__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_permissions_root import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_PERMISSIONS_ROOT diff --git a/python/apollo_openapi/paths/openapi_v1_permissions_root/get.py b/python/apollo_openapi/paths/openapi_v1_permissions_root/get.py deleted file mode 100644 index 867c37b4..00000000 --- a/python/apollo_openapi/paths/openapi_v1_permissions_root/get.py +++ /dev/null @@ -1,296 +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_permission_condition_dto import OpenPermissionConditionDTO - -from . import path - -# Query params -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationJson = OpenPermissionConditionDTO - - -@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 _has_root_permission_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 _has_root_permission_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 _has_root_permission_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 _has_root_permission_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, - ): - """ - 校验Root权限 (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_user_id, - ): - 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 HasRootPermission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def has_root_permission( - 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 has_root_permission( - 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 has_root_permission( - 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 has_root_permission( - 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._has_root_permission_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._has_root_permission_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_permissions_root/get.pyi b/python/apollo_openapi/paths/openapi_v1_permissions_root/get.pyi deleted file mode 100644 index 1f9ffd6a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_permissions_root/get.pyi +++ /dev/null @@ -1,288 +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_permission_condition_dto import OpenPermissionConditionDTO - -# Query params -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -SchemaFor200ResponseBodyApplicationJson = OpenPermissionConditionDTO - - -@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 _has_root_permission_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 _has_root_permission_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 _has_root_permission_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 _has_root_permission_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, - ): - """ - 校验Root权限 (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_user_id, - ): - 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 HasRootPermission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def has_root_permission( - 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 has_root_permission( - 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 has_root_permission( - 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 has_root_permission( - 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._has_root_permission_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._has_root_permission_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_server_envs_env_config_db_config/__init__.py b/python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config/__init__.py deleted file mode 100644 index c45d61de..00000000 --- a/python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config/__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_server_envs_env_config_db_config import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_SERVER_ENVS_ENV_CONFIGDB_CONFIG diff --git a/python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config/delete.py b/python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config/delete.py deleted file mode 100644 index 915bbffc..00000000 --- a/python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config/delete.py +++ /dev/null @@ -1,327 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -KeySchema = schemas.StrSchema -ClusterSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'key': typing.Union[KeySchema, str, ], - 'cluster': typing.Union[ClusterSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_key = api_client.QueryParameter( - name="key", - style=api_client.ParameterStyle.FORM, - schema=KeySchema, - required=True, - explode=True, -) -request_query_cluster = api_client.QueryParameter( - name="cluster", - style=api_client.ParameterStyle.FORM, - schema=ClusterSchema, - required=True, - explode=True, -) -# Path params -EnvSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'env': typing.Union[EnvSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_env = api_client.PathParameter( - name="env", - style=api_client.ParameterStyle.SIMPLE, - schema=EnvSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_config_db_config_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_config_db_config_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_config_db_config_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_config_db_config_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 删除Config DB配置(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_key, - request_query_cluster, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 DeleteConfigDbConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_config_db_config( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete_config_db_config( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_config_db_config( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_config_db_config( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_config_db_config_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_config_db_config_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config/delete.pyi b/python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config/delete.pyi deleted file mode 100644 index 3d897207..00000000 --- a/python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config/delete.pyi +++ /dev/null @@ -1,319 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -KeySchema = schemas.StrSchema -ClusterSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'key': typing.Union[KeySchema, str, ], - 'cluster': typing.Union[ClusterSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_key = api_client.QueryParameter( - name="key", - style=api_client.ParameterStyle.FORM, - schema=KeySchema, - required=True, - explode=True, -) -request_query_cluster = api_client.QueryParameter( - name="cluster", - style=api_client.ParameterStyle.FORM, - schema=ClusterSchema, - 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, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_config_db_config_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_config_db_config_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_config_db_config_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_config_db_config_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 删除Config DB配置(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_key, - request_query_cluster, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 DeleteConfigDbConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_config_db_config( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete_config_db_config( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_config_db_config( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_config_db_config( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - path_params: RequestPathParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_config_db_config_oapg( - query_params=query_params, - path_params=path_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_config_db_config_oapg( - query_params=query_params, - path_params=path_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config/post.py b/python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config/post.py deleted file mode 100644 index b185b7cf..00000000 --- a/python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config/post.py +++ /dev/null @@ -1,390 +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 . import path - -# 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 = schemas.DictSchema - - -request_body_body = 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), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_or_update_config_db_config_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_config_db_config_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_config_db_config_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_config_db_config_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_config_db_config_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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, - ): - """ - 创建或更新Config DB配置(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, - ): - 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_body.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 CreateOrUpdateConfigDbConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_or_update_config_db_config( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_config_db_config( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_config_db_config( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_config_db_config( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_config_db_config( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_config_db_config_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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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_or_update_config_db_config_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_server_envs_env_config_db_config/post.pyi b/python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config/post.pyi deleted file mode 100644 index 96c7f95f..00000000 --- a/python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config/post.pyi +++ /dev/null @@ -1,382 +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 - -# 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 = schemas.DictSchema - - -request_body_body = 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), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_or_update_config_db_config_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_config_db_config_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_config_db_config_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_config_db_config_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_config_db_config_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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, - ): - """ - 创建或更新Config DB配置(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, - ): - 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_body.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 CreateOrUpdateConfigDbConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_or_update_config_db_config( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_config_db_config( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_config_db_config( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_config_db_config( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_config_db_config( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_config_db_config_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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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_or_update_config_db_config_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_server_envs_env_config_db_config_find_all_config/__init__.py b/python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config_find_all_config/__init__.py deleted file mode 100644 index 47c8a0b1..00000000 --- a/python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config_find_all_config/__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_server_envs_env_config_db_config_find_all_config import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_SERVER_ENVS_ENV_CONFIGDB_CONFIG_FINDALLCONFIG diff --git a/python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config_find_all_config/get.py b/python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config_find_all_config/get.py deleted file mode 100644 index e10fb40c..00000000 --- a/python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config_find_all_config/get.py +++ /dev/null @@ -1,315 +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 . import path - -# Path params -EnvSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'env': typing.Union[EnvSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_env = api_client.PathParameter( - name="env", - style=api_client.ParameterStyle.SIMPLE, - schema=EnvSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _find_all_config_db_config_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_all_config_db_config_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_all_config_db_config_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_all_config_db_config_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, - ): - """ - 查询指定环境全部Config DB配置(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, - ): - 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 FindAllConfigDbConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_all_config_db_config( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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_config_db_config( - 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_all_config_db_config( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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_config_db_config( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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_config_db_config_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_all_config_db_config_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_server_envs_env_config_db_config_find_all_config/get.pyi b/python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config_find_all_config/get.pyi deleted file mode 100644 index ed6189af..00000000 --- a/python/apollo_openapi/paths/openapi_v1_server_envs_env_config_db_config_find_all_config/get.pyi +++ /dev/null @@ -1,307 +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 - -# Path params -EnvSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'env': typing.Union[EnvSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_env = api_client.PathParameter( - name="env", - style=api_client.ParameterStyle.SIMPLE, - schema=EnvSchema, - required=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _find_all_config_db_config_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_all_config_db_config_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_all_config_db_config_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_all_config_db_config_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, - ): - """ - 查询指定环境全部Config DB配置(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, - ): - 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 FindAllConfigDbConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_all_config_db_config( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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_config_db_config( - 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_all_config_db_config( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.Tuple[str] = _all_accept_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_config_db_config( - self, - path_params: RequestPathParams = frozendict.frozendict(), - accept_content_types: typing.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_config_db_config_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_all_config_db_config_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_server_portal_db_config/__init__.py b/python/apollo_openapi/paths/openapi_v1_server_portal_db_config/__init__.py deleted file mode 100644 index ef658900..00000000 --- a/python/apollo_openapi/paths/openapi_v1_server_portal_db_config/__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_server_portal_db_config import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_SERVER_PORTALDB_CONFIG diff --git a/python/apollo_openapi/paths/openapi_v1_server_portal_db_config/delete.py b/python/apollo_openapi/paths/openapi_v1_server_portal_db_config/delete.py deleted file mode 100644 index 04c42f19..00000000 --- a/python/apollo_openapi/paths/openapi_v1_server_portal_db_config/delete.py +++ /dev/null @@ -1,263 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -KeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'key': typing.Union[KeySchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_key = api_client.QueryParameter( - name="key", - style=api_client.ParameterStyle.FORM, - schema=KeySchema, - required=True, - explode=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_portal_db_config_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_portal_db_config_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_portal_db_config_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_portal_db_config_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 删除Portal DB配置(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_key, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 DeletePortalDbConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_portal_db_config( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete_portal_db_config( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_portal_db_config( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_portal_db_config( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_portal_db_config_oapg( - query_params=query_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_portal_db_config_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_server_portal_db_config/delete.pyi b/python/apollo_openapi/paths/openapi_v1_server_portal_db_config/delete.pyi deleted file mode 100644 index f8c5c2dc..00000000 --- a/python/apollo_openapi/paths/openapi_v1_server_portal_db_config/delete.pyi +++ /dev/null @@ -1,255 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -KeySchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'key': typing.Union[KeySchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_key = api_client.QueryParameter( - name="key", - style=api_client.ParameterStyle.FORM, - schema=KeySchema, - required=True, - explode=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_portal_db_config_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_portal_db_config_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_portal_db_config_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_portal_db_config_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - """ - 删除Portal DB配置(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_key, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 DeletePortalDbConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_portal_db_config( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete_portal_db_config( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_portal_db_config( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_portal_db_config( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_portal_db_config_oapg( - query_params=query_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_portal_db_config_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_server_portal_db_config/post.py b/python/apollo_openapi/paths/openapi_v1_server_portal_db_config/post.py deleted file mode 100644 index 2e5e4149..00000000 --- a/python/apollo_openapi/paths/openapi_v1_server_portal_db_config/post.py +++ /dev/null @@ -1,333 +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 . import path - -# body param -SchemaForRequestBodyApplicationJson = schemas.DictSchema - - -request_body_body = 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), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_or_update_portal_db_config_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_portal_db_config_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_portal_db_config_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_portal_db_config_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_portal_db_config_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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, - ): - """ - 创建或更新Portal DB配置(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 - """ - 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_body.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 CreateOrUpdatePortalDbConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_or_update_portal_db_config( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_portal_db_config( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_portal_db_config( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_portal_db_config( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_portal_db_config( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_portal_db_config_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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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_or_update_portal_db_config_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_server_portal_db_config/post.pyi b/python/apollo_openapi/paths/openapi_v1_server_portal_db_config/post.pyi deleted file mode 100644 index c00550fa..00000000 --- a/python/apollo_openapi/paths/openapi_v1_server_portal_db_config/post.pyi +++ /dev/null @@ -1,325 +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 - -# body param -SchemaForRequestBodyApplicationJson = schemas.DictSchema - - -request_body_body = 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), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _create_or_update_portal_db_config_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_portal_db_config_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_portal_db_config_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_portal_db_config_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_portal_db_config_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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, - ): - """ - 创建或更新Portal DB配置(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 - """ - 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_body.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 CreateOrUpdatePortalDbConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_or_update_portal_db_config( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_portal_db_config( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_portal_db_config( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_portal_db_config( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_portal_db_config( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,dict, frozendict.frozendict, ], - 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_or_update_portal_db_config_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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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,dict, frozendict.frozendict, ], - 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_or_update_portal_db_config_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_server_portal_db_config_find_all_config/__init__.py b/python/apollo_openapi/paths/openapi_v1_server_portal_db_config_find_all_config/__init__.py deleted file mode 100644 index b7bc0f3e..00000000 --- a/python/apollo_openapi/paths/openapi_v1_server_portal_db_config_find_all_config/__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_server_portal_db_config_find_all_config import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_SERVER_PORTALDB_CONFIG_FINDALLCONFIG diff --git a/python/apollo_openapi/paths/openapi_v1_server_portal_db_config_find_all_config/get.py b/python/apollo_openapi/paths/openapi_v1_server_portal_db_config_find_all_config/get.py deleted file mode 100644 index b8f341e4..00000000 --- a/python/apollo_openapi/paths/openapi_v1_server_portal_db_config_find_all_config/get.py +++ /dev/null @@ -1,261 +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 . import path - -_auth = [ - 'ApiKeyAuth', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _find_all_portal_db_config_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_all_portal_db_config_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_all_portal_db_config_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_all_portal_db_config_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, - ): - """ - 查询全部Portal DB配置(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 - """ - 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 FindAllPortalDbConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_all_portal_db_config( - 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_all_portal_db_config( - 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_all_portal_db_config( - 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_all_portal_db_config( - 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_all_portal_db_config_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_all_portal_db_config_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_server_portal_db_config_find_all_config/get.pyi b/python/apollo_openapi/paths/openapi_v1_server_portal_db_config_find_all_config/get.pyi deleted file mode 100644 index f610344e..00000000 --- a/python/apollo_openapi/paths/openapi_v1_server_portal_db_config_find_all_config/get.pyi +++ /dev/null @@ -1,253 +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 - - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - items = schemas.DictSchema - - def __new__( - cls, - _arg: typing.Union[typing.Tuple[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]], typing.List[typing.Union[MetaOapg.items, dict, frozendict.frozendict, ]]], - _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 _find_all_portal_db_config_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_all_portal_db_config_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_all_portal_db_config_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_all_portal_db_config_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, - ): - """ - 查询全部Portal DB配置(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 - """ - 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 FindAllPortalDbConfig(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def find_all_portal_db_config( - 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_all_portal_db_config( - 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_all_portal_db_config( - 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_all_portal_db_config( - 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_all_portal_db_config_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_all_portal_db_config_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_system_info/__init__.py b/python/apollo_openapi/paths/openapi_v1_system_info/__init__.py deleted file mode 100644 index 1a2d87b5..00000000 --- a/python/apollo_openapi/paths/openapi_v1_system_info/__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_system_info import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_SYSTEMINFO diff --git a/python/apollo_openapi/paths/openapi_v1_system_info/get.py b/python/apollo_openapi/paths/openapi_v1_system_info/get.py deleted file mode 100644 index eadfa808..00000000 --- a/python/apollo_openapi/paths/openapi_v1_system_info/get.py +++ /dev/null @@ -1,239 +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 . import path - -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_system_info_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_system_info_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_system_info_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_system_info_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, - ): - """ - 获取系统信息(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 - """ - 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 GetSystemInfo(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_system_info( - 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_system_info( - 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_system_info( - 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_system_info( - 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_system_info_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_system_info_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_system_info/get.pyi b/python/apollo_openapi/paths/openapi_v1_system_info/get.pyi deleted file mode 100644 index c9510ea7..00000000 --- a/python/apollo_openapi/paths/openapi_v1_system_info/get.pyi +++ /dev/null @@ -1,231 +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 - -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_system_info_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_system_info_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_system_info_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_system_info_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, - ): - """ - 获取系统信息(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 - """ - 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 GetSystemInfo(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_system_info( - 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_system_info( - 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_system_info( - 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_system_info( - 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_system_info_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_system_info_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_system_info_health/__init__.py b/python/apollo_openapi/paths/openapi_v1_system_info_health/__init__.py deleted file mode 100644 index c5c04a25..00000000 --- a/python/apollo_openapi/paths/openapi_v1_system_info_health/__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_system_info_health import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_SYSTEMINFO_HEALTH diff --git a/python/apollo_openapi/paths/openapi_v1_system_info_health/get.py b/python/apollo_openapi/paths/openapi_v1_system_info_health/get.py deleted file mode 100644 index 590a2fdf..00000000 --- a/python/apollo_openapi/paths/openapi_v1_system_info_health/get.py +++ /dev/null @@ -1,294 +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 . import path - -# Query params -InstanceIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'instanceId': typing.Union[InstanceIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_instance_id = api_client.QueryParameter( - name="instanceId", - style=api_client.ParameterStyle.FORM, - schema=InstanceIdSchema, - required=True, - explode=True, -) -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_status_code_to_response = { - '200': _response_for_200, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _check_system_health_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 _check_system_health_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 _check_system_health_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 _check_system_health_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, - ): - """ - 检查系统实例健康状态(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_instance_id, - ): - 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 CheckSystemHealth(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def check_system_health( - 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 check_system_health( - 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 check_system_health( - 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 check_system_health( - 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._check_system_health_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._check_system_health_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_system_info_health/get.pyi b/python/apollo_openapi/paths/openapi_v1_system_info_health/get.pyi deleted file mode 100644 index 4a4249de..00000000 --- a/python/apollo_openapi/paths/openapi_v1_system_info_health/get.pyi +++ /dev/null @@ -1,286 +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 - -# Query params -InstanceIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'instanceId': typing.Union[InstanceIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_instance_id = api_client.QueryParameter( - name="instanceId", - style=api_client.ParameterStyle.FORM, - schema=InstanceIdSchema, - required=True, - explode=True, -) -SchemaFor200ResponseBodyApplicationJson = schemas.DictSchema - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[ - SchemaFor200ResponseBodyApplicationJson, - ] - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, - content={ - 'application/json': api_client.MediaType( - schema=SchemaFor200ResponseBodyApplicationJson), - }, -) -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _check_system_health_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 _check_system_health_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 _check_system_health_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 _check_system_health_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, - ): - """ - 检查系统实例健康状态(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_instance_id, - ): - 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 CheckSystemHealth(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def check_system_health( - 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 check_system_health( - 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 check_system_health( - 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 check_system_health( - 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._check_system_health_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._check_system_health_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_system_role_manage_app_master/__init__.py b/python/apollo_openapi/paths/openapi_v1_system_role_manage_app_master/__init__.py deleted file mode 100644 index a815914d..00000000 --- a/python/apollo_openapi/paths/openapi_v1_system_role_manage_app_master/__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_system_role_manage_app_master import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_SYSTEM_ROLE_MANAGEAPPMASTER diff --git a/python/apollo_openapi/paths/openapi_v1_system_role_manage_app_master/get.py b/python/apollo_openapi/paths/openapi_v1_system_role_manage_app_master/get.py deleted file mode 100644 index d5c916c7..00000000 --- a/python/apollo_openapi/paths/openapi_v1_system_role_manage_app_master/get.py +++ /dev/null @@ -1,267 +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 . import path - -_auth = [ - 'ApiKeyAuth', -] - - -class SchemaFor200ResponseBodyApplicationJson( - 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, ], - ) -> '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 _is_manage_app_master_permission_enabled_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 _is_manage_app_master_permission_enabled_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 _is_manage_app_master_permission_enabled_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 _is_manage_app_master_permission_enabled_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, - ): - """ - 校验AppMaster开关 (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 - """ - 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 IsManageAppMasterPermissionEnabled(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def is_manage_app_master_permission_enabled( - 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 is_manage_app_master_permission_enabled( - 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 is_manage_app_master_permission_enabled( - 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 is_manage_app_master_permission_enabled( - 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._is_manage_app_master_permission_enabled_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._is_manage_app_master_permission_enabled_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_system_role_manage_app_master/get.pyi b/python/apollo_openapi/paths/openapi_v1_system_role_manage_app_master/get.pyi deleted file mode 100644 index d95f80fd..00000000 --- a/python/apollo_openapi/paths/openapi_v1_system_role_manage_app_master/get.pyi +++ /dev/null @@ -1,259 +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 - - - -class SchemaFor200ResponseBodyApplicationJson( - 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, ], - ) -> '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 _is_manage_app_master_permission_enabled_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 _is_manage_app_master_permission_enabled_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 _is_manage_app_master_permission_enabled_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 _is_manage_app_master_permission_enabled_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, - ): - """ - 校验AppMaster开关 (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 - """ - 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 IsManageAppMasterPermissionEnabled(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def is_manage_app_master_permission_enabled( - 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 is_manage_app_master_permission_enabled( - 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 is_manage_app_master_permission_enabled( - 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 is_manage_app_master_permission_enabled( - 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._is_manage_app_master_permission_enabled_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._is_manage_app_master_permission_enabled_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_system_roles_create_application/__init__.py b/python/apollo_openapi/paths/openapi_v1_system_roles_create_application/__init__.py deleted file mode 100644 index ae847b88..00000000 --- a/python/apollo_openapi/paths/openapi_v1_system_roles_create_application/__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_system_roles_create_application import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_SYSTEM_ROLES_CREATEAPPLICATION diff --git a/python/apollo_openapi/paths/openapi_v1_system_roles_create_application/delete.py b/python/apollo_openapi/paths/openapi_v1_system_roles_create_application/delete.py deleted file mode 100644 index 3eb46e76..00000000 --- a/python/apollo_openapi/paths/openapi_v1_system_roles_create_application/delete.py +++ /dev/null @@ -1,272 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_create_application_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_create_application_role_from_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_create_application_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_create_application_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - 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) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_operator, - request_query_user_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 DeleteCreateApplicationRoleFromUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_create_application_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete_create_application_role_from_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_create_application_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_create_application_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_create_application_role_from_user_oapg( - query_params=query_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_create_application_role_from_user_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_system_roles_create_application/delete.pyi b/python/apollo_openapi/paths/openapi_v1_system_roles_create_application/delete.pyi deleted file mode 100644 index 6c00a6b7..00000000 --- a/python/apollo_openapi/paths/openapi_v1_system_roles_create_application/delete.pyi +++ /dev/null @@ -1,264 +0,0 @@ -# coding: utf-8 - -""" - - - Generated by: https://openapi-generator.tech -""" - -from dataclasses import dataclass -import typing_extensions -import urllib3 - -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 -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _delete_create_application_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _delete_create_application_role_from_user_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _delete_create_application_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _delete_create_application_role_from_user_oapg( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - 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) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_operator, - request_query_user_id, - ): - 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 - # TODO add cookie handling - - response = self.api_client.call_api( - resource_path=used_path, - method='delete'.upper(), - 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 DeleteCreateApplicationRoleFromUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def delete_create_application_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def delete_create_application_role_from_user( - self, - skip_deserialization: typing_extensions.Literal[True], - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def delete_create_application_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def delete_create_application_role_from_user( - self, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_create_application_role_from_user_oapg( - query_params=query_params, - 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(), - 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(), - 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(), - 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(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._delete_create_application_role_from_user_oapg( - query_params=query_params, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_system_roles_create_application/get.py b/python/apollo_openapi/paths/openapi_v1_system_roles_create_application/get.py deleted file mode 100644 index be01a039..00000000 --- a/python/apollo_openapi/paths/openapi_v1_system_roles_create_application/get.py +++ /dev/null @@ -1,322 +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 . import path - -# Query params -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -class SchemaFor200ResponseBodyApplicationJson( - 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, ], - ) -> '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 _has_create_application_permission_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 _has_create_application_permission_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 _has_create_application_permission_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 _has_create_application_permission_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, - ): - """ - 校验建应用权限 (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_user_id, - ): - 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 HasCreateApplicationPermission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def has_create_application_permission( - 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 has_create_application_permission( - 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 has_create_application_permission( - 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 has_create_application_permission( - 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._has_create_application_permission_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._has_create_application_permission_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_system_roles_create_application/get.pyi b/python/apollo_openapi/paths/openapi_v1_system_roles_create_application/get.pyi deleted file mode 100644 index 6d37abc3..00000000 --- a/python/apollo_openapi/paths/openapi_v1_system_roles_create_application/get.pyi +++ /dev/null @@ -1,314 +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 - -# Query params -UserIdSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_user_id = api_client.QueryParameter( - name="userId", - style=api_client.ParameterStyle.FORM, - schema=UserIdSchema, - required=True, - explode=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - 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, ], - ) -> '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 _has_create_application_permission_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 _has_create_application_permission_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 _has_create_application_permission_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 _has_create_application_permission_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, - ): - """ - 校验建应用权限 (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_user_id, - ): - 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 HasCreateApplicationPermission(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def has_create_application_permission( - 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 has_create_application_permission( - 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 has_create_application_permission( - 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 has_create_application_permission( - 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._has_create_application_permission_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._has_create_application_permission_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_system_roles_create_application/post.py b/python/apollo_openapi/paths/openapi_v1_system_roles_create_application/post.py deleted file mode 100644 index edfe78c2..00000000 --- a/python/apollo_openapi/paths/openapi_v1_system_roles_create_application/post.py +++ /dev/null @@ -1,379 +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 . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - 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, - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -request_body_request_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -_status_code_to_response = { - '200': _response_for_200, -} - - -class BaseApi(api_client.Api): - @typing.overload - def _add_create_application_role_to_users_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _add_create_application_role_to_users_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _add_create_application_role_to_users_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _add_create_application_role_to_users_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _add_create_application_role_to_users_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - 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) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_operator, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_request_body.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 AddCreateApplicationRoleToUsers(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def add_create_application_role_to_users( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def add_create_application_role_to_users( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def add_create_application_role_to_users( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def add_create_application_role_to_users( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def add_create_application_role_to_users( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_create_application_role_to_users_oapg( - body=body, - query_params=query_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_create_application_role_to_users_oapg( - body=body, - query_params=query_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_system_roles_create_application/post.pyi b/python/apollo_openapi/paths/openapi_v1_system_roles_create_application/post.pyi deleted file mode 100644 index f447a5d5..00000000 --- a/python/apollo_openapi/paths/openapi_v1_system_roles_create_application/post.pyi +++ /dev/null @@ -1,371 +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 - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# body param - - -class SchemaForRequestBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - 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, - ) -> 'SchemaForRequestBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> MetaOapg.items: - return super().__getitem__(i) - - -request_body_request_body = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) - - -class BaseApi(api_client.Api): - @typing.overload - def _add_create_application_role_to_users_oapg( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def _add_create_application_role_to_users_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def _add_create_application_role_to_users_oapg( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def _add_create_application_role_to_users_oapg( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def _add_create_application_role_to_users_oapg( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - 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) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_operator, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - - _fields = None - _body = None - if body is not schemas.unset: - serialized_data = request_body_request_body.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 AddCreateApplicationRoleToUsers(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def add_create_application_role_to_users( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def add_create_application_role_to_users( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def add_create_application_role_to_users( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def add_create_application_role_to_users( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def add_create_application_role_to_users( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_create_application_role_to_users_oapg( - body=body, - query_params=query_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) - - -class ApiForpost(BaseApi): - # this class is used by api classes that refer to endpoints by path and http method names - - @typing.overload - def post( - self, - content_type: typing_extensions.Literal["application/json"] = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: typing_extensions.Literal[False] = ..., - ) -> typing.Union[ - ApiResponseFor200, - ]: ... - - - @typing.overload - def post( - self, - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - ) -> api_client.ApiResponseWithoutDeserialization: ... - - @typing.overload - def post( - self, - content_type: str = ..., - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = ..., - ) -> typing.Union[ - ApiResponseFor200, - api_client.ApiResponseWithoutDeserialization, - ]: ... - - def post( - self, - content_type: str = 'application/json', - body: typing.Union[SchemaForRequestBodyApplicationJson, list, tuple, schemas.Unset] = schemas.unset, - query_params: RequestQueryParams = frozendict.frozendict(), - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._add_create_application_role_to_users_oapg( - body=body, - query_params=query_params, - content_type=content_type, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_system_roles_create_application_role_users/__init__.py b/python/apollo_openapi/paths/openapi_v1_system_roles_create_application_role_users/__init__.py deleted file mode 100644 index 86868cbb..00000000 --- a/python/apollo_openapi/paths/openapi_v1_system_roles_create_application_role_users/__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_system_roles_create_application_role_users import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_SYSTEM_ROLES_CREATEAPPLICATION_ROLEUSERS diff --git a/python/apollo_openapi/paths/openapi_v1_system_roles_create_application_role_users/get.py b/python/apollo_openapi/paths/openapi_v1_system_roles_create_application_role_users/get.py deleted file mode 100644 index 03f634a2..00000000 --- a/python/apollo_openapi/paths/openapi_v1_system_roles_create_application_role_users/get.py +++ /dev/null @@ -1,261 +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 . import path - -_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 _get_create_application_role_users_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_create_application_role_users_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_create_application_role_users_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_create_application_role_users_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, - ): - """ - 获取建应用用户 (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 - """ - 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 GetCreateApplicationRoleUsers(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_create_application_role_users( - 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_create_application_role_users( - 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_create_application_role_users( - 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_create_application_role_users( - 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_create_application_role_users_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_create_application_role_users_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_system_roles_create_application_role_users/get.pyi b/python/apollo_openapi/paths/openapi_v1_system_roles_create_application_role_users/get.pyi deleted file mode 100644 index 7cc75ed8..00000000 --- a/python/apollo_openapi/paths/openapi_v1_system_roles_create_application_role_users/get.pyi +++ /dev/null @@ -1,253 +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 - - - -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 _get_create_application_role_users_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_create_application_role_users_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_create_application_role_users_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_create_application_role_users_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, - ): - """ - 获取建应用用户 (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 - """ - 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 GetCreateApplicationRoleUsers(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_create_application_role_users( - 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_create_application_role_users( - 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_create_application_role_users( - 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_create_application_role_users( - 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_create_application_role_users_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_create_application_role_users_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_user/__init__.py b/python/apollo_openapi/paths/openapi_v1_user/__init__.py deleted file mode 100644 index 2131ccf5..00000000 --- a/python/apollo_openapi/paths/openapi_v1_user/__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_user import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_USER diff --git a/python/apollo_openapi/paths/openapi_v1_user/get.py b/python/apollo_openapi/paths/openapi_v1_user/get.py deleted file mode 100644 index c58ecaf6..00000000 --- a/python/apollo_openapi/paths/openapi_v1_user/get.py +++ /dev/null @@ -1,282 +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.exception_response import ExceptionResponse -from apollo_openapi.model.open_user_info_dto import OpenUserInfoDTO - -from . import path - -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationJson = OpenUserInfoDTO - - -@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), - }, -) -SchemaFor401ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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, - '401': _response_for_401, - '403': _response_for_403, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_current_user_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_current_user_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_current_user_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_current_user_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, - ): - """ - 获取当前Portal用户(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 - """ - 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 GetCurrentUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_current_user( - 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_current_user( - 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_current_user( - 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_current_user( - 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_current_user_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_current_user_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_user/get.pyi b/python/apollo_openapi/paths/openapi_v1_user/get.pyi deleted file mode 100644 index d99e62d6..00000000 --- a/python/apollo_openapi/paths/openapi_v1_user/get.pyi +++ /dev/null @@ -1,272 +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.exception_response import ExceptionResponse -from apollo_openapi.model.open_user_info_dto import OpenUserInfoDTO - -SchemaFor200ResponseBodyApplicationJson = OpenUserInfoDTO - - -@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), - }, -) -SchemaFor401ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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 _get_current_user_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_current_user_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_current_user_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_current_user_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, - ): - """ - 获取当前Portal用户(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 - """ - 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 GetCurrentUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_current_user( - 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_current_user( - 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_current_user( - 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_current_user( - 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_current_user_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_current_user_oapg( - accept_content_types=accept_content_types, - stream=stream, - timeout=timeout, - skip_deserialization=skip_deserialization - ) diff --git a/python/apollo_openapi/paths/openapi_v1_users/__init__.py b/python/apollo_openapi/paths/openapi_v1_users/__init__.py deleted file mode 100644 index f0ba13d2..00000000 --- a/python/apollo_openapi/paths/openapi_v1_users/__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_users import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_USERS diff --git a/python/apollo_openapi/paths/openapi_v1_users/get.py b/python/apollo_openapi/paths/openapi_v1_users/get.py deleted file mode 100644 index aeff3a1d..00000000 --- a/python/apollo_openapi/paths/openapi_v1_users/get.py +++ /dev/null @@ -1,405 +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.exception_response import ExceptionResponse -from apollo_openapi.model.open_user_info_dto import OpenUserInfoDTO - -from . import path - -# Query params -KeywordSchema = schemas.StrSchema -IncludeInactiveUsersSchema = schemas.BoolSchema - - -class OffsetSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_minimum = 0 - - -class LimitSchema( - schemas.IntSchema -): - - - class MetaOapg: - inclusive_minimum = 1 -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'keyword': typing.Union[KeywordSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'includeInactiveUsers': typing.Union[IncludeInactiveUsersSchema, bool, ], - 'offset': typing.Union[OffsetSchema, decimal.Decimal, int, ], - 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_keyword = api_client.QueryParameter( - name="keyword", - style=api_client.ParameterStyle.FORM, - schema=KeywordSchema, - required=True, - explode=True, -) -request_query_include_inactive_users = api_client.QueryParameter( - name="includeInactiveUsers", - style=api_client.ParameterStyle.FORM, - schema=IncludeInactiveUsersSchema, - explode=True, -) -request_query_offset = api_client.QueryParameter( - name="offset", - style=api_client.ParameterStyle.FORM, - schema=OffsetSchema, - explode=True, -) -request_query_limit = api_client.QueryParameter( - name="limit", - style=api_client.ParameterStyle.FORM, - schema=LimitSchema, - explode=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenUserInfoDTO']: - return OpenUserInfoDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenUserInfoDTO'], typing.List['OpenUserInfoDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenUserInfoDTO': - 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), - }, -) -SchemaFor401ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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, - '401': _response_for_401, - '403': _response_for_403, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _search_users_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 _search_users_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 _search_users_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 _search_users_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, - ): - """ - 搜索用户(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_keyword, - request_query_include_inactive_users, - request_query_offset, - request_query_limit, - ): - 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 SearchUsers(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def search_users( - 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 search_users( - 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 search_users( - 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 search_users( - 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._search_users_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._search_users_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_users/get.pyi b/python/apollo_openapi/paths/openapi_v1_users/get.pyi deleted file mode 100644 index b7f898ab..00000000 --- a/python/apollo_openapi/paths/openapi_v1_users/get.pyi +++ /dev/null @@ -1,389 +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.exception_response import ExceptionResponse -from apollo_openapi.model.open_user_info_dto import OpenUserInfoDTO - -# Query params -KeywordSchema = schemas.StrSchema -IncludeInactiveUsersSchema = schemas.BoolSchema - - -class OffsetSchema( - schemas.IntSchema -): - pass - - -class LimitSchema( - schemas.IntSchema -): - pass -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - 'keyword': typing.Union[KeywordSchema, str, ], - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'includeInactiveUsers': typing.Union[IncludeInactiveUsersSchema, bool, ], - 'offset': typing.Union[OffsetSchema, decimal.Decimal, int, ], - 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_keyword = api_client.QueryParameter( - name="keyword", - style=api_client.ParameterStyle.FORM, - schema=KeywordSchema, - required=True, - explode=True, -) -request_query_include_inactive_users = api_client.QueryParameter( - name="includeInactiveUsers", - style=api_client.ParameterStyle.FORM, - schema=IncludeInactiveUsersSchema, - explode=True, -) -request_query_offset = api_client.QueryParameter( - name="offset", - style=api_client.ParameterStyle.FORM, - schema=OffsetSchema, - explode=True, -) -request_query_limit = api_client.QueryParameter( - name="limit", - style=api_client.ParameterStyle.FORM, - schema=LimitSchema, - explode=True, -) - - -class SchemaFor200ResponseBodyApplicationJson( - schemas.ListSchema -): - - - class MetaOapg: - - @staticmethod - def items() -> typing.Type['OpenUserInfoDTO']: - return OpenUserInfoDTO - - def __new__( - cls, - _arg: typing.Union[typing.Tuple['OpenUserInfoDTO'], typing.List['OpenUserInfoDTO']], - _configuration: typing.Optional[schemas.Configuration] = None, - ) -> 'SchemaFor200ResponseBodyApplicationJson': - return super().__new__( - cls, - _arg, - _configuration=_configuration, - ) - - def __getitem__(self, i: int) -> 'OpenUserInfoDTO': - 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), - }, -) -SchemaFor401ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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 _search_users_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 _search_users_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 _search_users_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 _search_users_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, - ): - """ - 搜索用户(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_keyword, - request_query_include_inactive_users, - request_query_offset, - request_query_limit, - ): - 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 SearchUsers(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def search_users( - 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 search_users( - 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 search_users( - 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 search_users( - 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._search_users_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._search_users_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_users/post.py b/python/apollo_openapi/paths/openapi_v1_users/post.py deleted file mode 100644 index 76b13cbc..00000000 --- a/python/apollo_openapi/paths/openapi_v1_users/post.py +++ /dev/null @@ -1,435 +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_user_dto import OpenUserDTO -from apollo_openapi.model.exception_response import ExceptionResponse - -from . import path - -# Query params -IsCreateSchema = schemas.BoolSchema -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'isCreate': typing.Union[IsCreateSchema, bool, ], - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_is_create = api_client.QueryParameter( - name="isCreate", - style=api_client.ParameterStyle.FORM, - schema=IsCreateSchema, - explode=True, -) -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# body param -SchemaForRequestBodyApplicationJson = OpenUserDTO - - -request_body_open_user_dto = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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_or_update_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - 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 _create_or_update_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - 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 _create_or_update_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - 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 _create_or_update_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - 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 _create_or_update_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - 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, - ): - """ - 创建或更新用户(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_is_create, - 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_user_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 CreateOrUpdateUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_or_update_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - 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 create_or_update_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - 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 create_or_update_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - 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 create_or_update_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - 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 create_or_update_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - 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._create_or_update_user_oapg( - body=body, - query_params=query_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(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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(), - accept_content_types: typing.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(), - accept_content_types: typing.Tuple[str] = _all_accept_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(), - accept_content_types: typing.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_or_update_user_oapg( - body=body, - query_params=query_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_users/post.pyi b/python/apollo_openapi/paths/openapi_v1_users/post.pyi deleted file mode 100644 index 0dcde8c0..00000000 --- a/python/apollo_openapi/paths/openapi_v1_users/post.pyi +++ /dev/null @@ -1,425 +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_user_dto import OpenUserDTO -from apollo_openapi.model.exception_response import ExceptionResponse - -# Query params -IsCreateSchema = schemas.BoolSchema -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'isCreate': typing.Union[IsCreateSchema, bool, ], - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_is_create = api_client.QueryParameter( - name="isCreate", - style=api_client.ParameterStyle.FORM, - schema=IsCreateSchema, - explode=True, -) -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# body param -SchemaForRequestBodyApplicationJson = OpenUserDTO - - -request_body_open_user_dto = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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_or_update_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - 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 _create_or_update_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - 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 _create_or_update_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - 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 _create_or_update_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - 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 _create_or_update_user_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - 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, - ): - """ - 创建或更新用户(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_is_create, - 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_user_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 CreateOrUpdateUser(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def create_or_update_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - 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 create_or_update_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - 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 create_or_update_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - 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 create_or_update_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - 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 create_or_update_user( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - 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._create_or_update_user_oapg( - body=body, - query_params=query_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(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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(), - accept_content_types: typing.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(), - accept_content_types: typing.Tuple[str] = _all_accept_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(), - accept_content_types: typing.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_or_update_user_oapg( - body=body, - query_params=query_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_users_enabled/__init__.py b/python/apollo_openapi/paths/openapi_v1_users_enabled/__init__.py deleted file mode 100644 index 0b03366f..00000000 --- a/python/apollo_openapi/paths/openapi_v1_users_enabled/__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_users_enabled import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_USERS_ENABLED diff --git a/python/apollo_openapi/paths/openapi_v1_users_enabled/put.py b/python/apollo_openapi/paths/openapi_v1_users_enabled/put.py deleted file mode 100644 index 0b52aa13..00000000 --- a/python/apollo_openapi/paths/openapi_v1_users_enabled/put.py +++ /dev/null @@ -1,426 +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_user_dto import OpenUserDTO -from apollo_openapi.model.exception_response import ExceptionResponse - -from . import path - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# body param -SchemaForRequestBodyApplicationJson = OpenUserDTO - - -request_body_open_user_dto = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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 _change_user_enabled_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - 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 _change_user_enabled_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - 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 _change_user_enabled_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - 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 _change_user_enabled_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - 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 _change_user_enabled_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - 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, - ): - """ - 修改用户启用状态(new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_operator, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if 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_user_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 ChangeUserEnabled(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def change_user_enabled( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - 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 change_user_enabled( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - 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 change_user_enabled( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - 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 change_user_enabled( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - 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 change_user_enabled( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - 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._change_user_enabled_oapg( - body=body, - query_params=query_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(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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(), - accept_content_types: typing.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(), - accept_content_types: typing.Tuple[str] = _all_accept_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(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._change_user_enabled_oapg( - body=body, - query_params=query_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_users_enabled/put.pyi b/python/apollo_openapi/paths/openapi_v1_users_enabled/put.pyi deleted file mode 100644 index 23cbc95c..00000000 --- a/python/apollo_openapi/paths/openapi_v1_users_enabled/put.pyi +++ /dev/null @@ -1,416 +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_user_dto import OpenUserDTO -from apollo_openapi.model.exception_response import ExceptionResponse - -# Query params -OperatorSchema = schemas.StrSchema -RequestRequiredQueryParams = typing_extensions.TypedDict( - 'RequestRequiredQueryParams', - { - } -) -RequestOptionalQueryParams = typing_extensions.TypedDict( - 'RequestOptionalQueryParams', - { - 'operator': typing.Union[OperatorSchema, str, ], - }, - total=False -) - - -class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): - pass - - -request_query_operator = api_client.QueryParameter( - name="operator", - style=api_client.ParameterStyle.FORM, - schema=OperatorSchema, - explode=True, -) -# body param -SchemaForRequestBodyApplicationJson = OpenUserDTO - - -request_body_open_user_dto = api_client.RequestBody( - content={ - 'application/json': api_client.MediaType( - schema=SchemaForRequestBodyApplicationJson), - }, - required=True, -) - - -@dataclass -class ApiResponseFor200(api_client.ApiResponse): - response: urllib3.HTTPResponse - body: schemas.Unset = schemas.unset - headers: schemas.Unset = schemas.unset - - -_response_for_200 = api_client.OpenApiResponse( - response_cls=ApiResponseFor200, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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 _change_user_enabled_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - 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 _change_user_enabled_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - 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 _change_user_enabled_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - 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 _change_user_enabled_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - 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 _change_user_enabled_oapg( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - 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, - ): - """ - 修改用户启用状态(new added) - :param skip_deserialization: If true then api_response.response will be set but - api_response.body and api_response.headers will not be deserialized into schema - class instances - """ - self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) - used_path = path.value - - prefix_separator_iterator = None - for parameter in ( - request_query_operator, - ): - parameter_data = query_params.get(parameter.name, schemas.unset) - if parameter_data is schemas.unset: - continue - if prefix_separator_iterator is None: - prefix_separator_iterator = parameter.get_prefix_separator_iterator() - serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) - for serialized_value in serialized_data.values(): - used_path += serialized_value - - _headers = HTTPHeaderDict() - # TODO add cookie handling - if 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_user_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 ChangeUserEnabled(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def change_user_enabled( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: typing_extensions.Literal["application/json"] = ..., - 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 change_user_enabled( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - 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 change_user_enabled( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - skip_deserialization: typing_extensions.Literal[True], - content_type: str = ..., - 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 change_user_enabled( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = ..., - 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 change_user_enabled( - self, - body: typing.Union[SchemaForRequestBodyApplicationJson,], - content_type: str = 'application/json', - 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._change_user_enabled_oapg( - body=body, - query_params=query_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(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - 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(), - accept_content_types: typing.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(), - accept_content_types: typing.Tuple[str] = _all_accept_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(), - accept_content_types: typing.Tuple[str] = _all_accept_content_types, - stream: bool = False, - timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, - skip_deserialization: bool = False, - ): - return self._change_user_enabled_oapg( - body=body, - query_params=query_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_users_user_id/__init__.py b/python/apollo_openapi/paths/openapi_v1_users_user_id/__init__.py deleted file mode 100644 index bfb5689a..00000000 --- a/python/apollo_openapi/paths/openapi_v1_users_user_id/__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_users_user_id import Api - -from apollo_openapi.paths import PathValues - -path = PathValues.OPENAPI_V1_USERS_USER_ID diff --git a/python/apollo_openapi/paths/openapi_v1_users_user_id/get.py b/python/apollo_openapi/paths/openapi_v1_users_user_id/get.py deleted file mode 100644 index e1142f85..00000000 --- a/python/apollo_openapi/paths/openapi_v1_users_user_id/get.py +++ /dev/null @@ -1,356 +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.exception_response import ExceptionResponse -from apollo_openapi.model.open_user_info_dto import OpenUserInfoDTO - -from . import path - -# Path params -UserIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -_auth = [ - 'ApiKeyAuth', -] -SchemaFor200ResponseBodyApplicationJson = OpenUserInfoDTO - - -@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), - }, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor401ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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, - '401': _response_for_401, - '403': _response_for_403, -} -_all_accept_content_types = ( - 'application/json', -) - - -class BaseApi(api_client.Api): - @typing.overload - def _get_user_by_user_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_user_by_user_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_user_by_user_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_user_by_user_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_user_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 GetUserByUserId(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_user_by_user_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_user_by_user_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_user_by_user_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_user_by_user_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_user_by_user_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_user_by_user_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_users_user_id/get.pyi b/python/apollo_openapi/paths/openapi_v1_users_user_id/get.pyi deleted file mode 100644 index f829f7b9..00000000 --- a/python/apollo_openapi/paths/openapi_v1_users_user_id/get.pyi +++ /dev/null @@ -1,345 +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.exception_response import ExceptionResponse -from apollo_openapi.model.open_user_info_dto import OpenUserInfoDTO - -# Path params -UserIdSchema = schemas.StrSchema -RequestRequiredPathParams = typing_extensions.TypedDict( - 'RequestRequiredPathParams', - { - 'userId': typing.Union[UserIdSchema, str, ], - } -) -RequestOptionalPathParams = typing_extensions.TypedDict( - 'RequestOptionalPathParams', - { - }, - total=False -) - - -class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): - pass - - -request_path_user_id = api_client.PathParameter( - name="userId", - style=api_client.ParameterStyle.SIMPLE, - schema=UserIdSchema, - required=True, -) -SchemaFor200ResponseBodyApplicationJson = OpenUserInfoDTO - - -@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), - }, -) -SchemaFor400ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor401ResponseBodyApplicationJson = ExceptionResponse - - -@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), - }, -) -SchemaFor403ResponseBodyApplicationJson = ExceptionResponse - - -@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 _get_user_by_user_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_user_by_user_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_user_by_user_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_user_by_user_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_user_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 GetUserByUserId(BaseApi): - # this class is used by api classes that refer to endpoints with operationId fn names - - @typing.overload - def get_user_by_user_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_user_by_user_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_user_by_user_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_user_by_user_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_user_by_user_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_user_by_user_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/rest.py b/python/apollo_openapi/rest.py deleted file mode 100644 index 8c4ea918..00000000 --- a/python/apollo_openapi/rest.py +++ /dev/null @@ -1,256 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -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 - - -logger = logging.getLogger(__name__) - - -class RESTClientObject(object): - - 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 - if configuration.verify_ssl: - cert_reqs = ssl.CERT_REQUIRED - else: - cert_reqs = ssl.CERT_NONE - - # 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: - addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 - - if configuration.retries is not None: - addition_pool_args['retries'] = configuration.retries - - if configuration.tls_server_name: - addition_pool_args['server_hostname'] = configuration.tls_server_name - - if configuration.socket_options is not None: - addition_pool_args['socket_options'] = configuration.socket_options - - if maxsize is None: - if configuration.connection_pool_maxsize is not None: - maxsize = configuration.connection_pool_maxsize - else: - maxsize = 4 - - # https pool manager - if configuration.proxy: - 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( - 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: 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 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 fields and body: - raise ApiValueError( - "body parameter cannot be used with fields parameter." - ) - - fields = fields or {} - headers = headers or {} - - 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']: - if 'Content-Type' not in headers and body is None: - r = self.pool_manager.request( - method, - url, - preload_content=not stream, - timeout=timeout, - headers=headers - ) - elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 - r = self.pool_manager.request( - method, url, - body=body, - fields=fields, - encode_multipart=False, - preload_content=not stream, - timeout=timeout, - 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'] - r = self.pool_manager.request( - method, url, - fields=fields, - encode_multipart=True, - preload_content=not stream, - timeout=timeout, - 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 - elif isinstance(body, str) or isinstance(body, bytes): - request_body = body - r = self.pool_manager.request( - method, url, - body=request_body, - preload_content=not stream, - timeout=timeout, - headers=headers) - else: - # Cannot generate the request from given parameters - msg = """Cannot prepare a request message for provided - arguments. Please check that your arguments match - declared content type.""" - raise ApiException(status=0, reason=msg) - # For `GET`, `HEAD` - else: - r = self.pool_manager.request(method, url, - preload_content=not stream, - timeout=timeout, - headers=headers) - except urllib3.exceptions.SSLError as e: - msg = "{0}\n{1}".format(type(e).__name__, str(e)) - raise ApiException(status=0, reason=msg) - - 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 deleted file mode 100644 index 66bb929d..00000000 --- a/python/apollo_openapi/schemas.py +++ /dev/null @@ -1,2474 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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/apis/tags/AccessKeyManagementApi.md b/python/docs/apis/tags/AccessKeyManagementApi.md deleted file mode 100644 index 69136cbd..00000000 --- a/python/docs/apis/tags/AccessKeyManagementApi.md +++ /dev/null @@ -1,710 +0,0 @@ - -# apollo_openapi.apis.tags.access_key_management_api.AccessKeyManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_access_key**](#create_access_key) | **post** /openapi/v1/apps/{appId}/envs/{env}/accesskeys | 创建AccessKey -[**delete_access_key**](#delete_access_key) | **delete** /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId} | 删除AccessKey -[**disable_access_key**](#disable_access_key) | **put** /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/deactivation | 禁用AccessKey -[**enable_access_key**](#enable_access_key) | **put** /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/activation | 启用AccessKey -[**find_access_keys**](#find_access_keys) | **get** /openapi/v1/apps/{appId}/envs/{env}/accesskeys | 查找AccessKey - -# **create_access_key** - -> OpenAccessKeyDTO create_access_key(app_idenv) - -创建AccessKey - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import access_key_management_api -from apollo_openapi.model.open_access_key_dto import OpenAccessKeyDTO -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 = access_key_management_api.AccessKeyManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'env': "env_example", - } - query_params = { - } - try: - # 创建AccessKey - api_response = api_instance.create_access_key( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling AccessKeyManagementApi->create_access_key: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - } - query_params = { - 'operator': "operator_example", - } - try: - # 创建AccessKey - api_response = api_instance.create_access_key( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling AccessKeyManagementApi->create_access_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 | | optional - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### 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_access_key.ApiResponseFor200) | - -#### create_access_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 -------------- | ------------- | ------------- -[**OpenAccessKeyDTO**](../../models/OpenAccessKeyDTO.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_access_key** - -> delete_access_key(app_idenvaccess_key_id) - -删除AccessKey - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import access_key_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 = access_key_management_api.AccessKeyManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'accessKeyId': 1, - } - query_params = { - } - try: - # 删除AccessKey - api_response = api_instance.delete_access_key( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling AccessKeyManagementApi->delete_access_key: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'accessKeyId': 1, - } - query_params = { - 'operator': "operator_example", - } - try: - # 删除AccessKey - api_response = api_instance.delete_access_key( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling AccessKeyManagementApi->delete_access_key: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -env | EnvSchema | | -accessKeyId | AccessKeyIdSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# EnvSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AccessKeyIdSchema - -## 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](#delete_access_key.ApiResponseFor200) | - -#### delete_access_key.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **disable_access_key** - -> disable_access_key(app_idenvaccess_key_id) - -禁用AccessKey - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import access_key_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 = access_key_management_api.AccessKeyManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'accessKeyId': 1, - } - query_params = { - } - try: - # 禁用AccessKey - api_response = api_instance.disable_access_key( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling AccessKeyManagementApi->disable_access_key: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'accessKeyId': 1, - } - query_params = { - 'operator': "operator_example", - } - try: - # 禁用AccessKey - api_response = api_instance.disable_access_key( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling AccessKeyManagementApi->disable_access_key: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -env | EnvSchema | | -accessKeyId | AccessKeyIdSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# EnvSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AccessKeyIdSchema - -## 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](#disable_access_key.ApiResponseFor200) | - -#### disable_access_key.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **enable_access_key** - -> enable_access_key(app_idenvaccess_key_id) - -启用AccessKey - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import access_key_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 = access_key_management_api.AccessKeyManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'accessKeyId': 1, - } - query_params = { - } - try: - # 启用AccessKey - api_response = api_instance.enable_access_key( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling AccessKeyManagementApi->enable_access_key: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'accessKeyId': 1, - } - query_params = { - 'mode': 0, - 'operator': "operator_example", - } - try: - # 启用AccessKey - api_response = api_instance.enable_access_key( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling AccessKeyManagementApi->enable_access_key: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -mode | ModeSchema | | optional -operator | OperatorSchema | | optional - - -# ModeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 0 - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -env | EnvSchema | | -accessKeyId | AccessKeyIdSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# EnvSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AccessKeyIdSchema - -## 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](#enable_access_key.ApiResponseFor200) | - -#### enable_access_key.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **find_access_keys** - -> [OpenAccessKeyDTO] find_access_keys(app_idenv) - -查找AccessKey - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import access_key_management_api -from apollo_openapi.model.open_access_key_dto import OpenAccessKeyDTO -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 = access_key_management_api.AccessKeyManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'env': "env_example", - } - try: - # 查找AccessKey - api_response = api_instance.find_access_keys( - path_params=path_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling AccessKeyManagementApi->find_access_keys: %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 | | - -# 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](#find_access_keys.ApiResponseFor200) | - -#### find_access_keys.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 -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenAccessKeyDTO**]({{complexTypePrefix}}OpenAccessKeyDTO.md) | [**OpenAccessKeyDTO**]({{complexTypePrefix}}OpenAccessKeyDTO.md) | [**OpenAccessKeyDTO**]({{complexTypePrefix}}OpenAccessKeyDTO.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/AppManagementApi.md b/python/docs/apis/tags/AppManagementApi.md deleted file mode 100644 index f9ad9e03..00000000 --- a/python/docs/apis/tags/AppManagementApi.md +++ /dev/null @@ -1,1518 +0,0 @@ - -# 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_apps_by_self**](#get_apps_by_self) | **get** /openapi/v1/apps/by-self | 获取当前Consumer/User的应用列表(分页)(new added) -[**get_env_cluster_info**](#get_env_cluster_info) | **get** /openapi/v1/apps/{appId}/env-cluster-info | 获取应用环境集群详情(new added) -[**get_env_clusters**](#get_env_clusters) | **get** /openapi/v1/apps/{appId}/envclusters | 获取应用的环境集群信息 (original openapi) -[**update_app**](#update_app) | **put** /openapi/v1/apps/{appId} | 更新应用(new added) - -# **create_app** - -> 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_created_by_display_name="data_change_created_by_display_name_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_last_modified_by_display_name="data_change_last_modified_by_display_name_example", - data_change_created_time="2025-09-29T12:34:56Z", - data_change_last_modified_time="2025-09-29T12:34:56Z", - name="name_example", - app_id="app_id_example", - org_id="org_id_example", - org_name="org_name_example", - owner_name="owner_name_example", - owner_email="owner_email_example", - owner_display_name="owner_display_name_example", - ), - ) - try: - # 创建应用 (original openapi) - api_response = api_instance.create_app( - body=body, - ) - 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 | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -#### create_app.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### create_app.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_app_in_env** - -> create_app_in_env(envopen_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 = { - } - body = OpenAppDTO( - data_change_created_by="data_change_created_by_example", - data_change_created_by_display_name="data_change_created_by_display_name_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_last_modified_by_display_name="data_change_last_modified_by_display_name_example", - data_change_created_time="2025-09-29T12:34:56Z", - data_change_last_modified_time="2025-09-29T12:34:56Z", - name="name_example", - app_id="app_id_example", - org_id="org_id_example", - org_name="org_name_example", - owner_name="owner_name_example", - owner_email="owner_email_example", - owner_display_name="owner_display_name_example", - ) - try: - # 在指定环境创建应用(new added) - api_response = api_instance.create_app_in_env( - path_params=path_params, - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling AppManagementApi->create_app_in_env: %s\n" % e) - - # example passing only optional values - path_params = { - 'env': "env_example", - } - query_params = { - 'operator': "operator_example", - } - body = OpenAppDTO( - data_change_created_by="data_change_created_by_example", - data_change_created_by_display_name="data_change_created_by_display_name_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_last_modified_by_display_name="data_change_last_modified_by_display_name_example", - data_change_created_time="2025-09-29T12:34:56Z", - data_change_last_modified_time="2025-09-29T12:34:56Z", - name="name_example", - app_id="app_id_example", - org_id="org_id_example", - org_name="org_name_example", - owner_name="owner_name_example", - owner_email="owner_email_example", - owner_display_name="owner_display_name_example", - ) - try: - # 在指定环境创建应用(new added) - api_response = api_instance.create_app_in_env( - path_params=path_params, - query_params=query_params, - body=body, - ) - 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 | | optional - - -# 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 | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -#### 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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_app** - -> delete_app(app_id) - -删除应用(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 = { - } - try: - # 删除应用(new added) - api_response = api_instance.delete_app( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling AppManagementApi->delete_app: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - } - query_params = { - 'operator': "operator_example", - } - try: - # 删除应用(new added) - api_response = api_instance.delete_app( - path_params=path_params, - query_params=query_params, - ) - 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 | | optional - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#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 | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -#### delete_app.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### delete_app.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **find_miss_envs** - -> [OpenMissEnvDTO] 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.open_miss_env_dto import OpenMissEnvDTO -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.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 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenMissEnvDTO**]({{complexTypePrefix}}OpenMissEnvDTO.md) | [**OpenMissEnvDTO**]({{complexTypePrefix}}OpenMissEnvDTO.md) | [**OpenMissEnvDTO**]({{complexTypePrefix}}OpenMissEnvDTO.md) | | - -#### find_miss_envs.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_apps_by_self** - -> [OpenAppDTO] get_apps_by_self(pagesize) - -获取当前Consumer/User的应用列表(分页)(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/User的应用列表(分页)(new added) - api_response = api_instance.get_apps_by_self( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling AppManagementApi->get_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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_env_cluster_info** - -> [OpenEnvClusterInfo] get_env_cluster_info(app_id) - -获取应用环境集群详情(new added) - -/openapi/v1/apps/{appId}/env-cluster-info - -### 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_info import OpenEnvClusterInfo -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -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_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) | 成功获取应用环境集群详情 - -#### 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 -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenEnvClusterInfo**]({{complexTypePrefix}}OpenEnvClusterInfo.md) | [**OpenEnvClusterInfo**]({{complexTypePrefix}}OpenEnvClusterInfo.md) | [**OpenEnvClusterInfo**]({{complexTypePrefix}}OpenEnvClusterInfo.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_clusters** - -> [OpenEnvClusterDTO] get_env_clusters(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_clusters( - path_params=path_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling AppManagementApi->get_env_clusters: %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_clusters.ApiResponseFor200) | 成功获取应用环境集群信息 -404 | [ApiResponseFor404](#get_env_clusters.ApiResponseFor404) | 应用不存在 - -#### get_env_clusters.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_clusters.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **update_app** - -> update_app(app_idopen_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 = { - } - body = OpenAppDTO( - data_change_created_by="data_change_created_by_example", - data_change_created_by_display_name="data_change_created_by_display_name_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_last_modified_by_display_name="data_change_last_modified_by_display_name_example", - data_change_created_time="2025-09-29T12:34:56Z", - data_change_last_modified_time="2025-09-29T12:34:56Z", - name="name_example", - app_id="app_id_example", - org_id="org_id_example", - org_name="org_name_example", - owner_name="owner_name_example", - owner_email="owner_email_example", - owner_display_name="owner_display_name_example", - ) - try: - # 更新应用(new added) - api_response = api_instance.update_app( - path_params=path_params, - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling AppManagementApi->update_app: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - } - query_params = { - 'operator': "operator_example", - } - body = OpenAppDTO( - data_change_created_by="data_change_created_by_example", - data_change_created_by_display_name="data_change_created_by_display_name_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_last_modified_by_display_name="data_change_last_modified_by_display_name_example", - data_change_created_time="2025-09-29T12:34:56Z", - data_change_last_modified_time="2025-09-29T12:34:56Z", - name="name_example", - app_id="app_id_example", - org_id="org_id_example", - org_name="org_name_example", - owner_name="owner_name_example", - owner_email="owner_email_example", - owner_display_name="owner_display_name_example", - ) - try: - # 更新应用(new added) - api_response = api_instance.update_app( - path_params=path_params, - query_params=query_params, - body=body, - ) - 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 | | optional - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#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 | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -#### update_app.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### update_app.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/python/docs/apis/tags/AppNamespaceManagementApi.md b/python/docs/apis/tags/AppNamespaceManagementApi.md deleted file mode 100644 index 335da12f..00000000 --- a/python/docs/apis/tags/AppNamespaceManagementApi.md +++ /dev/null @@ -1,946 +0,0 @@ - -# apollo_openapi.apis.tags.app_namespace_management_api.AppNamespaceManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_app_namespace**](#create_app_namespace) | **post** /openapi/v1/apps/{appId}/appnamespaces | 创建AppNamespace (original openapi) -[**delete_app_namespace**](#delete_app_namespace) | **delete** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 删除AppNamespace (new added) -[**find_app_namespace**](#find_app_namespace) | **get** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} | 获取指定的AppNamespace (new added) -[**find_app_namespace_usage**](#find_app_namespace_usage) | **get** /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage | 查询appnamespace使用情况(new added) -[**get_app_namespaces**](#get_app_namespaces) | **get** /openapi/v1/appnamespaces | 获取所有公共AppNamespace (new added) -[**get_app_namespaces_by_app_id**](#get_app_namespaces_by_app_id) | **get** /openapi/v1/apps/{appId}/appnamespaces | 获取指定应用的AppNamespace (new added) -[**get_public_app_namespace_instances**](#get_public_app_namespace_instances) | **get** /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances | 获取公共AppNamespace的所有实例 (new added) - -# **create_app_namespace** - -> OpenAppNamespaceDTO create_app_namespace(app_idopen_app_namespace_dto) - -创建AppNamespace (original openapi) - -POST /openapi/v1/apps/{appId}/appnamespaces - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import app_namespace_management_api -from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO -from apollo_openapi.model.exception_response import ExceptionResponse -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = app_namespace_management_api.AppNamespaceManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - } - query_params = { - } - body = OpenAppNamespaceDTO( - data_change_created_by="data_change_created_by_example", - data_change_created_by_display_name="data_change_created_by_display_name_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_last_modified_by_display_name="data_change_last_modified_by_display_name_example", - data_change_created_time="2025-09-29T12:34:56Z", - data_change_last_modified_time="2025-09-29T12:34:56Z", - name="name_example", - app_id="app_id_example", - format="format_example", - is_public=True, - append_namespace_prefix=True, - comment="comment_example", - ) - try: - # 创建AppNamespace (original openapi) - api_response = api_instance.create_app_namespace( - path_params=path_params, - query_params=query_params, - body=body, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling AppNamespaceManagementApi->create_app_namespace: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - } - query_params = { - 'operator': "operator_example", - } - body = OpenAppNamespaceDTO( - data_change_created_by="data_change_created_by_example", - data_change_created_by_display_name="data_change_created_by_display_name_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_last_modified_by_display_name="data_change_last_modified_by_display_name_example", - data_change_created_time="2025-09-29T12:34:56Z", - data_change_last_modified_time="2025-09-29T12:34:56Z", - name="name_example", - app_id="app_id_example", - format="format_example", - is_public=True, - append_namespace_prefix=True, - comment="comment_example", - ) - try: - # 创建AppNamespace (original openapi) - api_response = api_instance.create_app_namespace( - path_params=path_params, - query_params=query_params, - body=body, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling AppNamespaceManagementApi->create_app_namespace: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenAppNamespaceDTO**](../../models/OpenAppNamespaceDTO.md) | | - - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#create_app_namespace.ApiResponseFor200) | AppNamespace创建成功 -400 | [ApiResponseFor400](#create_app_namespace.ApiResponseFor400) | 请求参数错误 -403 | [ApiResponseFor403](#create_app_namespace.ApiResponseFor403) | 权限不足 - -#### create_app_namespace.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenAppNamespaceDTO**](../../models/OpenAppNamespaceDTO.md) | | - - -#### create_app_namespace.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### create_app_namespace.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_app_namespace** - -> delete_app_namespace(app_idnamespace_name) - -删除AppNamespace (new added) - -DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import app_namespace_management_api -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = app_namespace_management_api.AppNamespaceManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - } - try: - # 删除AppNamespace (new added) - api_response = api_instance.delete_app_namespace( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling AppNamespaceManagementApi->delete_app_namespace: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - 'operator': "operator_example", - } - try: - # 删除AppNamespace (new added) - api_response = api_instance.delete_app_namespace( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling AppNamespaceManagementApi->delete_app_namespace: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -namespaceName | NamespaceNameSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# NamespaceNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#delete_app_namespace.ApiResponseFor200) | AppNamespace删除成功 - -#### delete_app_namespace.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **find_app_namespace** - -> OpenAppNamespaceDTO find_app_namespace(app_idnamespace_name) - -获取指定的AppNamespace (new added) - -GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import app_namespace_management_api -from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = app_namespace_management_api.AppNamespaceManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - } - try: - # 获取指定的AppNamespace (new added) - api_response = api_instance.find_app_namespace( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling AppNamespaceManagementApi->find_app_namespace: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - 'extendInfo': False, - } - try: - # 获取指定的AppNamespace (new added) - api_response = api_instance.find_app_namespace( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling AppNamespaceManagementApi->find_app_namespace: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -extendInfo | ExtendInfoSchema | | optional - - -# ExtendInfoSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | if omitted the server will use the default value of False - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -namespaceName | NamespaceNameSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# NamespaceNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#find_app_namespace.ApiResponseFor200) | 成功获取AppNamespace - -#### find_app_namespace.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenAppNamespaceDTO**](../../models/OpenAppNamespaceDTO.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **find_app_namespace_usage** - -> [OpenNamespaceUsageDTO] find_app_namespace_usage(app_idnamespace_name) - -查询appnamespace使用情况(new added) - -GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import app_namespace_management_api -from apollo_openapi.model.open_namespace_usage_dto import OpenNamespaceUsageDTO -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = app_namespace_management_api.AppNamespaceManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'namespaceName': "namespaceName_example", - } - try: - # 查询appnamespace使用情况(new added) - api_response = api_instance.find_app_namespace_usage( - path_params=path_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling AppNamespaceManagementApi->find_app_namespace_usage: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -namespaceName | NamespaceNameSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# NamespaceNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#find_app_namespace_usage.ApiResponseFor200) | AppNamespaceUsage查询成功 - -#### find_app_namespace_usage.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenNamespaceUsageDTO**]({{complexTypePrefix}}OpenNamespaceUsageDTO.md) | [**OpenNamespaceUsageDTO**]({{complexTypePrefix}}OpenNamespaceUsageDTO.md) | [**OpenNamespaceUsageDTO**]({{complexTypePrefix}}OpenNamespaceUsageDTO.md) | | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_app_namespaces** - -> [OpenAppNamespaceDTO] get_app_namespaces() - -获取所有公共AppNamespace (new added) - -GET /openapi/v1/appnamespaces/public - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import app_namespace_management_api -from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = app_namespace_management_api.AppNamespaceManagementApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # 获取所有公共AppNamespace (new added) - api_response = api_instance.get_app_namespaces() - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling AppNamespaceManagementApi->get_app_namespaces: %s\n" % e) -``` -### Parameters -This endpoint does not need any parameter. - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_app_namespaces.ApiResponseFor200) | - -#### get_app_namespaces.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | [**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | [**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_app_namespaces_by_app_id** - -> [OpenAppNamespaceDTO] get_app_namespaces_by_app_id(app_id) - -获取指定应用的AppNamespace (new added) - -GET /openapi/v1/apps/{appId}/appnamespaces - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import app_namespace_management_api -from apollo_openapi.model.open_app_namespace_dto import OpenAppNamespaceDTO -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = app_namespace_management_api.AppNamespaceManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - } - try: - # 获取指定应用的AppNamespace (new added) - api_response = api_instance.get_app_namespaces_by_app_id( - path_params=path_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling AppNamespaceManagementApi->get_app_namespaces_by_app_id: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_app_namespaces_by_app_id.ApiResponseFor200) | - -#### get_app_namespaces_by_app_id.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | [**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | [**OpenAppNamespaceDTO**]({{complexTypePrefix}}OpenAppNamespaceDTO.md) | | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_public_app_namespace_instances** - -> [OpenNamespaceDTO] get_public_app_namespace_instances(envpublic_namespace_namepagesize) - -获取公共AppNamespace的所有实例 (new added) - -GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import app_namespace_management_api -from apollo_openapi.model.open_namespace_dto import OpenNamespaceDTO -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = app_namespace_management_api.AppNamespaceManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'env': "env_example", - 'publicNamespaceName': "publicNamespaceName_example", - } - query_params = { - 'page': 0, - 'size': 10, - } - try: - # 获取公共AppNamespace的所有实例 (new added) - api_response = api_instance.get_public_app_namespace_instances( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling AppNamespaceManagementApi->get_public_app_namespace_instances: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -page | PageSchema | | -size | SizeSchema | | - - -# PageSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -# SizeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -env | EnvSchema | | -publicNamespaceName | PublicNamespaceNameSchema | | - -# EnvSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PublicNamespaceNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_public_app_namespace_instances.ApiResponseFor200) | 成功获取实例列表 - -#### get_public_app_namespace_instances.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | [**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | [**OpenNamespaceDTO**]({{complexTypePrefix}}OpenNamespaceDTO.md) | | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/python/docs/apis/tags/ClusterManagementApi.md b/python/docs/apis/tags/ClusterManagementApi.md deleted file mode 100644 index 11ba1f6d..00000000 --- a/python/docs/apis/tags/ClusterManagementApi.md +++ /dev/null @@ -1,495 +0,0 @@ - -# 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_created_by_display_name="data_change_created_by_display_name_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_last_modified_by_display_name="data_change_last_modified_by_display_name_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", - id=1, - parent_cluster_id=1, - comment="comment_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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_cluster** - -> delete_cluster(envapp_idcluster_name) - -删除集群 (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 = { - } - try: - # 删除集群 (new added) - api_response = api_instance.delete_cluster( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling ClusterManagementApi->delete_cluster: %s\n" % e) - - # example passing only optional values - 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, - ) - 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 | | optional - - -# 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 | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -#### delete_cluster.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### delete_cluster.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### delete_cluster.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/python/docs/apis/tags/EnvironmentManagementApi.md b/python/docs/apis/tags/EnvironmentManagementApi.md deleted file mode 100644 index fac15bca..00000000 --- a/python/docs/apis/tags/EnvironmentManagementApi.md +++ /dev/null @@ -1,87 +0,0 @@ - -# apollo_openapi.apis.tags.environment_management_api.EnvironmentManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_envs**](#get_envs) | **get** /openapi/v1/envs | 获取所有环境 - -# **get_envs** - -> [str] get_envs() - -获取所有环境 - -GET /openapi/v1/envs - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import environment_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 = environment_management_api.EnvironmentManagementApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # 获取所有环境 - api_response = api_instance.get_envs() - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling EnvironmentManagementApi->get_envs: %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_envs.ApiResponseFor200) | 成功获取环境列表 - -#### get_envs.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) diff --git a/python/docs/apis/tags/InstanceManagementApi.md b/python/docs/apis/tags/InstanceManagementApi.md deleted file mode 100644 index db403011..00000000 --- a/python/docs/apis/tags/InstanceManagementApi.md +++ /dev/null @@ -1,611 +0,0 @@ - -# apollo_openapi.apis.tags.instance_management_api.InstanceManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_by_namespace**](#get_by_namespace) | **get** /openapi/v1/envs/{env}/instances/by-namespace | 根据namespaceName查询实例(new added) -[**get_by_release**](#get_by_release) | **get** /openapi/v1/envs/{env}/instances/by-release | 根据发布版本查询实例(支持分页) (new added) -[**get_by_releases_and_namespace_not_in**](#get_by_releases_and_namespace_not_in) | **get** /openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in | 查询不在指定发布版本中的实例 (new added) -[**get_instance_count_by_namespace**](#get_instance_count_by_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances | 获取命名空间下的实例数量 (original openapi) - -# **get_by_namespace** - -> OpenInstancePageDTO get_by_namespace(envapp_idcluster_namenamespace_name) - -根据namespaceName查询实例(new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import instance_management_api -from apollo_openapi.model.open_instance_page_dto import OpenInstancePageDTO -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = instance_management_api.InstanceManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'env': "env_example", - } - query_params = { - 'appId': "appId_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - 'page': 0, - 'size': 0, - } - try: - # 根据namespaceName查询实例(new added) - api_response = api_instance.get_by_namespace( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling InstanceManagementApi->get_by_namespace: %s\n" % e) - - # example passing only optional values - path_params = { - 'env': "env_example", - } - query_params = { - 'appId': "appId_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - 'instanceAppId': "instanceAppId_example", - 'page': 0, - 'size': 0, - } - try: - # 根据namespaceName查询实例(new added) - api_response = api_instance.get_by_namespace( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling InstanceManagementApi->get_by_namespace: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -clusterName | ClusterNameSchema | | -namespaceName | NamespaceNameSchema | | -instanceAppId | InstanceAppIdSchema | | optional -page | PageSchema | | -size | SizeSchema | | - - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ClusterNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# NamespaceNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# InstanceAppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PageSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 0 - -# SizeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 0 - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -env | EnvSchema | | - -# EnvSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_by_namespace.ApiResponseFor200) | - -#### get_by_namespace.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenInstancePageDTO**](../../models/OpenInstancePageDTO.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_by_release** - -> OpenInstancePageDTO get_by_release(envrelease_idpagesize) - -根据发布版本查询实例(支持分页) (new added) - -GET /openapi/v1/envs/{env}/instances/by-release - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import instance_management_api -from apollo_openapi.model.open_instance_page_dto import OpenInstancePageDTO -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = instance_management_api.InstanceManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'env': "env_example", - } - query_params = { - 'releaseId': 1, - 'page': 0, - 'size': 20, - } - try: - # 根据发布版本查询实例(支持分页) (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_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 - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -releaseId | ReleaseIdSchema | | -page | PageSchema | | -size | SizeSchema | | - - -# ReleaseIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -# PageSchema - -## Model Type Info -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 | | - -# EnvSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_by_release.ApiResponseFor200) | - -#### get_by_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 -------------- | ------------- | ------------- -[**OpenInstancePageDTO**](../../models/OpenInstancePageDTO.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_by_releases_and_namespace_not_in** - -> [OpenInstanceDTO] get_by_releases_and_namespace_not_in(envapp_idcluster_namenamespace_namerelease_ids) - -查询不在指定发布版本中的实例 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import instance_management_api -from apollo_openapi.model.open_instance_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", - } - query_params = { - 'appId': "appId_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - 'releaseIds': "releaseIds_example", - } - try: - # 查询不在指定发布版本中的实例 (new added) - api_response = api_instance.get_by_releases_and_namespace_not_in( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling InstanceManagementApi->get_by_releases_and_namespace_not_in: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -clusterName | ClusterNameSchema | | -namespaceName | NamespaceNameSchema | | -releaseIds | ReleaseIdsSchema | | - - -# 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, | | - -# ReleaseIdsSchema - -## 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](#get_by_releases_and_namespace_not_in.ApiResponseFor200) | - -#### get_by_releases_and_namespace_not_in.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) - -# **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) diff --git a/python/docs/apis/tags/ItemManagementApi.md b/python/docs/apis/tags/ItemManagementApi.md deleted file mode 100644 index 9073cbbe..00000000 --- a/python/docs/apis/tags/ItemManagementApi.md +++ /dev/null @@ -1,2753 +0,0 @@ - -# 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 | 通过文本批量修改配置项 (new added) -[**compare_items**](#compare_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff | 对比命名空间配置差异 (new added) -[**create_item**](#create_item) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 创建新的配置项 (original openapi) -[**delete_item**](#delete_item) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 删除配置项 (original openapi) -[**delete_item_by_encoded_key**](#delete_item_by_encoded_key) | **delete** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key删除配置项 (original openapi) -[**find_branch_items**](#find_branch_items) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items | 获取分支下的配置项 (new added) -[**find_items_by_namespace**](#find_items_by_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items | 获取命名空间下的配置项列表 (original openapi) -[**get_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/revocation | 撤销配置项更改 (new added) -[**sync_items**](#sync_items) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize | 同步配置项到多个命名空间 (new added) -[**syntax_check**](#syntax_check) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation | 验证配置文本语法 (new added) -[**update_item**](#update_item) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} | 更新配置项 (original openapi) -[**update_item_by_encoded_key**](#update_item_by_encoded_key) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} | 通过编码的key更新配置项 (original openapi) - -# **batch_update_items_by_text** - -> batch_update_items_by_text(app_idenvcluster_namenamespace_nameopen_namespace_text_model) - -通过文本批量修改配置项 (new added) - -PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: - -### 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 = { - } - body = OpenNamespaceTextModel( - app_id="app_id_example", - env="env_example", - cluster_name="cluster_name_example", - namespace_name="namespace_name_example", - namespace_id=1, - format="format_example", - config_text="config_text_example", - operator="operator_example", - ) - try: - # 通过文本批量修改配置项 (new added) - api_response = api_instance.batch_update_items_by_text( - path_params=path_params, - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->batch_update_items_by_text: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - 'operator': "operator_example", - } - body = OpenNamespaceTextModel( - app_id="app_id_example", - env="env_example", - cluster_name="cluster_name_example", - namespace_name="namespace_name_example", - namespace_id=1, - format="format_example", - config_text="config_text_example", - operator="operator_example", - ) - try: - # 通过文本批量修改配置项 (new added) - api_response = api_instance.batch_update_items_by_text( - path_params=path_params, - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->batch_update_items_by_text: %s\n" % e) -``` -### 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 | | optional - - -# 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 | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -#### 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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **compare_items** - -> [OpenItemDiffDTO] compare_items(app_idenvcluster_namenamespace_nameopen_namespace_sync_dto) - -对比命名空间配置差异 (new added) - -POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff - -### 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_dto import OpenNamespaceSyncDTO -from apollo_openapi.model.open_item_diff_dto import OpenItemDiffDTO -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -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 = OpenNamespaceSyncDTO( - sync_to_namespaces=[ - OpenNamespaceIdentifier( - app_id="app_id_example", - env="env_example", - cluster_name="cluster_name_example", - namespace_name="namespace_name_example", - ) - ], - sync_items=[ - OpenItemDTO( - key="key_example", - value="value_example", - type=1, - comment="comment_example", - line_num=1, - extend_info=OpenItemExtendDTO( - namespace_id=1, - is_modified=True, - is_deleted=True, - is_newly_added=True, - new_value="new_value_example", - old_value="old_value_example", - ), - data_change_created_by="data_change_created_by_example", - data_change_created_by_display_name="data_change_created_by_display_name_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_last_modified_by_display_name="data_change_last_modified_by_display_name_example", - data_change_created_time="2025-09-29T12:34:56Z", - data_change_last_modified_time="2025-09-29T12:34:56Z", - ) - ], - ) - try: - # 对比命名空间配置差异 (new added) - api_response = api_instance.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 -------------- | ------------- | ------------- -[**OpenNamespaceSyncDTO**](../../models/OpenNamespaceSyncDTO.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 -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenItemDiffDTO**]({{complexTypePrefix}}OpenItemDiffDTO.md) | [**OpenItemDiffDTO**]({{complexTypePrefix}}OpenItemDiffDTO.md) | [**OpenItemDiffDTO**]({{complexTypePrefix}}OpenItemDiffDTO.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_nameopen_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 = { - } - body = OpenItemDTO( - key="key_example", - value="value_example", - type=1, - comment="comment_example", - line_num=1, - extend_info=OpenItemExtendDTO( - namespace_id=1, - is_modified=True, - is_deleted=True, - is_newly_added=True, - new_value="new_value_example", - old_value="old_value_example", - ), - data_change_created_by="data_change_created_by_example", - data_change_created_by_display_name="data_change_created_by_display_name_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_last_modified_by_display_name="data_change_last_modified_by_display_name_example", - data_change_created_time="2025-09-29T12:34:56Z", - data_change_last_modified_time="2025-09-29T12:34:56Z", - ) - try: - # 创建新的配置项 (original openapi) - api_response = api_instance.create_item( - path_params=path_params, - query_params=query_params, - body=body, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->create_item: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - 'operator': "operator_example", - } - body = OpenItemDTO( - key="key_example", - value="value_example", - type=1, - comment="comment_example", - line_num=1, - extend_info=OpenItemExtendDTO( - namespace_id=1, - is_modified=True, - is_deleted=True, - is_newly_added=True, - new_value="new_value_example", - old_value="old_value_example", - ), - data_change_created_by="data_change_created_by_example", - data_change_created_by_display_name="data_change_created_by_display_name_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_last_modified_by_display_name="data_change_last_modified_by_display_name_example", - data_change_created_time="2025-09-29T12:34:56Z", - data_change_last_modified_time="2025-09-29T12:34:56Z", - ) - try: - # 创建新的配置项 (original openapi) - api_response = api_instance.create_item( - path_params=path_params, - query_params=query_params, - body=body, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->create_item: %s\n" % e) -``` -### 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 | | optional - - -# 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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_item** - -> delete_item(app_idenvcluster_namenamespace_namekey) - -删除配置项 (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 = { - } - try: - # 删除配置项 (original openapi) - api_response = api_instance.delete_item( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->delete_item: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - 'key': "key_example", - } - query_params = { - 'operator': "operator_example", - } - try: - # 删除配置项 (original openapi) - api_response = api_instance.delete_item( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->delete_item: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -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 | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_item_by_encoded_key** - -> 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, - ) - 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 | | -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 | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **find_branch_items** - -> [OpenItemDTO] find_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.find_branch_items( - path_params=path_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->find_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](#find_branch_items.ApiResponseFor200) | 成功获取分支下的配置项列表 -404 | [ApiResponseFor404](#find_branch_items.ApiResponseFor404) | 分支不存在 - -#### find_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) | | - -#### find_branch_items.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **find_items_by_namespace** - -> OpenItemPageDTO 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_item_page_dto import OpenItemPageDTO -from apollo_openapi.model.exception_response import ExceptionResponse -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# 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 -------------- | ------------- | ------------- -[**OpenItemPageDTO**](../../models/OpenItemPageDTO.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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **revert_items** - -> revert_items(app_idenvcluster_namenamespace_name) - -撤销配置项更改 (new added) - -POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation - -### 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 = { - } - try: - # 撤销配置项更改 (new added) - api_response = api_instance.revert_items( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->revert_items: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - 'operator': "operator_example", - } - try: - # 撤销配置项更改 (new added) - api_response = api_instance.revert_items( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->revert_items: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -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 | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -#### revert_items.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### revert_items.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **sync_items** - -> sync_items(app_idenvcluster_namenamespace_nameopen_namespace_sync_dto) - -同步配置项到多个命名空间 (new added) - -POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: - -### 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_dto import OpenNamespaceSyncDTO -from apollo_openapi.model.exception_response import ExceptionResponse -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# 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 = { - } - body = OpenNamespaceSyncDTO( - sync_to_namespaces=[ - OpenNamespaceIdentifier( - app_id="app_id_example", - env="env_example", - cluster_name="cluster_name_example", - namespace_name="namespace_name_example", - ) - ], - sync_items=[ - OpenItemDTO( - key="key_example", - value="value_example", - type=1, - comment="comment_example", - line_num=1, - extend_info=OpenItemExtendDTO( - namespace_id=1, - is_modified=True, - is_deleted=True, - is_newly_added=True, - new_value="new_value_example", - old_value="old_value_example", - ), - data_change_created_by="data_change_created_by_example", - data_change_created_by_display_name="data_change_created_by_display_name_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_last_modified_by_display_name="data_change_last_modified_by_display_name_example", - data_change_created_time="2025-09-29T12:34:56Z", - data_change_last_modified_time="2025-09-29T12:34:56Z", - ) - ], - ) - try: - # 同步配置项到多个命名空间 (new added) - api_response = api_instance.sync_items( - path_params=path_params, - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->sync_items: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - 'operator': "operator_example", - } - body = OpenNamespaceSyncDTO( - sync_to_namespaces=[ - OpenNamespaceIdentifier( - app_id="app_id_example", - env="env_example", - cluster_name="cluster_name_example", - namespace_name="namespace_name_example", - ) - ], - sync_items=[ - OpenItemDTO( - key="key_example", - value="value_example", - type=1, - comment="comment_example", - line_num=1, - extend_info=OpenItemExtendDTO( - namespace_id=1, - is_modified=True, - is_deleted=True, - is_newly_added=True, - new_value="new_value_example", - old_value="old_value_example", - ), - data_change_created_by="data_change_created_by_example", - data_change_created_by_display_name="data_change_created_by_display_name_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_last_modified_by_display_name="data_change_last_modified_by_display_name_example", - data_change_created_time="2025-09-29T12:34:56Z", - data_change_last_modified_time="2025-09-29T12:34:56Z", - ) - ], - ) - try: - # 同步配置项到多个命名空间 (new added) - api_response = api_instance.sync_items( - path_params=path_params, - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->sync_items: %s\n" % e) -``` -### 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 -------------- | ------------- | ------------- -[**OpenNamespaceSyncDTO**](../../models/OpenNamespaceSyncDTO.md) | | - - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -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 | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -#### sync_items.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### sync_items.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **syntax_check** - -> syntax_check(app_idenvcluster_namenamespace_nameopen_namespace_text_model) - -验证配置文本语法 (new added) - -POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation - -### 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.syntax_check( - path_params=path_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->syntax_check: %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](#syntax_check.ApiResponseFor200) | 配置文本语法验证通过 -400 | [ApiResponseFor400](#syntax_check.ApiResponseFor400) | 配置文本语法错误 - -#### syntax_check.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -#### syntax_check.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### 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** - -> 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( - key="key_example", - value="value_example", - type=1, - comment="comment_example", - line_num=1, - extend_info=OpenItemExtendDTO( - namespace_id=1, - is_modified=True, - is_deleted=True, - is_newly_added=True, - new_value="new_value_example", - old_value="old_value_example", - ), - data_change_created_by="data_change_created_by_example", - data_change_created_by_display_name="data_change_created_by_display_name_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_last_modified_by_display_name="data_change_last_modified_by_display_name_example", - data_change_created_time="2025-09-29T12:34:56Z", - data_change_last_modified_time="2025-09-29T12:34:56Z", - ) - try: - # 更新配置项 (original openapi) - api_response = api_instance.update_item( - path_params=path_params, - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->update_item: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - 'key': "key_example", - } - query_params = { - 'createIfNotExists': False, - 'operator': "operator_example", - } - body = OpenItemDTO( - key="key_example", - value="value_example", - type=1, - comment="comment_example", - line_num=1, - extend_info=OpenItemExtendDTO( - namespace_id=1, - is_modified=True, - is_deleted=True, - is_newly_added=True, - new_value="new_value_example", - old_value="old_value_example", - ), - data_change_created_by="data_change_created_by_example", - data_change_created_by_display_name="data_change_created_by_display_name_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_last_modified_by_display_name="data_change_last_modified_by_display_name_example", - data_change_created_time="2025-09-29T12:34:56Z", - data_change_last_modified_time="2025-09-29T12:34:56Z", - ) - try: - # 更新配置项 (original openapi) - api_response = api_instance.update_item( - path_params=path_params, - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->update_item: %s\n" % e) -``` -### 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 | | -operator | OperatorSchema | | optional - - -# CreateIfNotExistsSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | if omitted the server will use the default value of False - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -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 | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -#### update_item.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### update_item.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### update_item.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **update_item_by_encoded_key** - -> 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( - key="key_example", - value="value_example", - type=1, - comment="comment_example", - line_num=1, - extend_info=OpenItemExtendDTO( - namespace_id=1, - is_modified=True, - is_deleted=True, - is_newly_added=True, - new_value="new_value_example", - old_value="old_value_example", - ), - data_change_created_by="data_change_created_by_example", - data_change_created_by_display_name="data_change_created_by_display_name_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_last_modified_by_display_name="data_change_last_modified_by_display_name_example", - data_change_created_time="2025-09-29T12:34:56Z", - data_change_last_modified_time="2025-09-29T12:34:56Z", - ) - try: - # 通过编码的key更新配置项 (original openapi) - api_response = api_instance.update_item_by_encoded_key( - path_params=path_params, - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->update_item_by_encoded_key: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - 'key': "key_example", - } - query_params = { - 'createIfNotExists': False, - 'operator': "operator_example", - } - body = OpenItemDTO( - key="key_example", - value="value_example", - type=1, - comment="comment_example", - line_num=1, - extend_info=OpenItemExtendDTO( - namespace_id=1, - is_modified=True, - is_deleted=True, - is_newly_added=True, - new_value="new_value_example", - old_value="old_value_example", - ), - data_change_created_by="data_change_created_by_example", - data_change_created_by_display_name="data_change_created_by_display_name_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_last_modified_by_display_name="data_change_last_modified_by_display_name_example", - data_change_created_time="2025-09-29T12:34:56Z", - data_change_last_modified_time="2025-09-29T12:34:56Z", - ) - try: - # 通过编码的key更新配置项 (original openapi) - api_response = api_instance.update_item_by_encoded_key( - path_params=path_params, - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling ItemManagementApi->update_item_by_encoded_key: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -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 | | -operator | OperatorSchema | | optional - - -# CreateIfNotExistsSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | if omitted the server will use the default value of False - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -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 | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -#### 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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### update_item_by_encoded_key.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### update_item_by_encoded_key.ApiResponseFor404 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor404ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor404ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[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 deleted file mode 100644 index 4caaec53..00000000 --- a/python/docs/apis/tags/NamespaceBranchManagementApi.md +++ /dev/null @@ -1,1302 +0,0 @@ - -# 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**](#merge) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge | 合并分支 (original openapi) -[**merge_branch**](#merge_branch) | **post** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} | 合并分支到主分支 (new added) -[**update_branch_rules**](#update_branch_rules) | **put** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules | 更新分支灰度发布规则 (original openapi) - -# **create_branch** - -> OpenNamespaceDTO create_branch(app_idenvcluster_namenamespace_name) - -创建命名空间分支 (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 = { - } - try: - # 创建命名空间分支 (original openapi) - api_response = api_instance.create_branch( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceBranchManagementApi->create_branch: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - 'operator': "operator_example", - } - 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 | | optional - - -# 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** - -> delete_branch(envapp_idcluster_namenamespace_namebranch_name) - -删除命名空间分支 (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 = { - } - try: - # 删除命名空间分支 (original openapi) - api_response = api_instance.delete_branch( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceBranchManagementApi->delete_branch: %s\n" % e) - - # example passing only optional values - path_params = { - 'env': "env_example", - 'appId': "appId_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - 'branchName': "branchName_example", - } - query_params = { - 'operator': "operator_example", - } - try: - # 删除命名空间分支 (original openapi) - api_response = api_instance.delete_branch( - path_params=path_params, - query_params=query_params, - ) - 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 | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -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 | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **find_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", - } - query_params = { - } - try: - # 获取命名空间分支信息 (original openapi) - api_response = api_instance.find_branch( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceBranchManagementApi->find_branch: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - 'extendInfo': False, - } - try: - # 获取命名空间分支信息 (original openapi) - api_response = api_instance.find_branch( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceBranchManagementApi->find_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 -------------- | ------------- | ------------- | ------------- -extendInfo | ExtendInfoSchema | | optional - - -# ExtendInfoSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | if omitted the server will use the default value of False - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **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** - -> OpenReleaseDTO merge(app_idenvcluster_namenamespace_namebranch_namedelete_branchnamespace_release_dto) - -合并分支 (original openapi) - -合并灰度分支并可选择删除分支 - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import namespace_branch_management_api -from apollo_openapi.model.open_release_dto import OpenReleaseDTO -from apollo_openapi.model.namespace_release_dto import NamespaceReleaseDTO -from apollo_openapi.model.exception_response import ExceptionResponse -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = namespace_branch_management_api.NamespaceBranchManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - 'branchName': "branchName_example", - } - query_params = { - 'deleteBranch': True, - } - body = NamespaceReleaseDTO( - release_title="release_title_example", - release_comment="release_comment_example", - released_by="released_by_example", - is_emergency_publish=True, - ) - try: - # 合并分支 (original openapi) - api_response = api_instance.merge( - path_params=path_params, - query_params=query_params, - body=body, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceBranchManagementApi->merge: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**NamespaceReleaseDTO**](../../models/NamespaceReleaseDTO.md) | | - - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -deleteBranch | DeleteBranchSchema | | - - -# DeleteBranchSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -env | EnvSchema | | -clusterName | ClusterNameSchema | | -namespaceName | NamespaceNameSchema | | -branchName | BranchNameSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# EnvSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ClusterNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# NamespaceNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# BranchNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#merge.ApiResponseFor200) | 分支合并成功 -400 | [ApiResponseFor400](#merge.ApiResponseFor400) | 合并参数错误 -403 | [ApiResponseFor403](#merge.ApiResponseFor403) | 权限不足 - -#### merge.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenReleaseDTO**](../../models/OpenReleaseDTO.md) | | - - -#### merge.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### merge.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[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_branchnamespace_release_dto) - -合并分支到主分支 (new added) - -POST /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 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, - } - body = NamespaceReleaseDTO( - release_title="release_title_example", - release_comment="release_comment_example", - released_by="released_by_example", - is_emergency_publish=True, - ) - try: - # 合并分支到主分支 (new added) - api_response = api_instance.merge_branch( - path_params=path_params, - query_params=query_params, - body=body, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceBranchManagementApi->merge_branch: %s\n" % e) - - # example passing only optional values - path_params = { - 'env': "env_example", - 'appId': "appId_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - 'branchName': "branchName_example", - } - query_params = { - 'deleteBranch': True, - 'operator': "operator_example", - } - 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 | | optional - - -# 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** - -> update_branch_rules(app_idenvcluster_namenamespace_namebranch_nameopen_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 = { - } - body = OpenGrayReleaseRuleDTO( - data_change_created_by="data_change_created_by_example", - data_change_created_by_display_name="data_change_created_by_display_name_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_last_modified_by_display_name="data_change_last_modified_by_display_name_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, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceBranchManagementApi->update_branch_rules: %s\n" % e) - - # example passing only optional values - 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_created_by_display_name="data_change_created_by_display_name_example", - data_change_last_modified_by="data_change_last_modified_by_example", - data_change_last_modified_by_display_name="data_change_last_modified_by_display_name_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, - ) - 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 -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 | | optional - - -# 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 | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/python/docs/apis/tags/NamespaceLockManagementApi.md b/python/docs/apis/tags/NamespaceLockManagementApi.md deleted file mode 100644 index 733050bb..00000000 --- a/python/docs/apis/tags/NamespaceLockManagementApi.md +++ /dev/null @@ -1,135 +0,0 @@ - -# apollo_openapi.apis.tags.namespace_lock_management_api.NamespaceLockManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_namespace_lock**](#get_namespace_lock) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock | 获取Namespace的锁状态 (original openapi) - -# **get_namespace_lock** - -> OpenNamespaceLockDTO get_namespace_lock(app_idenvcluster_namenamespace_name) - -获取Namespace的锁状态 (original openapi) - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import namespace_lock_management_api -from apollo_openapi.model.open_namespace_lock_dto import OpenNamespaceLockDTO -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = namespace_lock_management_api.NamespaceLockManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - try: - # 获取Namespace的锁状态 (original openapi) - api_response = api_instance.get_namespace_lock( - path_params=path_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceLockManagementApi->get_namespace_lock: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -env | EnvSchema | | -clusterName | ClusterNameSchema | | -namespaceName | NamespaceNameSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# EnvSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ClusterNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# NamespaceNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_namespace_lock.ApiResponseFor200) | - -#### get_namespace_lock.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenNamespaceLockDTO**](../../models/OpenNamespaceLockDTO.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/python/docs/apis/tags/NamespaceManagementApi.md b/python/docs/apis/tags/NamespaceManagementApi.md deleted file mode 100644 index c1eeb030..00000000 --- a/python/docs/apis/tags/NamespaceManagementApi.md +++ /dev/null @@ -1,1326 +0,0 @@ - -# apollo_openapi.apis.tags.namespace_management_api.NamespaceManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_missing_namespaces**](#create_missing_namespaces) | **post** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces | 创建缺失的Namespace (new added) -[**create_namespaces**](#create_namespaces) | **post** /openapi/v1/namespaces | 创建Namespace (new added) -[**delete_namespace**](#delete_namespace) | **delete** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} | 删除指定的Namespace (new added) -[**find_missing_namespaces**](#find_missing_namespaces) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces | 查找缺失的Namespace (new added) -[**find_namespace**](#find_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} | 获取指定的Namespace (original openapi) -[**find_namespace_usage**](#find_namespace_usage) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage | 查询namespace使用情况(new added) -[**find_namespaces**](#find_namespaces) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces | 获取指定集群下的所有Namespace (original openapi) -[**find_public_namespace_for_associated_namespace**](#find_public_namespace_for_associated_namespace) | **get** /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace | 查询关联Namespace对应的公共Namespace详情 (new added) -[**get_namespaces_release_status**](#get_namespaces_release_status) | **get** /openapi/v1/apps/{appId}/namespaces/releases/status | 获取应用下所有Namespace的发布状态 (new added) - -# **create_missing_namespaces** - -> create_missing_namespaces(app_idenvcluster_name) - -创建缺失的Namespace (new added) - -POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces - -### 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", - } - query_params = { - } - try: - # 创建缺失的Namespace (new added) - api_response = api_instance.create_missing_namespaces( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->create_missing_namespaces: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - } - query_params = { - 'operator': "operator_example", - } - try: - # 创建缺失的Namespace (new added) - api_response = api_instance.create_missing_namespaces( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->create_missing_namespaces: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -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](#create_missing_namespaces.ApiResponseFor200) | 缺失的命名空间创建成功 - -#### create_missing_namespaces.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_namespaces** - -> create_namespaces(open_create_namespace_dto) - -创建Namespace (new added) - -POST /openapi/v1/apps/{appId}/namespaces - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import namespace_management_api -from apollo_openapi.model.open_create_namespace_dto import OpenCreateNamespaceDTO -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -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 = { - } - body = [ - OpenCreateNamespaceDTO( - app_id="app_id_example", - env="env_example", - cluster_name="cluster_name_example", - app_namespace_name="app_namespace_name_example", - ) - ] - try: - # 创建Namespace (new added) - api_response = api_instance.create_namespaces( - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->create_namespaces: %s\n" % e) - - # example passing only optional values - query_params = { - 'operator': "operator_example", - } - body = [ - OpenCreateNamespaceDTO( - app_id="app_id_example", - env="env_example", - cluster_name="cluster_name_example", - app_namespace_name="app_namespace_name_example", - ) - ] - try: - # 创建Namespace (new added) - api_response = api_instance.create_namespaces( - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->create_namespaces: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -query_params | RequestQueryParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -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 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenCreateNamespaceDTO**]({{complexTypePrefix}}OpenCreateNamespaceDTO.md) | [**OpenCreateNamespaceDTO**]({{complexTypePrefix}}OpenCreateNamespaceDTO.md) | [**OpenCreateNamespaceDTO**]({{complexTypePrefix}}OpenCreateNamespaceDTO.md) | | - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional - - -# OperatorSchema - -## 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_namespaces.ApiResponseFor200) | Namespace创建成功 - -#### create_namespaces.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_namespace** - -> delete_namespace(app_idenvcluster_namenamespace_name) - -删除指定的Namespace (new added) - -DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{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", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - } - try: - # 删除指定的Namespace (new added) - api_response = api_instance.delete_namespace( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->delete_namespace: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - 'operator': "operator_example", - } - try: - # 删除指定的Namespace (new added) - api_response = api_instance.delete_namespace( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->delete_namespace: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -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.ApiResponseFor200) | 解除关联成功 - -#### delete_namespace.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **find_missing_namespaces** - -> [str] find_missing_namespaces(app_idenvcluster_name) - -查找缺失的Namespace (new added) - -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces - -### 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.find_missing_namespaces( - path_params=path_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->find_missing_namespaces: %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](#find_missing_namespaces.ApiResponseFor200) | 缺失的命名空间名称列表 - -#### find_missing_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 -------------- | ------------- | ------------- | ------------- | ------------- -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) - -# **find_namespace** - -> OpenNamespaceDTO find_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.find_namespace( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->find_namespace: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - 'fillItemDetail': True, - 'extendInfo': False, - } - try: - # 获取指定的Namespace (original openapi) - api_response = api_instance.find_namespace( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->find_namespace: %s\n" % e) -``` -### Parameters - -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 | | -extendInfo | ExtendInfoSchema | | optional - - -# FillItemDetailSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | if omitted the server will use the default value of True - -# ExtendInfoSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | if omitted the server will use the default value of False - -### path_params -#### RequestPathParams - -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_namespace.ApiResponseFor200) | - -#### find_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) - -# **find_namespace_usage** - -> [OpenNamespaceUsageDTO] find_namespace_usage(app_idenvcluster_namenamespace_name) - -查询namespace使用情况(new added) - -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import namespace_management_api -from apollo_openapi.model.open_namespace_usage_dto import OpenNamespaceUsageDTO -from pprint import pprint -# Defining the host is optional and defaults to http://localhost -# See configuration.py for a list of all supported configuration parameters. -configuration = apollo_openapi.Configuration( - host = "http://localhost" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: ApiKeyAuth -configuration.api_key['ApiKeyAuth'] = 'YOUR_API_KEY' - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer' -# Enter a context with an instance of the API client -with apollo_openapi.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = 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.find_namespace_usage( - path_params=path_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->find_namespace_usage: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -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_namespace_usage.ApiResponseFor200) | NamespaceUsage查询成功 - -#### find_namespace_usage.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenNamespaceUsageDTO**]({{complexTypePrefix}}OpenNamespaceUsageDTO.md) | [**OpenNamespaceUsageDTO**]({{complexTypePrefix}}OpenNamespaceUsageDTO.md) | [**OpenNamespaceUsageDTO**]({{complexTypePrefix}}OpenNamespaceUsageDTO.md) | | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **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) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - } - query_params = { - 'fillItemDetail': True, - 'extendInfo': False, - } - try: - # 获取指定集群下的所有Namespace (original openapi) - api_response = api_instance.find_namespaces( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->find_namespaces: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -fillItemDetail | FillItemDetailSchema | | -extendInfo | ExtendInfoSchema | | optional - - -# FillItemDetailSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | if omitted the server will use the default value of True - -# ExtendInfoSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | if omitted the server will use the default value of False - -### path_params -#### RequestPathParams - -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) - -# **find_public_namespace_for_associated_namespace** - -> OpenNamespaceDTO find_public_namespace_for_associated_namespace(envapp_idcluster_namenamespace_name) - -查询关联Namespace对应的公共Namespace详情 (new added) - -GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace - -### 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", - 'appId': "appId_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - } - try: - # 查询关联Namespace对应的公共Namespace详情 (new added) - api_response = api_instance.find_public_namespace_for_associated_namespace( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->find_public_namespace_for_associated_namespace: %s\n" % e) - - # example passing only optional values - path_params = { - 'env': "env_example", - 'appId': "appId_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - 'extendInfo': False, - } - try: - # 查询关联Namespace对应的公共Namespace详情 (new added) - api_response = api_instance.find_public_namespace_for_associated_namespace( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling NamespaceManagementApi->find_public_namespace_for_associated_namespace: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -extendInfo | ExtendInfoSchema | | optional - - -# ExtendInfoSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | if omitted the server will use the default value of False - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -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](#find_public_namespace_for_associated_namespace.ApiResponseFor200) | 成功获取关联的公共Namespace详情 - -#### find_public_namespace_for_associated_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) - -# **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) diff --git a/python/docs/apis/tags/OrganizationManagementApi.md b/python/docs/apis/tags/OrganizationManagementApi.md deleted file mode 100644 index 6100c697..00000000 --- a/python/docs/apis/tags/OrganizationManagementApi.md +++ /dev/null @@ -1,105 +0,0 @@ - -# 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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/python/docs/apis/tags/PermissionManagementApi.md b/python/docs/apis/tags/PermissionManagementApi.md deleted file mode 100644 index 386babc8..00000000 --- a/python/docs/apis/tags/PermissionManagementApi.md +++ /dev/null @@ -1,3412 +0,0 @@ - -# apollo_openapi.apis.tags.permission_management_api.PermissionManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_create_application_role_to_users**](#add_create_application_role_to_users) | **post** /openapi/v1/system/roles/create-application | 分配建应用角色 (new added) -[**add_manage_app_master_role_to_user**](#add_manage_app_master_role_to_user) | **post** /openapi/v1/apps/{appId}/roles/master | 分配AppMaster (new added) -[**assign_app_role_to_user**](#assign_app_role_to_user) | **post** /openapi/v1/apps/{appId}/roles/{roleType} | 分配应用角色 (new added) -[**assign_cluster_namespace_role_to_user**](#assign_cluster_namespace_role_to_user) | **post** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/roles/{roleType} | 分配集群Namespace角色 (new added) -[**assign_namespace_env_role_to_user**](#assign_namespace_env_role_to_user) | **post** /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType} | 分配环境Namespace角色 (new added) -[**assign_namespace_role_to_user**](#assign_namespace_role_to_user) | **post** /openapi/v1/apps/{appId}/namespaces/{namespaceName}/roles/{roleType} | 分配Namespace角色 (new added) -[**delete_create_application_role_from_user**](#delete_create_application_role_from_user) | **delete** /openapi/v1/system/roles/create-application | 移除建应用角色 (new added) -[**get_app_roles**](#get_app_roles) | **get** /openapi/v1/apps/{appId}/role-users | 获取应用角色用户 (new added) -[**get_cluster_namespace_roles**](#get_cluster_namespace_roles) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/role-users | 获取集群Namespace用户 (new added) -[**get_create_application_role_users**](#get_create_application_role_users) | **get** /openapi/v1/system/roles/create-application/role-users | 获取建应用用户 (new added) -[**get_namespace_env_role_users**](#get_namespace_env_role_users) | **get** /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/role-users | 获取环境Namespace用户 (new added) -[**get_namespace_roles**](#get_namespace_roles) | **get** /openapi/v1/apps/{appId}/namespaces/{namespaceName}/role-users | 获取Namespace用户 (new added) -[**has_app_permission**](#has_app_permission) | **get** /openapi/v1/apps/{appId}/permissions/{permissionType} | 校验应用权限 (new added) -[**has_cluster_namespace_permission**](#has_cluster_namespace_permission) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permissions/{permissionType} | 校验集群Namespace权限 (new added) -[**has_create_application_permission**](#has_create_application_permission) | **get** /openapi/v1/system/roles/create-application | 校验建应用权限 (new added) -[**has_env_namespace_permission**](#has_env_namespace_permission) | **get** /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/permissions/{permissionType} | 校验环境Namespace权限 (new added) -[**has_namespace_permission**](#has_namespace_permission) | **get** /openapi/v1/apps/{appId}/namespaces/{namespaceName}/permissions/{permissionType} | 校验Namespace权限 (new added) -[**has_root_permission**](#has_root_permission) | **get** /openapi/v1/permissions/root | 校验Root权限 (new added) -[**init_app_permission**](#init_app_permission) | **post** /openapi/v1/apps/{appId}/namespaces/{namespaceName}/permission-init | 初始化应用权限 (new added) -[**init_cluster_namespace_permission**](#init_cluster_namespace_permission) | **post** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permission-init | 初始化集群Namespace权限 (new added) -[**is_manage_app_master_permission_enabled**](#is_manage_app_master_permission_enabled) | **get** /openapi/v1/system/role/manage-app-master | 校验AppMaster开关 (new added) -[**remove_app_role_from_user**](#remove_app_role_from_user) | **delete** /openapi/v1/apps/{appId}/roles/{roleType} | 移除应用角色 (new added) -[**remove_cluster_namespace_role_from_user**](#remove_cluster_namespace_role_from_user) | **delete** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/roles/{roleType} | 移除集群Namespace角色 (new added) -[**remove_manage_app_master_role_from_user**](#remove_manage_app_master_role_from_user) | **delete** /openapi/v1/apps/{appId}/roles/master | 移除AppMaster (new added) -[**remove_namespace_env_role_from_user**](#remove_namespace_env_role_from_user) | **delete** /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType} | 移除环境Namespace角色 (new added) -[**remove_namespace_role_from_user**](#remove_namespace_role_from_user) | **delete** /openapi/v1/apps/{appId}/namespaces/{namespaceName}/roles/{roleType} | 移除Namespace角色 (new added) - -# **add_create_application_role_to_users** - -> add_create_application_role_to_users() - -分配建应用角色 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only optional values - query_params = { - 'operator': "operator_example", - } - body = [ - "request_body_example" - ] - try: - # 分配建应用角色 (new added) - api_response = api_instance.add_create_application_role_to_users( - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->add_create_application_role_to_users: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -query_params | RequestQueryParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -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 - -## 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, | | - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional - - -# OperatorSchema - -## 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](#add_create_application_role_to_users.ApiResponseFor200) | - -#### add_create_application_role_to_users.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **add_manage_app_master_role_to_user** - -> add_manage_app_master_role_to_user(app_iduser_id) - -分配AppMaster (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - } - query_params = { - 'userId': "userId_example", - } - try: - # 分配AppMaster (new added) - api_response = api_instance.add_manage_app_master_role_to_user( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->add_manage_app_master_role_to_user: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - } - query_params = { - 'operator': "operator_example", - 'userId': "userId_example", - } - try: - # 分配AppMaster (new added) - api_response = api_instance.add_manage_app_master_role_to_user( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->add_manage_app_master_role_to_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional -userId | UserIdSchema | | - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# UserIdSchema - -## 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](#add_manage_app_master_role_to_user.ApiResponseFor200) | - -#### add_manage_app_master_role_to_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **assign_app_role_to_user** - -> assign_app_role_to_user(app_idrole_typeuser_id) - -分配应用角色 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'roleType': "roleType_example", - } - query_params = { - 'userId': "userId_example", - } - try: - # 分配应用角色 (new added) - api_response = api_instance.assign_app_role_to_user( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->assign_app_role_to_user: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'roleType': "roleType_example", - } - query_params = { - 'operator': "operator_example", - 'userId': "userId_example", - } - body = "body_example" - try: - # 分配应用角色 (new added) - api_response = api_instance.assign_app_role_to_user( - path_params=path_params, - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->assign_app_role_to_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson, Unset] | optional, default is unset | -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -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 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional -userId | UserIdSchema | | - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -roleType | RoleTypeSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RoleTypeSchema - -## 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](#assign_app_role_to_user.ApiResponseFor200) | - -#### assign_app_role_to_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **assign_cluster_namespace_role_to_user** - -> assign_cluster_namespace_role_to_user(app_idenvcluster_namerole_typeuser_id) - -分配集群Namespace角色 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'roleType': "roleType_example", - } - query_params = { - 'userId': "userId_example", - } - try: - # 分配集群Namespace角色 (new added) - api_response = api_instance.assign_cluster_namespace_role_to_user( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->assign_cluster_namespace_role_to_user: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'roleType': "roleType_example", - } - query_params = { - 'operator': "operator_example", - 'userId': "userId_example", - } - try: - # 分配集群Namespace角色 (new added) - api_response = api_instance.assign_cluster_namespace_role_to_user( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->assign_cluster_namespace_role_to_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional -userId | UserIdSchema | | - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -env | EnvSchema | | -clusterName | ClusterNameSchema | | -roleType | RoleTypeSchema | | - -# 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, | | - -# RoleTypeSchema - -## 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](#assign_cluster_namespace_role_to_user.ApiResponseFor200) | - -#### assign_cluster_namespace_role_to_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **assign_namespace_env_role_to_user** - -> assign_namespace_env_role_to_user(app_idenvnamespace_namerole_typeuser_id) - -分配环境Namespace角色 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'namespaceName': "namespaceName_example", - 'roleType': "roleType_example", - } - query_params = { - 'userId': "userId_example", - } - try: - # 分配环境Namespace角色 (new added) - api_response = api_instance.assign_namespace_env_role_to_user( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->assign_namespace_env_role_to_user: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'namespaceName': "namespaceName_example", - 'roleType': "roleType_example", - } - query_params = { - 'operator': "operator_example", - 'userId': "userId_example", - } - try: - # 分配环境Namespace角色 (new added) - api_response = api_instance.assign_namespace_env_role_to_user( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->assign_namespace_env_role_to_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional -userId | UserIdSchema | | - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -env | EnvSchema | | -namespaceName | NamespaceNameSchema | | -roleType | RoleTypeSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# EnvSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# NamespaceNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RoleTypeSchema - -## 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](#assign_namespace_env_role_to_user.ApiResponseFor200) | - -#### assign_namespace_env_role_to_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **assign_namespace_role_to_user** - -> assign_namespace_role_to_user(app_idnamespace_namerole_typeuser_id) - -分配Namespace角色 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'namespaceName': "namespaceName_example", - 'roleType': "roleType_example", - } - query_params = { - 'userId': "userId_example", - } - try: - # 分配Namespace角色 (new added) - api_response = api_instance.assign_namespace_role_to_user( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->assign_namespace_role_to_user: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'namespaceName': "namespaceName_example", - 'roleType': "roleType_example", - } - query_params = { - 'operator': "operator_example", - 'userId': "userId_example", - } - try: - # 分配Namespace角色 (new added) - api_response = api_instance.assign_namespace_role_to_user( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->assign_namespace_role_to_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional -userId | UserIdSchema | | - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -namespaceName | NamespaceNameSchema | | -roleType | RoleTypeSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# NamespaceNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RoleTypeSchema - -## 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](#assign_namespace_role_to_user.ApiResponseFor200) | - -#### assign_namespace_role_to_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_create_application_role_from_user** - -> delete_create_application_role_from_user(user_id) - -移除建应用角色 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'userId': "userId_example", - } - try: - # 移除建应用角色 (new added) - api_response = api_instance.delete_create_application_role_from_user( - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->delete_create_application_role_from_user: %s\n" % e) - - # example passing only optional values - query_params = { - 'operator': "operator_example", - 'userId': "userId_example", - } - try: - # 移除建应用角色 (new added) - api_response = api_instance.delete_create_application_role_from_user( - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->delete_create_application_role_from_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional -userId | UserIdSchema | | - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# UserIdSchema - -## 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_create_application_role_from_user.ApiResponseFor200) | - -#### delete_create_application_role_from_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_app_roles** - -> OpenAppRoleUserDTO get_app_roles(app_id) - -获取应用角色用户 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_management_api -from apollo_openapi.model.open_app_role_user_dto import OpenAppRoleUserDTO -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 = permission_management_api.PermissionManagementApi(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_roles( - path_params=path_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->get_app_roles: %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_roles.ApiResponseFor200) | - -#### get_app_roles.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenAppRoleUserDTO**](../../models/OpenAppRoleUserDTO.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_namespace_roles** - -> OpenClusterNamespaceRoleUserDTO get_cluster_namespace_roles(app_idenvcluster_name) - -获取集群Namespace用户 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_management_api -from apollo_openapi.model.open_cluster_namespace_role_user_dto import OpenClusterNamespaceRoleUserDTO -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 = permission_management_api.PermissionManagementApi(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.get_cluster_namespace_roles( - path_params=path_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->get_cluster_namespace_roles: %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](#get_cluster_namespace_roles.ApiResponseFor200) | - -#### get_cluster_namespace_roles.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenClusterNamespaceRoleUserDTO**](../../models/OpenClusterNamespaceRoleUserDTO.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_create_application_role_users** - -> [str] get_create_application_role_users() - -获取建应用用户 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_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 = permission_management_api.PermissionManagementApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # 获取建应用用户 (new added) - api_response = api_instance.get_create_application_role_users() - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->get_create_application_role_users: %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_create_application_role_users.ApiResponseFor200) | - -#### get_create_application_role_users.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) - -# **get_namespace_env_role_users** - -> OpenEnvNamespaceRoleUserDTO get_namespace_env_role_users(app_idenvnamespace_name) - -获取环境Namespace用户 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_management_api -from apollo_openapi.model.open_env_namespace_role_user_dto import OpenEnvNamespaceRoleUserDTO -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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'namespaceName': "namespaceName_example", - } - try: - # 获取环境Namespace用户 (new added) - api_response = api_instance.get_namespace_env_role_users( - path_params=path_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->get_namespace_env_role_users: %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 | | -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, | | - -# 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_env_role_users.ApiResponseFor200) | - -#### get_namespace_env_role_users.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenEnvNamespaceRoleUserDTO**](../../models/OpenEnvNamespaceRoleUserDTO.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_roles** - -> OpenNamespaceRoleUserDTO get_namespace_roles(app_idnamespace_name) - -获取Namespace用户 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_management_api -from apollo_openapi.model.open_namespace_role_user_dto import OpenNamespaceRoleUserDTO -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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'namespaceName': "namespaceName_example", - } - try: - # 获取Namespace用户 (new added) - api_response = api_instance.get_namespace_roles( - path_params=path_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->get_namespace_roles: %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_namespace_roles.ApiResponseFor200) | - -#### get_namespace_roles.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenNamespaceRoleUserDTO**](../../models/OpenNamespaceRoleUserDTO.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) - -# **has_app_permission** - -> OpenPermissionConditionDTO has_app_permission(app_idpermission_typeuser_id) - -校验应用权限 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_management_api -from apollo_openapi.model.open_permission_condition_dto import OpenPermissionConditionDTO -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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'permissionType': "permissionType_example", - } - query_params = { - 'userId': "userId_example", - } - try: - # 校验应用权限 (new added) - api_response = api_instance.has_app_permission( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->has_app_permission: %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 -------------- | ------------- | ------------- | ------------- -userId | UserIdSchema | | - - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -permissionType | PermissionTypeSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PermissionTypeSchema - -## 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](#has_app_permission.ApiResponseFor200) | - -#### has_app_permission.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenPermissionConditionDTO**](../../models/OpenPermissionConditionDTO.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) - -# **has_cluster_namespace_permission** - -> OpenPermissionConditionDTO has_cluster_namespace_permission(app_idenvcluster_namepermission_typeuser_id) - -校验集群Namespace权限 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_management_api -from apollo_openapi.model.open_permission_condition_dto import OpenPermissionConditionDTO -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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'permissionType': "permissionType_example", - } - query_params = { - 'userId': "userId_example", - } - try: - # 校验集群Namespace权限 (new added) - api_response = api_instance.has_cluster_namespace_permission( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->has_cluster_namespace_permission: %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 -------------- | ------------- | ------------- | ------------- -userId | UserIdSchema | | - - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -env | EnvSchema | | -clusterName | ClusterNameSchema | | -permissionType | PermissionTypeSchema | | - -# 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, | | - -# PermissionTypeSchema - -## 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](#has_cluster_namespace_permission.ApiResponseFor200) | - -#### has_cluster_namespace_permission.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenPermissionConditionDTO**](../../models/OpenPermissionConditionDTO.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) - -# **has_create_application_permission** - -> {str: (bool,)} has_create_application_permission(user_id) - -校验建应用权限 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'userId': "userId_example", - } - try: - # 校验建应用权限 (new added) - api_response = api_instance.has_create_application_permission( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->has_create_application_permission: %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 -------------- | ------------- | ------------- | ------------- -userId | UserIdSchema | | - - -# UserIdSchema - -## 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](#has_create_application_permission.ApiResponseFor200) | - -#### has_create_application_permission.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, | | - -### 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] - -### 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) - -# **has_env_namespace_permission** - -> OpenPermissionConditionDTO has_env_namespace_permission(app_idenvnamespace_namepermission_typeuser_id) - -校验环境Namespace权限 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_management_api -from apollo_openapi.model.open_permission_condition_dto import OpenPermissionConditionDTO -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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'namespaceName': "namespaceName_example", - 'permissionType': "permissionType_example", - } - query_params = { - 'userId': "userId_example", - } - try: - # 校验环境Namespace权限 (new added) - api_response = api_instance.has_env_namespace_permission( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->has_env_namespace_permission: %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 -------------- | ------------- | ------------- | ------------- -userId | UserIdSchema | | - - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -env | EnvSchema | | -namespaceName | NamespaceNameSchema | | -permissionType | PermissionTypeSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# EnvSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# NamespaceNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PermissionTypeSchema - -## 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](#has_env_namespace_permission.ApiResponseFor200) | - -#### has_env_namespace_permission.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenPermissionConditionDTO**](../../models/OpenPermissionConditionDTO.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) - -# **has_namespace_permission** - -> OpenPermissionConditionDTO has_namespace_permission(app_idnamespace_namepermission_typeuser_id) - -校验Namespace权限 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_management_api -from apollo_openapi.model.open_permission_condition_dto import OpenPermissionConditionDTO -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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'namespaceName': "namespaceName_example", - 'permissionType': "permissionType_example", - } - query_params = { - 'userId': "userId_example", - } - try: - # 校验Namespace权限 (new added) - api_response = api_instance.has_namespace_permission( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->has_namespace_permission: %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 -------------- | ------------- | ------------- | ------------- -userId | UserIdSchema | | - - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -namespaceName | NamespaceNameSchema | | -permissionType | PermissionTypeSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# NamespaceNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PermissionTypeSchema - -## 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](#has_namespace_permission.ApiResponseFor200) | - -#### has_namespace_permission.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenPermissionConditionDTO**](../../models/OpenPermissionConditionDTO.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) - -# **has_root_permission** - -> OpenPermissionConditionDTO has_root_permission(user_id) - -校验Root权限 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_management_api -from apollo_openapi.model.open_permission_condition_dto import OpenPermissionConditionDTO -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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'userId': "userId_example", - } - try: - # 校验Root权限 (new added) - api_response = api_instance.has_root_permission( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->has_root_permission: %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 -------------- | ------------- | ------------- | ------------- -userId | UserIdSchema | | - - -# UserIdSchema - -## 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](#has_root_permission.ApiResponseFor200) | - -#### has_root_permission.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenPermissionConditionDTO**](../../models/OpenPermissionConditionDTO.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) - -# **init_app_permission** - -> init_app_permission(app_idnamespace_name) - -初始化应用权限 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - } - try: - # 初始化应用权限 (new added) - api_response = api_instance.init_app_permission( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->init_app_permission: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - 'operator': "operator_example", - } - try: - # 初始化应用权限 (new added) - api_response = api_instance.init_app_permission( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->init_app_permission: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -namespaceName | NamespaceNameSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# NamespaceNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#init_app_permission.ApiResponseFor200) | 初始化成功 - -#### init_app_permission.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **init_cluster_namespace_permission** - -> init_cluster_namespace_permission(app_idenvcluster_name) - -初始化集群Namespace权限 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_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 = permission_management_api.PermissionManagementApi(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 = { - } - try: - # 初始化集群Namespace权限 (new added) - api_response = api_instance.init_cluster_namespace_permission( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->init_cluster_namespace_permission: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - } - query_params = { - 'operator': "operator_example", - } - try: - # 初始化集群Namespace权限 (new added) - api_response = api_instance.init_cluster_namespace_permission( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->init_cluster_namespace_permission: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -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](#init_cluster_namespace_permission.ApiResponseFor200) | - -#### init_cluster_namespace_permission.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **is_manage_app_master_permission_enabled** - -> {str: (bool,)} is_manage_app_master_permission_enabled() - -校验AppMaster开关 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_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 = permission_management_api.PermissionManagementApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # 校验AppMaster开关 (new added) - api_response = api_instance.is_manage_app_master_permission_enabled() - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->is_manage_app_master_permission_enabled: %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](#is_manage_app_master_permission_enabled.ApiResponseFor200) | - -#### is_manage_app_master_permission_enabled.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, | | - -### 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] - -### 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) - -# **remove_app_role_from_user** - -> remove_app_role_from_user(app_idrole_typeuser_id) - -移除应用角色 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'roleType': "roleType_example", - } - query_params = { - 'userId': "userId_example", - } - try: - # 移除应用角色 (new added) - api_response = api_instance.remove_app_role_from_user( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->remove_app_role_from_user: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'roleType': "roleType_example", - } - query_params = { - 'operator': "operator_example", - 'userId': "userId_example", - } - try: - # 移除应用角色 (new added) - api_response = api_instance.remove_app_role_from_user( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->remove_app_role_from_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional -userId | UserIdSchema | | - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -roleType | RoleTypeSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RoleTypeSchema - -## 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](#remove_app_role_from_user.ApiResponseFor200) | - -#### remove_app_role_from_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **remove_cluster_namespace_role_from_user** - -> remove_cluster_namespace_role_from_user(app_idenvcluster_namerole_typeuser_id) - -移除集群Namespace角色 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'roleType': "roleType_example", - } - query_params = { - 'userId': "userId_example", - } - try: - # 移除集群Namespace角色 (new added) - api_response = api_instance.remove_cluster_namespace_role_from_user( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->remove_cluster_namespace_role_from_user: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'roleType': "roleType_example", - } - query_params = { - 'operator': "operator_example", - 'userId': "userId_example", - } - try: - # 移除集群Namespace角色 (new added) - api_response = api_instance.remove_cluster_namespace_role_from_user( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->remove_cluster_namespace_role_from_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional -userId | UserIdSchema | | - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -env | EnvSchema | | -clusterName | ClusterNameSchema | | -roleType | RoleTypeSchema | | - -# 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, | | - -# RoleTypeSchema - -## 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](#remove_cluster_namespace_role_from_user.ApiResponseFor200) | - -#### remove_cluster_namespace_role_from_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **remove_manage_app_master_role_from_user** - -> remove_manage_app_master_role_from_user(app_iduser_id) - -移除AppMaster (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - } - query_params = { - 'userId': "userId_example", - } - try: - # 移除AppMaster (new added) - api_response = api_instance.remove_manage_app_master_role_from_user( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->remove_manage_app_master_role_from_user: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - } - query_params = { - 'operator': "operator_example", - 'userId': "userId_example", - } - try: - # 移除AppMaster (new added) - api_response = api_instance.remove_manage_app_master_role_from_user( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->remove_manage_app_master_role_from_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional -userId | UserIdSchema | | - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# UserIdSchema - -## 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](#remove_manage_app_master_role_from_user.ApiResponseFor200) | - -#### remove_manage_app_master_role_from_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **remove_namespace_env_role_from_user** - -> remove_namespace_env_role_from_user(app_idenvnamespace_namerole_typeuser_id) - -移除环境Namespace角色 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'namespaceName': "namespaceName_example", - 'roleType': "roleType_example", - } - query_params = { - 'userId': "userId_example", - } - try: - # 移除环境Namespace角色 (new added) - api_response = api_instance.remove_namespace_env_role_from_user( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->remove_namespace_env_role_from_user: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'namespaceName': "namespaceName_example", - 'roleType': "roleType_example", - } - query_params = { - 'operator': "operator_example", - 'userId': "userId_example", - } - try: - # 移除环境Namespace角色 (new added) - api_response = api_instance.remove_namespace_env_role_from_user( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->remove_namespace_env_role_from_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional -userId | UserIdSchema | | - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -env | EnvSchema | | -namespaceName | NamespaceNameSchema | | -roleType | RoleTypeSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# EnvSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# NamespaceNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RoleTypeSchema - -## 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](#remove_namespace_env_role_from_user.ApiResponseFor200) | - -#### remove_namespace_env_role_from_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **remove_namespace_role_from_user** - -> remove_namespace_role_from_user(app_idnamespace_namerole_typeuser_id) - -移除Namespace角色 (new added) - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import permission_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 = permission_management_api.PermissionManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'namespaceName': "namespaceName_example", - 'roleType': "roleType_example", - } - query_params = { - 'userId': "userId_example", - } - try: - # 移除Namespace角色 (new added) - api_response = api_instance.remove_namespace_role_from_user( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->remove_namespace_role_from_user: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'namespaceName': "namespaceName_example", - 'roleType': "roleType_example", - } - query_params = { - 'operator': "operator_example", - 'userId': "userId_example", - } - try: - # 移除Namespace角色 (new added) - api_response = api_instance.remove_namespace_role_from_user( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PermissionManagementApi->remove_namespace_role_from_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional -userId | UserIdSchema | | - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -namespaceName | NamespaceNameSchema | | -roleType | RoleTypeSchema | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# NamespaceNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# RoleTypeSchema - -## 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](#remove_namespace_role_from_user.ApiResponseFor200) | - -#### remove_namespace_role_from_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/python/docs/apis/tags/PortalManagementApi.md b/python/docs/apis/tags/PortalManagementApi.md deleted file mode 100644 index 22013e18..00000000 --- a/python/docs/apis/tags/PortalManagementApi.md +++ /dev/null @@ -1,4378 +0,0 @@ - -# apollo_openapi.apis.tags.portal_management_api.PortalManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**add_favorite**](#add_favorite) | **post** /openapi/v1/favorites | 添加收藏(new added) -[**assign_role_to_consumer**](#assign_role_to_consumer) | **post** /openapi/v1/consumers/{token}/assign-role | 给消费者授权(new added) -[**check_export_app_config**](#check_export_app_config) | **head** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export | 检查应用配置导出权限(new added) -[**check_system_health**](#check_system_health) | **get** /openapi/v1/system-info/health | 检查系统实例健康状态(new added) -[**create_consumer**](#create_consumer) | **post** /openapi/v1/consumers | 创建开放平台消费者(new added) -[**create_or_update_config_db_config**](#create_or_update_config_db_config) | **post** /openapi/v1/server/envs/{env}/config-db/config | 创建或更新Config DB配置(new added) -[**create_or_update_portal_db_config**](#create_or_update_portal_db_config) | **post** /openapi/v1/server/portal-db/config | 创建或更新Portal DB配置(new added) -[**delete_config_db_config**](#delete_config_db_config) | **delete** /openapi/v1/server/envs/{env}/config-db/config | 删除Config DB配置(new added) -[**delete_consumer**](#delete_consumer) | **delete** /openapi/v1/consumers/by-appId | 按应用ID删除消费者(new added) -[**delete_favorite**](#delete_favorite) | **delete** /openapi/v1/favorites/{favoriteId} | 删除收藏(new added) -[**delete_portal_db_config**](#delete_portal_db_config) | **delete** /openapi/v1/server/portal-db/config | 删除Portal DB配置(new added) -[**export_all_configs**](#export_all_configs) | **get** /openapi/v1/configs/export | 导出所有配置(new added) -[**export_app_config**](#export_app_config) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export | 导出应用配置(new added) -[**export_namespace_items**](#export_namespace_items) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export | 导出命名空间配置项(new added) -[**find_all_config_db_config**](#find_all_config_db_config) | **get** /openapi/v1/server/envs/{env}/config-db/config/find-all-config | 查询指定环境全部Config DB配置(new added) -[**find_all_portal_db_config**](#find_all_portal_db_config) | **get** /openapi/v1/server/portal-db/config/find-all-config | 查询全部Portal DB配置(new added) -[**find_audit_data_influences_by_field**](#find_audit_data_influences_by_field) | **get** /openapi/v1/apollo/audit/logs/dataInfluences/field | 查询审计数据影响(new added) -[**find_audit_logs**](#find_audit_logs) | **get** /openapi/v1/apollo/audit/logs | 查询审计日志(new added) -[**find_audit_logs_by_op_name**](#find_audit_logs_by_op_name) | **get** /openapi/v1/apollo/audit/logs/opName | 按操作名查询审计日志(new added) -[**find_audit_trace_details**](#find_audit_trace_details) | **get** /openapi/v1/apollo/audit/trace | 查询审计链路详情(new added) -[**find_commits**](#find_commits) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits | 查询命名空间提交记录(new added) -[**find_favorites**](#find_favorites) | **get** /openapi/v1/favorites | 查询收藏(new added) -[**find_release_histories_by_namespace**](#find_release_histories_by_namespace) | **get** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories | 查询命名空间发布历史(new added) -[**get_audit_properties**](#get_audit_properties) | **get** /openapi/v1/apollo/audit/properties | 获取审计配置(new added) -[**get_consumer_list**](#get_consumer_list) | **get** /openapi/v1/consumers | 查询开放平台消费者列表(new added) -[**get_consumer_token_by_app_id**](#get_consumer_token_by_app_id) | **get** /openapi/v1/consumer-tokens/by-appId | 按应用ID查询消费者Token(new added) -[**get_page_settings**](#get_page_settings) | **get** /openapi/v1/page-settings | 获取Portal页面配置(new added) -[**get_system_info**](#get_system_info) | **get** /openapi/v1/system-info | 获取系统信息(new added) -[**import_all_configs**](#import_all_configs) | **post** /openapi/v1/configs/import | 导入所有配置(new added) -[**import_app_config**](#import_app_config) | **post** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import | 导入应用配置(new added) -[**import_config**](#import_config) | **post** /openapi/v1/import | 导入配置兼容入口(new added) -[**import_namespace_items**](#import_namespace_items) | **post** /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import | 导入命名空间配置项(new added) -[**search_apps_by_app_id_or_name**](#search_apps_by_app_id_or_name) | **get** /openapi/v1/apps/search/by-appid-or-name | 按应用ID或名称搜索应用(new added) -[**search_audit_logs**](#search_audit_logs) | **get** /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator | 搜索审计日志(new added) -[**search_item_info_by_key_or_value**](#search_item_info_by_key_or_value) | **get** /openapi/v1/global-search/item-info/by-key-or-value | 按Key或Value全局搜索配置(new added) -[**top_favorite**](#top_favorite) | **put** /openapi/v1/favorites/{favoriteId} | 收藏置顶(new added) - -# **add_favorite** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} add_favorite(body) - -添加收藏(new added) - -POST /openapi/v1/favorites - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - body = dict() - try: - # 添加收藏(new added) - api_response = api_instance.add_favorite( - body=body, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->add_favorite: %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 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#add_favorite.ApiResponseFor200) | 成功添加收藏 - -#### add_favorite.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, | | - -### 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) - -# **assign_role_to_consumer** - -> [{str: (bool, date, datetime, dict, float, int, list, str, none_type)}] assign_role_to_consumer(tokentypebody) - -给消费者授权(new added) - -POST /openapi/v1/consumers/{token}/assign-role - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'token': "token_example", - } - query_params = { - 'type': "type_example", - } - body = dict() - try: - # 给消费者授权(new added) - api_response = api_instance.assign_role_to_consumer( - path_params=path_params, - query_params=query_params, - body=body, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->assign_role_to_consumer: %s\n" % e) - - # example passing only optional values - path_params = { - 'token': "token_example", - } - query_params = { - 'type': "type_example", - 'envs': "envs_example", - } - body = dict() - try: - # 给消费者授权(new added) - api_response = api_instance.assign_role_to_consumer( - path_params=path_params, - query_params=query_params, - body=body, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->assign_role_to_consumer: %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 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -type | TypeSchema | | -envs | EnvsSchema | | optional - - -# TypeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# EnvsSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -token | TokenSchema | | - -# TokenSchema - -## 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](#assign_role_to_consumer.ApiResponseFor200) | 成功授权 - -#### assign_role_to_consumer.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](#items) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# items - -## 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) - -# **check_export_app_config** - -> check_export_app_config(app_idenvcluster_name) - -检查应用配置导出权限(new added) - -HEAD /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(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: - # 检查应用配置导出权限(new added) - api_response = api_instance.check_export_app_config( - path_params=path_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->check_export_app_config: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### 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_export_app_config.ApiResponseFor200) | 可导出 - -#### check_export_app_config.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **check_system_health** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} check_system_health(instance_id) - -检查系统实例健康状态(new added) - -GET /openapi/v1/system-info/health - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'instanceId': "instanceId_example", - } - try: - # 检查系统实例健康状态(new added) - api_response = api_instance.check_system_health( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->check_system_health: %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 -------------- | ------------- | ------------- | ------------- -instanceId | InstanceIdSchema | | - - -# InstanceIdSchema - -## 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_system_health.ApiResponseFor200) | 成功获取健康状态 - -#### check_system_health.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, | | - -### 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_consumer** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} create_consumer(body) - -创建开放平台消费者(new added) - -POST /openapi/v1/consumers - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - } - body = dict() - try: - # 创建开放平台消费者(new added) - api_response = api_instance.create_consumer( - query_params=query_params, - body=body, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->create_consumer: %s\n" % e) - - # example passing only optional values - query_params = { - 'expires': "expires_example", - } - body = dict() - try: - # 创建开放平台消费者(new added) - api_response = api_instance.create_consumer( - query_params=query_params, - body=body, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->create_consumer: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -query_params | RequestQueryParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -expires | ExpiresSchema | | optional - - -# ExpiresSchema - -yyyyMMddHHmmss - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | yyyyMMddHHmmss | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#create_consumer.ApiResponseFor200) | 成功创建消费者 - -#### create_consumer.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, | | - -### 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_or_update_config_db_config** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} create_or_update_config_db_config(envbody) - -创建或更新Config DB配置(new added) - -POST /openapi/v1/server/envs/{env}/config-db/config - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'env': "env_example", - } - body = dict() - try: - # 创建或更新Config DB配置(new added) - api_response = api_instance.create_or_update_config_db_config( - path_params=path_params, - body=body, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->create_or_update_config_db_config: %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 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### 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_or_update_config_db_config.ApiResponseFor200) | 成功创建或更新配置 - -#### create_or_update_config_db_config.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, | | - -### 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_or_update_portal_db_config** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} create_or_update_portal_db_config(body) - -创建或更新Portal DB配置(new added) - -POST /openapi/v1/server/portal-db/config - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - body = dict() - try: - # 创建或更新Portal DB配置(new added) - api_response = api_instance.create_or_update_portal_db_config( - body=body, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->create_or_update_portal_db_config: %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 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#create_or_update_portal_db_config.ApiResponseFor200) | 成功创建或更新配置 - -#### create_or_update_portal_db_config.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, | | - -### 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_config_db_config** - -> delete_config_db_config(envkeycluster) - -删除Config DB配置(new added) - -DELETE /openapi/v1/server/envs/{env}/config-db/config - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'env': "env_example", - } - query_params = { - 'key': "key_example", - 'cluster': "cluster_example", - } - try: - # 删除Config DB配置(new added) - api_response = api_instance.delete_config_db_config( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->delete_config_db_config: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -key | KeySchema | | -cluster | ClusterSchema | | - - -# KeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ClusterSchema - -## 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](#delete_config_db_config.ApiResponseFor200) | 成功删除配置 - -#### delete_config_db_config.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_consumer** - -> delete_consumer(app_id) - -按应用ID删除消费者(new added) - -DELETE /openapi/v1/consumers/by-appId - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'appId': "appId_example", - } - try: - # 按应用ID删除消费者(new added) - api_response = api_instance.delete_consumer( - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->delete_consumer: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | - - -# 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_consumer.ApiResponseFor200) | 成功删除消费者 - -#### delete_consumer.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_favorite** - -> delete_favorite(favorite_id) - -删除收藏(new added) - -DELETE /openapi/v1/favorites/{favoriteId} - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'favoriteId': 1, - } - try: - # 删除收藏(new added) - api_response = api_instance.delete_favorite( - path_params=path_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->delete_favorite: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -favoriteId | FavoriteIdSchema | | - -# FavoriteIdSchema - -## 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](#delete_favorite.ApiResponseFor200) | 成功删除收藏 - -#### delete_favorite.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **delete_portal_db_config** - -> delete_portal_db_config(key) - -删除Portal DB配置(new added) - -DELETE /openapi/v1/server/portal-db/config - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'key': "key_example", - } - try: - # 删除Portal DB配置(new added) - api_response = api_instance.delete_portal_db_config( - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->delete_portal_db_config: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -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 -------------- | ------------- | ------------- | ------------- -key | KeySchema | | - - -# 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_portal_db_config.ApiResponseFor200) | 成功删除配置 - -#### delete_portal_db_config.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **export_all_configs** - -> file_type export_all_configs(envs) - -导出所有配置(new added) - -GET /openapi/v1/configs/export - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'envs': "envs_example", - } - try: - # 导出所有配置(new added) - api_response = api_instance.export_all_configs( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->export_all_configs: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -query_params | RequestQueryParams | | -accept_content_types | typing.Tuple[str] | default is ('application/octet-stream', ) | 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 -------------- | ------------- | ------------- | ------------- -envs | EnvsSchema | | - - -# EnvsSchema - -## 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](#export_all_configs.ApiResponseFor200) | 成功导出配置 - -#### export_all_configs.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationOctetStream, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationOctetStream - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | - -### 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) - -# **export_app_config** - -> file_type export_app_config(app_idenvcluster_name) - -导出应用配置(new added) - -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(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: - # 导出应用配置(new added) - api_response = api_instance.export_app_config( - path_params=path_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->export_app_config: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/octet-stream', ) | 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](#export_app_config.ApiResponseFor200) | 成功导出应用配置 - -#### export_app_config.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationOctetStream, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationOctetStream - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | - -### 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) - -# **export_namespace_items** - -> file_type export_namespace_items(app_idenvcluster_namenamespace_name) - -导出命名空间配置项(new added) - -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(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: - # 导出命名空间配置项(new added) - api_response = api_instance.export_namespace_items( - path_params=path_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->export_namespace_items: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -accept_content_types | typing.Tuple[str] | default is ('application/octet-stream', ) | 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](#export_namespace_items.ApiResponseFor200) | 成功导出命名空间配置项 - -#### export_namespace_items.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationOctetStream, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationOctetStream - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | - -### 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_config_db_config** - -> [{str: (bool, date, datetime, dict, float, int, list, str, none_type)}] find_all_config_db_config(env) - -查询指定环境全部Config DB配置(new added) - -GET /openapi/v1/server/envs/{env}/config-db/config/find-all-config - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'env': "env_example", - } - try: - # 查询指定环境全部Config DB配置(new added) - api_response = api_instance.find_all_config_db_config( - path_params=path_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->find_all_config_db_config: %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 | | - -# 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](#find_all_config_db_config.ApiResponseFor200) | 成功获取配置列表 - -#### find_all_config_db_config.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](#items) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# items - -## 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_all_portal_db_config** - -> [{str: (bool, date, datetime, dict, float, int, list, str, none_type)}] find_all_portal_db_config() - -查询全部Portal DB配置(new added) - -GET /openapi/v1/server/portal-db/config/find-all-config - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # 查询全部Portal DB配置(new added) - api_response = api_instance.find_all_portal_db_config() - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->find_all_portal_db_config: %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_all_portal_db_config.ApiResponseFor200) | 成功获取配置列表 - -#### find_all_portal_db_config.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](#items) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# items - -## 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_audit_data_influences_by_field** - -> [{str: (bool, date, datetime, dict, float, int, list, str, none_type)}] find_audit_data_influences_by_field(entity_nameentity_idfield_name) - -查询审计数据影响(new added) - -GET /openapi/v1/apollo/audit/logs/dataInfluences/field - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'entityName': "entityName_example", - 'entityId': "entityId_example", - 'fieldName': "fieldName_example", - } - try: - # 查询审计数据影响(new added) - api_response = api_instance.find_audit_data_influences_by_field( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->find_audit_data_influences_by_field: %s\n" % e) - - # example passing only optional values - query_params = { - 'entityName': "entityName_example", - 'entityId': "entityId_example", - 'fieldName': "fieldName_example", - 'page': 0, - 'size': 10, - } - try: - # 查询审计数据影响(new added) - api_response = api_instance.find_audit_data_influences_by_field( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->find_audit_data_influences_by_field: %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 -------------- | ------------- | ------------- | ------------- -entityName | EntityNameSchema | | -entityId | EntityIdSchema | | -fieldName | FieldNameSchema | | -page | PageSchema | | optional -size | SizeSchema | | optional - - -# EntityNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# EntityIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# FieldNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PageSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 0 - -# SizeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 10 - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#find_audit_data_influences_by_field.ApiResponseFor200) | 成功获取审计数据影响 - -#### find_audit_data_influences_by_field.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](#items) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# items - -## 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_audit_logs** - -> [{str: (bool, date, datetime, dict, float, int, list, str, none_type)}] find_audit_logs() - -查询审计日志(new added) - -GET /openapi/v1/apollo/audit/logs - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only optional values - query_params = { - 'page': 0, - 'size': 10, - } - try: - # 查询审计日志(new added) - api_response = api_instance.find_audit_logs( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->find_audit_logs: %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 | | optional -size | SizeSchema | | optional - - -# PageSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 0 - -# SizeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 10 - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#find_audit_logs.ApiResponseFor200) | 成功获取审计日志 - -#### find_audit_logs.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](#items) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# items - -## 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_audit_logs_by_op_name** - -> [{str: (bool, date, datetime, dict, float, int, list, str, none_type)}] find_audit_logs_by_op_name(op_name) - -按操作名查询审计日志(new added) - -GET /openapi/v1/apollo/audit/logs/opName - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'opName': "opName_example", - } - try: - # 按操作名查询审计日志(new added) - api_response = api_instance.find_audit_logs_by_op_name( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->find_audit_logs_by_op_name: %s\n" % e) - - # example passing only optional values - query_params = { - 'opName': "opName_example", - 'page': 0, - 'size': 10, - 'startDate': "startDate_example", - 'endDate': "endDate_example", - } - try: - # 按操作名查询审计日志(new added) - api_response = api_instance.find_audit_logs_by_op_name( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->find_audit_logs_by_op_name: %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 -------------- | ------------- | ------------- | ------------- -opName | OpNameSchema | | -page | PageSchema | | optional -size | SizeSchema | | optional -startDate | StartDateSchema | | optional -endDate | EndDateSchema | | optional - - -# OpNameSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PageSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 0 - -# SizeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 10 - -# StartDateSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# EndDateSchema - -## 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_audit_logs_by_op_name.ApiResponseFor200) | 成功获取审计日志 - -#### find_audit_logs_by_op_name.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](#items) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# items - -## 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_audit_trace_details** - -> [{str: (bool, date, datetime, dict, float, int, list, str, none_type)}] find_audit_trace_details(trace_id) - -查询审计链路详情(new added) - -GET /openapi/v1/apollo/audit/trace - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'traceId': "traceId_example", - } - try: - # 查询审计链路详情(new added) - api_response = api_instance.find_audit_trace_details( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->find_audit_trace_details: %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 -------------- | ------------- | ------------- | ------------- -traceId | TraceIdSchema | | - - -# TraceIdSchema - -## 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_audit_trace_details.ApiResponseFor200) | 成功获取审计链路详情 - -#### find_audit_trace_details.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](#items) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# items - -## 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_commits** - -> [{str: (bool, date, datetime, dict, float, int, list, str, none_type)}] find_commits(app_idenvcluster_namenamespace_name) - -查询命名空间提交记录(new added) - -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - } - try: - # 查询命名空间提交记录(new added) - api_response = api_instance.find_commits( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->find_commits: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - 'key': "key_example", - 'page': 0, - 'size': 10, - } - try: - # 查询命名空间提交记录(new added) - api_response = api_instance.find_commits( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->find_commits: %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 -------------- | ------------- | ------------- | ------------- -key | KeySchema | | optional -page | PageSchema | | optional -size | SizeSchema | | optional - - -# KeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PageSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 0 - -# SizeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 10 - -### 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_commits.ApiResponseFor200) | 成功获取提交记录 - -#### find_commits.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](#items) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# items - -## 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_favorites** - -> [{str: (bool, date, datetime, dict, float, int, list, str, none_type)}] find_favorites() - -查询收藏(new added) - -GET /openapi/v1/favorites - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only optional values - query_params = { - 'userId': "userId_example", - 'appId': "appId_example", - 'page': 0, - 'size': 10, - } - try: - # 查询收藏(new added) - api_response = api_instance.find_favorites( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->find_favorites: %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 -------------- | ------------- | ------------- | ------------- -userId | UserIdSchema | | optional -appId | AppIdSchema | | optional -page | PageSchema | | optional -size | SizeSchema | | optional - - -# UserIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# AppIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PageSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 0 - -# SizeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 10 - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#find_favorites.ApiResponseFor200) | 成功获取收藏 - -#### find_favorites.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](#items) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# items - -## 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_release_histories_by_namespace** - -> [{str: (bool, date, datetime, dict, float, int, list, str, none_type)}] find_release_histories_by_namespace(app_idenvcluster_namenamespace_name) - -查询命名空间发布历史(new added) - -GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - } - try: - # 查询命名空间发布历史(new added) - api_response = api_instance.find_release_histories_by_namespace( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->find_release_histories_by_namespace: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - 'page': 0, - 'size': 10, - } - try: - # 查询命名空间发布历史(new added) - api_response = api_instance.find_release_histories_by_namespace( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->find_release_histories_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 | | optional -size | SizeSchema | | optional - - -# PageSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 0 - -# SizeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 10 - -### 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_release_histories_by_namespace.ApiResponseFor200) | 成功获取发布历史 - -#### find_release_histories_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 ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[items](#items) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# items - -## 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) - -# **get_audit_properties** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} get_audit_properties() - -获取审计配置(new added) - -GET /openapi/v1/apollo/audit/properties - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # 获取审计配置(new added) - api_response = api_instance.get_audit_properties() - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->get_audit_properties: %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_audit_properties.ApiResponseFor200) | 成功获取审计配置 - -#### get_audit_properties.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, | | - -### 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_consumer_list** - -> [{str: (bool, date, datetime, dict, float, int, list, str, none_type)}] get_consumer_list() - -查询开放平台消费者列表(new added) - -GET /openapi/v1/consumers - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only optional values - query_params = { - 'page': 0, - 'size': 10, - } - try: - # 查询开放平台消费者列表(new added) - api_response = api_instance.get_consumer_list( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->get_consumer_list: %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 | | optional -size | SizeSchema | | optional - - -# PageSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 0 - -# SizeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 10 - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#get_consumer_list.ApiResponseFor200) | 成功获取消费者列表 - -#### get_consumer_list.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](#items) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# items - -## 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) - -# **get_consumer_token_by_app_id** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} get_consumer_token_by_app_id(app_id) - -按应用ID查询消费者Token(new added) - -GET /openapi/v1/consumer-tokens/by-appId - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'appId': "appId_example", - } - try: - # 按应用ID查询消费者Token(new added) - api_response = api_instance.get_consumer_token_by_app_id( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->get_consumer_token_by_app_id: %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 -------------- | ------------- | ------------- | ------------- -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_consumer_token_by_app_id.ApiResponseFor200) | 成功获取消费者Token - -#### get_consumer_token_by_app_id.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -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) - -# **get_page_settings** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} get_page_settings() - -获取Portal页面配置(new added) - -GET /openapi/v1/page-settings - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # 获取Portal页面配置(new added) - api_response = api_instance.get_page_settings() - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->get_page_settings: %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_page_settings.ApiResponseFor200) | 成功获取页面配置 - -#### get_page_settings.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, | | - -### 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_system_info** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} get_system_info() - -获取系统信息(new added) - -GET /openapi/v1/system-info - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # 获取系统信息(new added) - api_response = api_instance.get_system_info() - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->get_system_info: %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_system_info.ApiResponseFor200) | 成功获取系统信息 - -#### get_system_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 ------------- | ------------- | ------------- | ------------- -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) - -# **import_all_configs** - -> import_all_configs(envs) - -导入所有配置(new added) - -POST /openapi/v1/configs/import - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'envs': "envs_example", - } - try: - # 导入所有配置(new added) - api_response = api_instance.import_all_configs( - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->import_all_configs: %s\n" % e) - - # example passing only optional values - query_params = { - 'envs': "envs_example", - 'conflictAction': "ignore", - } - body = dict( - file=open('/path/to/file', 'rb'), - ) - try: - # 导入所有配置(new added) - api_response = api_instance.import_all_configs( - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->import_all_configs: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyMultipartFormData, Unset] | optional, default is unset | -query_params | RequestQueryParams | | -content_type | str | optional, default is 'multipart/form-data' | Selects the schema and serialization of the request body -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 - -# SchemaForRequestBodyMultipartFormData - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**file** | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | [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] - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -envs | EnvsSchema | | -conflictAction | ConflictActionSchema | | optional - - -# EnvsSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ConflictActionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | if omitted the server will use the default value of "ignore" - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#import_all_configs.ApiResponseFor200) | 导入成功 - -#### import_all_configs.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **import_app_config** - -> import_app_config(app_idenvcluster_name) - -导入应用配置(new added) - -POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(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 = { - } - try: - # 导入应用配置(new added) - api_response = api_instance.import_app_config( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->import_app_config: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - } - query_params = { - 'conflictAction': "ignore", - } - body = dict( - file=open('/path/to/file', 'rb'), - ) - try: - # 导入应用配置(new added) - api_response = api_instance.import_app_config( - path_params=path_params, - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->import_app_config: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyMultipartFormData, Unset] | optional, default is unset | -query_params | RequestQueryParams | | -path_params | RequestPathParams | | -content_type | str | optional, default is 'multipart/form-data' | Selects the schema and serialization of the request body -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 - -# SchemaForRequestBodyMultipartFormData - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**file** | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | [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] - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -conflictAction | ConflictActionSchema | | optional - - -# ConflictActionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | if omitted the server will use the default value of "ignore" - -### 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](#import_app_config.ApiResponseFor200) | 导入成功 - -#### import_app_config.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **import_config** - -> import_config(envs) - -导入配置兼容入口(new added) - -POST /openapi/v1/import - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'envs': "envs_example", - } - try: - # 导入配置兼容入口(new added) - api_response = api_instance.import_config( - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->import_config: %s\n" % e) - - # example passing only optional values - query_params = { - 'envs': "envs_example", - 'conflictAction': "ignore", - } - body = dict( - file=open('/path/to/file', 'rb'), - ) - try: - # 导入配置兼容入口(new added) - api_response = api_instance.import_config( - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->import_config: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyMultipartFormData, Unset] | optional, default is unset | -query_params | RequestQueryParams | | -content_type | str | optional, default is 'multipart/form-data' | Selects the schema and serialization of the request body -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 - -# SchemaForRequestBodyMultipartFormData - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**file** | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | [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] - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -envs | EnvsSchema | | -conflictAction | ConflictActionSchema | | optional - - -# EnvsSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ConflictActionSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | if omitted the server will use the default value of "ignore" - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#import_config.ApiResponseFor200) | 导入成功 - -#### import_config.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **import_namespace_items** - -> import_namespace_items(app_idenvcluster_namenamespace_name) - -导入命名空间配置项(new added) - -POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(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: - # 导入命名空间配置项(new added) - api_response = api_instance.import_namespace_items( - path_params=path_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->import_namespace_items: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - body = dict( - file=open('/path/to/file', 'rb'), - ) - try: - # 导入命名空间配置项(new added) - api_response = api_instance.import_namespace_items( - path_params=path_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->import_namespace_items: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyMultipartFormData, Unset] | optional, default is unset | -path_params | RequestPathParams | | -content_type | str | optional, default is 'multipart/form-data' | Selects the schema and serialization of the request body -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 - -# SchemaForRequestBodyMultipartFormData - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**file** | bytes, io.FileIO, io.BufferedReader, | bytes, FileIO, | | [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] - -### 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](#import_namespace_items.ApiResponseFor200) | 导入成功 - -#### import_namespace_items.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **search_apps_by_app_id_or_name** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} search_apps_by_app_id_or_name() - -按应用ID或名称搜索应用(new added) - -GET /openapi/v1/apps/search/by-appid-or-name - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only optional values - query_params = { - 'query': "query_example", - 'page': 0, - 'size': 20, - } - try: - # 按应用ID或名称搜索应用(new added) - api_response = api_instance.search_apps_by_app_id_or_name( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->search_apps_by_app_id_or_name: %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 -------------- | ------------- | ------------- | ------------- -query | QuerySchema | | optional -page | PageSchema | | optional -size | SizeSchema | | optional - - -# QuerySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PageSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 0 - -# SizeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 20 - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#search_apps_by_app_id_or_name.ApiResponseFor200) | 成功搜索应用 - -#### search_apps_by_app_id_or_name.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, | | - -### 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) - -# **search_audit_logs** - -> [{str: (bool, date, datetime, dict, float, int, list, str, none_type)}] search_audit_logs(query) - -搜索审计日志(new added) - -GET /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'query': "query_example", - } - try: - # 搜索审计日志(new added) - api_response = api_instance.search_audit_logs( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->search_audit_logs: %s\n" % e) - - # example passing only optional values - query_params = { - 'query': "query_example", - 'page': 0, - 'size': 10, - } - try: - # 搜索审计日志(new added) - api_response = api_instance.search_audit_logs( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->search_audit_logs: %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 -------------- | ------------- | ------------- | ------------- -query | QuerySchema | | -page | PageSchema | | optional -size | SizeSchema | | optional - - -# QuerySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# PageSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 0 - -# SizeSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 10 - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#search_audit_logs.ApiResponseFor200) | 成功搜索审计日志 - -#### search_audit_logs.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](#items) | dict, frozendict.frozendict, | frozendict.frozendict, | | - -# items - -## 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) - -# **search_item_info_by_key_or_value** - -> {str: (bool, date, datetime, dict, float, int, list, str, none_type)} search_item_info_by_key_or_value() - -按Key或Value全局搜索配置(new added) - -GET /openapi/v1/global-search/item-info/by-key-or-value - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only optional values - query_params = { - 'key': "", - 'value': "", - } - try: - # 按Key或Value全局搜索配置(new added) - api_response = api_instance.search_item_info_by_key_or_value( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->search_item_info_by_key_or_value: %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 -------------- | ------------- | ------------- | ------------- -key | KeySchema | | optional -value | ValueSchema | | optional - - -# KeySchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | if omitted the server will use the default value of "" - -# ValueSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | if omitted the server will use the default value of "" - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#search_item_info_by_key_or_value.ApiResponseFor200) | 成功搜索配置 - -#### search_item_info_by_key_or_value.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, | | - -### 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) - -# **top_favorite** - -> top_favorite(favorite_id) - -收藏置顶(new added) - -PUT /openapi/v1/favorites/{favoriteId} - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import portal_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 = portal_management_api.PortalManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'favoriteId': 1, - } - try: - # 收藏置顶(new added) - api_response = api_instance.top_favorite( - path_params=path_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling PortalManagementApi->top_favorite: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -path_params | RequestPathParams | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -favoriteId | FavoriteIdSchema | | - -# FavoriteIdSchema - -## 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](#top_favorite.ApiResponseFor200) | 成功置顶收藏 - -#### top_favorite.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/python/docs/apis/tags/ReleaseManagementApi.md b/python/docs/apis/tags/ReleaseManagementApi.md deleted file mode 100644 index 865a9ab9..00000000 --- a/python/docs/apis/tags/ReleaseManagementApi.md +++ /dev/null @@ -1,1328 +0,0 @@ - -# apollo_openapi.apis.tags.release_management_api.ReleaseManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**compare_release**](#compare_release) | **get** /openapi/v1/envs/{env}/releases/comparison | Compare two releases -[**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) -[**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) -[**rollback**](#rollback) | **put** /openapi/v1/envs/{env}/releases/{releaseId}/rollback | 回滚发布 (original openapi) - -# **compare_release** - -> OpenReleaseDiffDTO compare_release(envbase_release_idto_compare_release_id) - -Compare two releases - -Get the configuration differences between two releases. - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import release_management_api -from apollo_openapi.model.open_release_diff_dto import OpenReleaseDiffDTO -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", - } - query_params = { - 'baseReleaseId': 1, - 'toCompareReleaseId': 1, - } - try: - # Compare two releases - api_response = api_instance.compare_release( - path_params=path_params, - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling ReleaseManagementApi->compare_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 - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -baseReleaseId | BaseReleaseIdSchema | | -toCompareReleaseId | ToCompareReleaseIdSchema | | - - -# BaseReleaseIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -# ToCompareReleaseIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -### 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](#compare_release.ApiResponseFor200) | Successful comparison - -#### compare_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 -------------- | ------------- | ------------- -[**OpenReleaseDiffDTO**](../../models/OpenReleaseDiffDTO.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_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", - } - query_params = { - } - 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, - query_params=query_params, - body=body, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling ReleaseManagementApi->create_gray_del_release: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - 'branchName': "branchName_example", - } - query_params = { - 'operator': "operator_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, - query_params=query_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 | -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 -------------- | ------------- | ------------- -[**NamespaceGrayDelReleaseDTO**](../../models/NamespaceGrayDelReleaseDTO.md) | | - - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### path_params -#### RequestPathParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -appId | AppIdSchema | | -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", - } - query_params = { - } - 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, - query_params=query_params, - body=body, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling ReleaseManagementApi->create_gray_release: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - 'branchName': "branchName_example", - } - query_params = { - '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: - # 创建灰度发布 (original openapi) - api_response = api_instance.create_gray_release( - path_params=path_params, - query_params=query_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 | -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 -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional - - -# 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](#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", - } - query_params = { - } - 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, - query_params=query_params, - body=body, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling ReleaseManagementApi->create_release: %s\n" % e) - - # example passing only optional values - path_params = { - 'appId': "appId_example", - 'env': "env_example", - 'clusterName': "clusterName_example", - 'namespaceName': "namespaceName_example", - } - query_params = { - 'operator': "operator_example", - } - body = 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, - query_params=query_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 | -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 -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional - - -# 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_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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **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) - -# **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, | | 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](#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 -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **rollback** - -> rollback(envrelease_id) - -回滚发布 (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 = { - } - try: - # 回滚发布 (original openapi) - api_response = api_instance.rollback( - path_params=path_params, - query_params=query_params, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling ReleaseManagementApi->rollback: %s\n" % e) - - # example passing only optional values - path_params = { - 'env': "env_example", - 'releaseId': 1, - } - query_params = { - 'operator': "operator_example", - 'toReleaseId': 1, - } - try: - # 回滚发布 (original openapi) - api_response = api_instance.rollback( - path_params=path_params, - query_params=query_params, - ) - 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 | | -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional -toReleaseId | ToReleaseIdSchema | | optional - - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# ToReleaseIdSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | value must be a 64 bit integer - -### 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 | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/python/docs/apis/tags/UserManagementApi.md b/python/docs/apis/tags/UserManagementApi.md deleted file mode 100644 index 1672e29f..00000000 --- a/python/docs/apis/tags/UserManagementApi.md +++ /dev/null @@ -1,763 +0,0 @@ - -# apollo_openapi.apis.tags.user_management_api.UserManagementApi - -All URIs are relative to *http://localhost* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**change_user_enabled**](#change_user_enabled) | **put** /openapi/v1/users/enabled | 修改用户启用状态(new added) -[**create_or_update_user**](#create_or_update_user) | **post** /openapi/v1/users | 创建或更新用户(new added) -[**get_current_user**](#get_current_user) | **get** /openapi/v1/user | 获取当前Portal用户(new added) -[**get_user_by_user_id**](#get_user_by_user_id) | **get** /openapi/v1/users/{userId} | 获取指定用户(new added) -[**search_users**](#search_users) | **get** /openapi/v1/users | 搜索用户(new added) - -# **change_user_enabled** - -> change_user_enabled(open_user_dto) - -修改用户启用状态(new added) - -PUT /openapi/v1/users/enabled,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import user_management_api -from apollo_openapi.model.open_user_dto import OpenUserDTO -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 = user_management_api.UserManagementApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - } - body = OpenUserDTO( - username="username_example", - user_display_name="user_display_name_example", - password="password_example", - email="email_example", - enabled=1, - ) - try: - # 修改用户启用状态(new added) - api_response = api_instance.change_user_enabled( - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling UserManagementApi->change_user_enabled: %s\n" % e) - - # example passing only optional values - query_params = { - 'operator': "operator_example", - } - body = OpenUserDTO( - username="username_example", - user_display_name="user_display_name_example", - password="password_example", - email="email_example", - enabled=1, - ) - try: - # 修改用户启用状态(new added) - api_response = api_instance.change_user_enabled( - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling UserManagementApi->change_user_enabled: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -query_params | RequestQueryParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenUserDTO**](../../models/OpenUserDTO.md) | | - - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -operator | OperatorSchema | | optional - - -# OperatorSchema - -## 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](#change_user_enabled.ApiResponseFor200) | 用户状态修改成功 -400 | [ApiResponseFor400](#change_user_enabled.ApiResponseFor400) | 请求参数错误 -403 | [ApiResponseFor403](#change_user_enabled.ApiResponseFor403) | 权限不足 - -#### change_user_enabled.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -#### change_user_enabled.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### change_user_enabled.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **create_or_update_user** - -> create_or_update_user(open_user_dto) - -创建或更新用户(new added) - -POST /openapi/v1/users,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import user_management_api -from apollo_openapi.model.open_user_dto import OpenUserDTO -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 = user_management_api.UserManagementApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - } - body = OpenUserDTO( - username="username_example", - user_display_name="user_display_name_example", - password="password_example", - email="email_example", - enabled=1, - ) - try: - # 创建或更新用户(new added) - api_response = api_instance.create_or_update_user( - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling UserManagementApi->create_or_update_user: %s\n" % e) - - # example passing only optional values - query_params = { - 'isCreate': False, - 'operator': "operator_example", - } - body = OpenUserDTO( - username="username_example", - user_display_name="user_display_name_example", - password="password_example", - email="email_example", - enabled=1, - ) - try: - # 创建或更新用户(new added) - api_response = api_instance.create_or_update_user( - query_params=query_params, - body=body, - ) - except apollo_openapi.ApiException as e: - print("Exception when calling UserManagementApi->create_or_update_user: %s\n" % e) -``` -### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -body | typing.Union[SchemaForRequestBodyApplicationJson] | required | -query_params | RequestQueryParams | | -content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body -accept_content_types | typing.Tuple[str] | default is ('application/json', ) | Tells the server the content type(s) that are accepted by the client -stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file -timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client -skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned - -### body - -# SchemaForRequestBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenUserDTO**](../../models/OpenUserDTO.md) | | - - -### query_params -#### RequestQueryParams - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -isCreate | IsCreateSchema | | optional -operator | OperatorSchema | | optional - - -# IsCreateSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | if omitted the server will use the default value of False - -# OperatorSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#create_or_update_user.ApiResponseFor200) | 用户创建或更新成功 -400 | [ApiResponseFor400](#create_or_update_user.ApiResponseFor400) | 请求参数错误 -403 | [ApiResponseFor403](#create_or_update_user.ApiResponseFor403) | 权限不足 - -#### create_or_update_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | Unset | body was not defined | N/A -headers | Unset | headers were not defined | - -#### create_or_update_user.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### create_or_update_user.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_current_user** - -> OpenUserInfoDTO get_current_user() - -获取当前Portal用户(new added) - -GET /openapi/v1/user - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import user_management_api -from apollo_openapi.model.exception_response import ExceptionResponse -from apollo_openapi.model.open_user_info_dto import OpenUserInfoDTO -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 = user_management_api.UserManagementApi(api_client) - - # example, this endpoint has no required or optional parameters - try: - # 获取当前Portal用户(new added) - api_response = api_instance.get_current_user() - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling UserManagementApi->get_current_user: %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_current_user.ApiResponseFor200) | 成功获取当前用户 -401 | [ApiResponseFor401](#get_current_user.ApiResponseFor401) | 未登录或未授权访问 -403 | [ApiResponseFor403](#get_current_user.ApiResponseFor403) | 仅支持Portal用户登录态访问 - -#### get_current_user.ApiResponseFor200 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor200ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor200ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**OpenUserInfoDTO**](../../models/OpenUserInfoDTO.md) | | - - -#### get_current_user.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### get_current_user.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **get_user_by_user_id** - -> OpenUserInfoDTO get_user_by_user_id(user_id) - -获取指定用户(new added) - -GET /openapi/v1/users/{userId},支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import user_management_api -from apollo_openapi.model.exception_response import ExceptionResponse -from apollo_openapi.model.open_user_info_dto import OpenUserInfoDTO -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 = user_management_api.UserManagementApi(api_client) - - # example passing only required values which don't have defaults set - path_params = { - 'userId': "userId_example", - } - try: - # 获取指定用户(new added) - api_response = api_instance.get_user_by_user_id( - path_params=path_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling UserManagementApi->get_user_by_user_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 -------------- | ------------- | ------------- | ------------- -userId | UserIdSchema | | - -# UserIdSchema - -## 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_user_by_user_id.ApiResponseFor200) | 成功获取用户 -400 | [ApiResponseFor400](#get_user_by_user_id.ApiResponseFor400) | 请求参数错误或用户不存在 -401 | [ApiResponseFor401](#get_user_by_user_id.ApiResponseFor401) | 未登录或未认证 -403 | [ApiResponseFor403](#get_user_by_user_id.ApiResponseFor403) | 权限不足 - -#### get_user_by_user_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 -------------- | ------------- | ------------- -[**OpenUserInfoDTO**](../../models/OpenUserInfoDTO.md) | | - - -#### get_user_by_user_id.ApiResponseFor400 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor400ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor400ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### get_user_by_user_id.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### get_user_by_user_id.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) - -# **search_users** - -> [OpenUserInfoDTO] search_users(keyword) - -搜索用户(new added) - -GET /openapi/v1/users,支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - -### Example - -* Api Key Authentication (ApiKeyAuth): -```python -import apollo_openapi -from apollo_openapi.apis.tags import user_management_api -from apollo_openapi.model.exception_response import ExceptionResponse -from apollo_openapi.model.open_user_info_dto import OpenUserInfoDTO -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 = user_management_api.UserManagementApi(api_client) - - # example passing only required values which don't have defaults set - query_params = { - 'keyword': "keyword_example", - } - try: - # 搜索用户(new added) - api_response = api_instance.search_users( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling UserManagementApi->search_users: %s\n" % e) - - # example passing only optional values - query_params = { - 'keyword': "keyword_example", - 'includeInactiveUsers': False, - 'offset': 0, - 'limit': 10, - } - try: - # 搜索用户(new added) - api_response = api_instance.search_users( - query_params=query_params, - ) - pprint(api_response) - except apollo_openapi.ApiException as e: - print("Exception when calling UserManagementApi->search_users: %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 -------------- | ------------- | ------------- | ------------- -keyword | KeywordSchema | | -includeInactiveUsers | IncludeInactiveUsersSchema | | optional -offset | OffsetSchema | | optional -limit | LimitSchema | | optional - - -# KeywordSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -str, | str, | | - -# IncludeInactiveUsersSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -bool, | BoolClass, | | if omitted the server will use the default value of False - -# OffsetSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 0 - -# LimitSchema - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 10 - -### Return Types, Responses - -Code | Class | Description -------------- | ------------- | ------------- -n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned -200 | [ApiResponseFor200](#search_users.ApiResponseFor200) | 成功获取用户列表 -401 | [ApiResponseFor401](#search_users.ApiResponseFor401) | 未登录或未授权访问 -403 | [ApiResponseFor403](#search_users.ApiResponseFor403) | 权限不足 - -#### search_users.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 -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenUserInfoDTO**]({{complexTypePrefix}}OpenUserInfoDTO.md) | [**OpenUserInfoDTO**]({{complexTypePrefix}}OpenUserInfoDTO.md) | [**OpenUserInfoDTO**]({{complexTypePrefix}}OpenUserInfoDTO.md) | | - -#### search_users.ApiResponseFor401 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor401ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor401ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -#### search_users.ApiResponseFor403 -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- -response | urllib3.HTTPResponse | Raw response | -body | typing.Union[SchemaFor403ResponseBodyApplicationJson, ] | | -headers | Unset | headers were not defined | - -# SchemaFor403ResponseBodyApplicationJson -Type | Description | Notes -------------- | ------------- | ------------- -[**ExceptionResponse**](../../models/ExceptionResponse.md) | | - - -### Authorization - -[ApiKeyAuth](../../../README.md#ApiKeyAuth) - -[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) diff --git a/python/docs/models/ExceptionResponse.md b/python/docs/models/ExceptionResponse.md deleted file mode 100644 index e8e6d530..00000000 --- a/python/docs/models/ExceptionResponse.md +++ /dev/null @@ -1,17 +0,0 @@ -# apollo_openapi.model.exception_response.ExceptionResponse - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**status** | decimal.Decimal, int, | decimal.Decimal, | HTTP 状态码 | [optional] -**message** | str, | str, | 错误信息 | [optional] -**timestamp** | str, datetime, | str, | 时间戳 | [optional] value must conform to RFC-3339 date-time -**exception** | str, | str, | 错误类名 | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/MapString.md b/python/docs/models/MapString.md deleted file mode 100644 index 7f0a62d8..00000000 --- a/python/docs/models/MapString.md +++ /dev/null @@ -1,13 +0,0 @@ -# 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/NamespaceGrayDelReleaseDTO.md b/python/docs/models/NamespaceGrayDelReleaseDTO.md deleted file mode 100644 index 4783ccd2..00000000 --- a/python/docs/models/NamespaceGrayDelReleaseDTO.md +++ /dev/null @@ -1,34 +0,0 @@ -# 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 deleted file mode 100644 index 2ed4312c..00000000 --- a/python/docs/models/NamespaceReleaseDTO.md +++ /dev/null @@ -1,19 +0,0 @@ -# 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/OpenAccessKeyDTO.md b/python/docs/models/OpenAccessKeyDTO.md deleted file mode 100644 index a042252b..00000000 --- a/python/docs/models/OpenAccessKeyDTO.md +++ /dev/null @@ -1,24 +0,0 @@ -# apollo_openapi.model.open_access_key_dto.OpenAccessKeyDTO - -## 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, | | [optional] -**dataChangeLastModifiedTime** | str, | str, | | [optional] -**id** | decimal.Decimal, int, | decimal.Decimal, | | [optional] value must be a 64 bit integer -**secret** | str, | str, | | [optional] -**appId** | str, | str, | | [optional] -**mode** | decimal.Decimal, int, | decimal.Decimal, | | [optional] -**enabled** | 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 deleted file mode 100644 index a61aae28..00000000 --- a/python/docs/models/OpenAppDTO.md +++ /dev/null @@ -1,28 +0,0 @@ -# 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] -**dataChangeCreatedByDisplayName** | str, | str, | 数据创建者显示名称,用于展示创建者的友好名称 | [optional] -**dataChangeLastModifiedBy** | str, | str, | 数据最后修改者用户名,记录最后一次修改应用信息的用户 | [optional] -**dataChangeLastModifiedByDisplayName** | 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] -**ownerDisplayName** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenAppNamespaceDTO.md b/python/docs/models/OpenAppNamespaceDTO.md deleted file mode 100644 index 613b2433..00000000 --- a/python/docs/models/OpenAppNamespaceDTO.md +++ /dev/null @@ -1,27 +0,0 @@ -# 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] -**dataChangeCreatedByDisplayName** | str, | str, | 命名空间创建者显示名称,用于展示创建者的友好名称 | [optional] -**dataChangeLastModifiedBy** | str, | str, | 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 | [optional] -**dataChangeLastModifiedByDisplayName** | 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/OpenAppRoleUserDTO.md b/python/docs/models/OpenAppRoleUserDTO.md deleted file mode 100644 index 112354bb..00000000 --- a/python/docs/models/OpenAppRoleUserDTO.md +++ /dev/null @@ -1,27 +0,0 @@ -# apollo_openapi.model.open_app_role_user_dto.OpenAppRoleUserDTO - -## 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] -**[masterUsers](#masterUsers)** | 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] - -# masterUsers - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenUserInfoDTO**](OpenUserInfoDTO.md) | [**OpenUserInfoDTO**](OpenUserInfoDTO.md) | [**OpenUserInfoDTO**](OpenUserInfoDTO.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/OpenClusterDTO.md b/python/docs/models/OpenClusterDTO.md deleted file mode 100644 index c9dfafc4..00000000 --- a/python/docs/models/OpenClusterDTO.md +++ /dev/null @@ -1,26 +0,0 @@ -# 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] -**dataChangeCreatedByDisplayName** | str, | str, | 集群创建者显示名称,用于展示创建者的友好名称 | [optional] -**dataChangeLastModifiedBy** | str, | str, | 集群最后修改者用户名,记录最后一次修改集群信息的用户 | [optional] -**dataChangeLastModifiedByDisplayName** | str, | str, | 集群最后修改者显示名称,用于展示最后修改者的友好名称 | [optional] -**dataChangeCreatedTime** | str, | str, | 集群创建时间,ISO 8601格式的时间戳 | [optional] -**dataChangeLastModifiedTime** | str, | str, | 集群最后修改时间,ISO 8601格式的时间戳 | [optional] -**name** | str, | str, | 集群名称,在同一应用和环境下唯一标识一个集群 | [optional] -**appId** | str, | str, | 所属应用的唯一标识符 | [optional] -**id** | decimal.Decimal, int, | decimal.Decimal, | 集群的唯一标识符 | [optional] value must be a 64 bit integer -**parentClusterId** | decimal.Decimal, int, | decimal.Decimal, | 父集群的ID | [optional] value must be a 64 bit integer -**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/OpenClusterNamespaceRoleUserDTO.md b/python/docs/models/OpenClusterNamespaceRoleUserDTO.md deleted file mode 100644 index bf806232..00000000 --- a/python/docs/models/OpenClusterNamespaceRoleUserDTO.md +++ /dev/null @@ -1,42 +0,0 @@ -# apollo_openapi.model.open_cluster_namespace_role_user_dto.OpenClusterNamespaceRoleUserDTO - -## 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] -**cluster** | str, | str, | | [optional] -**[modifyRoleUsers](#modifyRoleUsers)** | list, tuple, | tuple, | | [optional] -**[releaseRoleUsers](#releaseRoleUsers)** | 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] - -# modifyRoleUsers - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenUserInfoDTO**](OpenUserInfoDTO.md) | [**OpenUserInfoDTO**](OpenUserInfoDTO.md) | [**OpenUserInfoDTO**](OpenUserInfoDTO.md) | | - -# releaseRoleUsers - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenUserInfoDTO**](OpenUserInfoDTO.md) | [**OpenUserInfoDTO**](OpenUserInfoDTO.md) | [**OpenUserInfoDTO**](OpenUserInfoDTO.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/OpenCreateAppDTO.md b/python/docs/models/OpenCreateAppDTO.md deleted file mode 100644 index 1d2f8782..00000000 --- a/python/docs/models/OpenCreateAppDTO.md +++ /dev/null @@ -1,32 +0,0 @@ -# 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/OpenCreateNamespaceDTO.md b/python/docs/models/OpenCreateNamespaceDTO.md deleted file mode 100644 index eed523b0..00000000 --- a/python/docs/models/OpenCreateNamespaceDTO.md +++ /dev/null @@ -1,19 +0,0 @@ -# apollo_openapi.model.open_create_namespace_dto.OpenCreateNamespaceDTO - -Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**appId** | str, | str, | 所属应用的唯一标识符 | [optional] -**env** | str, | str, | 所在那个环境创建 | [optional] -**clusterName** | str, | str, | 所属集群的名称 | [optional] -**appNamespaceName** | str, | str, | 根据已创建的appnamespace来实例化namespace | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenEnvClusterDTO.md b/python/docs/models/OpenEnvClusterDTO.md deleted file mode 100644 index 63ffebf4..00000000 --- a/python/docs/models/OpenEnvClusterDTO.md +++ /dev/null @@ -1,29 +0,0 @@ -# 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 deleted file mode 100644 index a23fa93f..00000000 --- a/python/docs/models/OpenEnvClusterInfo.md +++ /dev/null @@ -1,31 +0,0 @@ -# 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 ------------- | ------------- | ------------- | ------------- | ------------- -**code** | decimal.Decimal, int, | decimal.Decimal, | 查询状态码 | [optional] -**message** | str, | str, | 相关信息 | [optional] -**env** | str, | str, | 环境标识 | [optional] -**[clusters](#clusters)** | list, tuple, | tuple, | 集群信息列表 | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# 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/OpenEnvNamespaceRoleUserDTO.md b/python/docs/models/OpenEnvNamespaceRoleUserDTO.md deleted file mode 100644 index 75f23c62..00000000 --- a/python/docs/models/OpenEnvNamespaceRoleUserDTO.md +++ /dev/null @@ -1,42 +0,0 @@ -# apollo_openapi.model.open_env_namespace_role_user_dto.OpenEnvNamespaceRoleUserDTO - -## 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] -**namespaceName** | str, | str, | | [optional] -**[modifyRoleUsers](#modifyRoleUsers)** | list, tuple, | tuple, | | [optional] -**[releaseRoleUsers](#releaseRoleUsers)** | list, tuple, | tuple, | | [optional] -**env** | 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] - -# modifyRoleUsers - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenUserInfoDTO**](OpenUserInfoDTO.md) | [**OpenUserInfoDTO**](OpenUserInfoDTO.md) | [**OpenUserInfoDTO**](OpenUserInfoDTO.md) | | - -# releaseRoleUsers - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenUserInfoDTO**](OpenUserInfoDTO.md) | [**OpenUserInfoDTO**](OpenUserInfoDTO.md) | [**OpenUserInfoDTO**](OpenUserInfoDTO.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 deleted file mode 100644 index 0e76469f..00000000 --- a/python/docs/models/OpenGrayReleaseRuleDTO.md +++ /dev/null @@ -1,40 +0,0 @@ -# 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] -**dataChangeCreatedByDisplayName** | str, | str, | 灰度规则创建者显示名称,用于展示创建者的友好名称 | [optional] -**dataChangeLastModifiedBy** | str, | str, | 灰度规则最后修改者用户名,记录最后一次修改规则的用户 | [optional] -**dataChangeLastModifiedByDisplayName** | 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 deleted file mode 100644 index ef20c62b..00000000 --- a/python/docs/models/OpenGrayReleaseRuleItemDTO.md +++ /dev/null @@ -1,46 +0,0 @@ -# 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 deleted file mode 100644 index 24305c4e..00000000 --- a/python/docs/models/OpenInstanceConfigDTO.md +++ /dev/null @@ -1,16 +0,0 @@ -# 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 deleted file mode 100644 index e0ecf626..00000000 --- a/python/docs/models/OpenInstanceDTO.md +++ /dev/null @@ -1,34 +0,0 @@ -# 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/OpenInstancePageDTO.md b/python/docs/models/OpenInstancePageDTO.md deleted file mode 100644 index 0e0aa662..00000000 --- a/python/docs/models/OpenInstancePageDTO.md +++ /dev/null @@ -1,33 +0,0 @@ -# apollo_openapi.model.open_instance_page_dto.OpenInstancePageDTO - -分页实例数据传输对象,用于返回分页查询的实例列表结果 - -## 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 -**[instances](#instances)** | list, tuple, | tuple, | 当前页的实例列表,包含具体的实例数据 | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# instances - -当前页的实例列表,包含具体的实例数据 - -## 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/OpenItemDTO.md b/python/docs/models/OpenItemDTO.md deleted file mode 100644 index 5d4124b5..00000000 --- a/python/docs/models/OpenItemDTO.md +++ /dev/null @@ -1,27 +0,0 @@ -# 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 ------------- | ------------- | ------------- | ------------- | ------------- -**key** | str, | str, | 配置项的键名,在同一命名空间内唯一标识一个配置项 | [optional] -**value** | str, | str, | 配置项的值,可以是字符串、数字、JSON等格式 | [optional] -**type** | decimal.Decimal, int, | decimal.Decimal, | 配置项类型 | [optional] -**comment** | str, | str, | 配置项的注释说明,用于描述配置项的用途和含义 | [optional] -**lineNum** | decimal.Decimal, int, | decimal.Decimal, | 配置项在命名空间中的行号,用于保持和旧版 Portal 配置项列表一致的默认展示顺序 | [optional] value must be a 32 bit integer -**extendInfo** | [**OpenItemExtendDTO**](OpenItemExtendDTO.md) | [**OpenItemExtendDTO**](OpenItemExtendDTO.md) | | [optional] -**dataChangeCreatedBy** | str, | str, | 配置项创建者用户名,记录是谁创建了这个配置项 | [optional] -**dataChangeCreatedByDisplayName** | str, | str, | 配置项创建者显示名称,用于展示创建者的友好名称 | [optional] -**dataChangeLastModifiedBy** | str, | str, | 配置项最后修改者用户名,记录最后一次修改配置的用户 | [optional] -**dataChangeLastModifiedByDisplayName** | str, | str, | 配置项最后修改者显示名称,用于展示最后修改者的友好名称 | [optional] -**dataChangeCreatedTime** | 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/OpenItemDiffDTO.md b/python/docs/models/OpenItemDiffDTO.md deleted file mode 100644 index 51dc50e5..00000000 --- a/python/docs/models/OpenItemDiffDTO.md +++ /dev/null @@ -1,55 +0,0 @@ -# apollo_openapi.model.open_item_diff_dto.OpenItemDiffDTO - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**code** | decimal.Decimal, int, | decimal.Decimal, | 查找结果 | [optional] -**message** | str, | str, | 查找结果信息 | [optional] -**namespace** | [**OpenNamespaceIdentifier**](OpenNamespaceIdentifier.md) | [**OpenNamespaceIdentifier**](OpenNamespaceIdentifier.md) | | [optional] -**[createItems](#createItems)** | list, tuple, | tuple, | | [optional] -**[deleteItems](#deleteItems)** | list, tuple, | tuple, | | [optional] -**[updateItems](#updateItems)** | list, tuple, | tuple, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# createItems - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | | - -# deleteItems - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | | - -# updateItems - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | [**OpenItemDTO**](OpenItemDTO.md) | | - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenItemExtendDTO.md b/python/docs/models/OpenItemExtendDTO.md deleted file mode 100644 index 48e1948f..00000000 --- a/python/docs/models/OpenItemExtendDTO.md +++ /dev/null @@ -1,21 +0,0 @@ -# apollo_openapi.model.open_item_extend_dto.OpenItemExtendDTO - -Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**namespaceId** | decimal.Decimal, int, | decimal.Decimal, | 所属命名空间的ID | [optional] value must be a 64 bit integer -**isModified** | bool, | BoolClass, | 是否有未发布的修改 | [optional] -**isDeleted** | bool, | BoolClass, | 是否被标记为删除(未发布) | [optional] -**isNewlyAdded** | bool, | BoolClass, | 是否为新添加的配置项(未发布) | [optional] -**newValue** | str, | str, | 新的值 | [optional] -**oldValue** | str, | str, | 上一次发布的值,用于对比变更 | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenItemPageDTO.md b/python/docs/models/OpenItemPageDTO.md deleted file mode 100644 index 773b7e8e..00000000 --- a/python/docs/models/OpenItemPageDTO.md +++ /dev/null @@ -1,33 +0,0 @@ -# apollo_openapi.model.open_item_page_dto.OpenItemPageDTO - -分页配置项数据传输对象,用于返回分页查询的配置项列表结果 - -## 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/OpenMissEnvDTO.md b/python/docs/models/OpenMissEnvDTO.md deleted file mode 100644 index 307f7b30..00000000 --- a/python/docs/models/OpenMissEnvDTO.md +++ /dev/null @@ -1,15 +0,0 @@ -# apollo_openapi.model.open_miss_env_dto.OpenMissEnvDTO - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**code** | decimal.Decimal, int, | decimal.Decimal, | 查询状态码 | [optional] -**message** | str, | str, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenNamespaceDTO.md b/python/docs/models/OpenNamespaceDTO.md deleted file mode 100644 index 96a6d970..00000000 --- a/python/docs/models/OpenNamespaceDTO.md +++ /dev/null @@ -1,43 +0,0 @@ -# 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] -**dataChangeCreatedByDisplayName** | str, | str, | 命名空间创建者显示名称,用于展示创建者的友好名称 | [optional] -**dataChangeLastModifiedBy** | str, | str, | 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 | [optional] -**dataChangeLastModifiedByDisplayName** | 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] -**extendInfo** | [**OpenNamespaceExtendDTO**](OpenNamespaceExtendDTO.md) | [**OpenNamespaceExtendDTO**](OpenNamespaceExtendDTO.md) | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -# items - -命名空间包含的配置项列表 - -## 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/OpenNamespaceExtendDTO.md b/python/docs/models/OpenNamespaceExtendDTO.md deleted file mode 100644 index 4af04311..00000000 --- a/python/docs/models/OpenNamespaceExtendDTO.md +++ /dev/null @@ -1,16 +0,0 @@ -# apollo_openapi.model.open_namespace_extend_dto.OpenNamespaceExtendDTO - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**isConfigHidden** | bool, | BoolClass, | 当当前用户无权限查看配置时置为 true | [optional] -**parentAppId** | str, | str, | 公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转 | [optional] -**itemModifiedCnt** | decimal.Decimal, int, | decimal.Decimal, | 未发布变更数 | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenNamespaceIdentifier.md b/python/docs/models/OpenNamespaceIdentifier.md deleted file mode 100644 index cb6f565d..00000000 --- a/python/docs/models/OpenNamespaceIdentifier.md +++ /dev/null @@ -1,17 +0,0 @@ -# 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 deleted file mode 100644 index 147ec564..00000000 --- a/python/docs/models/OpenNamespaceLockDTO.md +++ /dev/null @@ -1,19 +0,0 @@ -# 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] -**isEmergencyPublishAllowed** | bool, | BoolClass, | 是否允许紧急发布 | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenNamespaceRoleUserDTO.md b/python/docs/models/OpenNamespaceRoleUserDTO.md deleted file mode 100644 index 769a0633..00000000 --- a/python/docs/models/OpenNamespaceRoleUserDTO.md +++ /dev/null @@ -1,41 +0,0 @@ -# apollo_openapi.model.open_namespace_role_user_dto.OpenNamespaceRoleUserDTO - -## 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] -**namespaceName** | str, | str, | | [optional] -**[modifyRoleUsers](#modifyRoleUsers)** | list, tuple, | tuple, | | [optional] -**[releaseRoleUsers](#releaseRoleUsers)** | 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] - -# modifyRoleUsers - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenUserInfoDTO**](OpenUserInfoDTO.md) | [**OpenUserInfoDTO**](OpenUserInfoDTO.md) | [**OpenUserInfoDTO**](OpenUserInfoDTO.md) | | - -# releaseRoleUsers - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenUserInfoDTO**](OpenUserInfoDTO.md) | [**OpenUserInfoDTO**](OpenUserInfoDTO.md) | [**OpenUserInfoDTO**](OpenUserInfoDTO.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/OpenNamespaceSyncDTO.md b/python/docs/models/OpenNamespaceSyncDTO.md deleted file mode 100644 index a72273f9..00000000 --- a/python/docs/models/OpenNamespaceSyncDTO.md +++ /dev/null @@ -1,43 +0,0 @@ -# apollo_openapi.model.open_namespace_sync_dto.OpenNamespaceSyncDTO - -## 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 deleted file mode 100644 index 7a40be36..00000000 --- a/python/docs/models/OpenNamespaceTextModel.md +++ /dev/null @@ -1,21 +0,0 @@ -# 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/OpenNamespaceUsageDTO.md b/python/docs/models/OpenNamespaceUsageDTO.md deleted file mode 100644 index b090a72c..00000000 --- a/python/docs/models/OpenNamespaceUsageDTO.md +++ /dev/null @@ -1,22 +0,0 @@ -# apollo_openapi.model.open_namespace_usage_dto.OpenNamespaceUsageDTO - -命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | 命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**namespaceName** | str, | str, | 命名空间名称 | [optional] -**appId** | str, | str, | 所属应用的唯一标识符 | [optional] -**clusterName** | str, | str, | 所属集群名称 | [optional] -**envName** | str, | str, | 环境名称 | [optional] -**instanceCount** | decimal.Decimal, int, | decimal.Decimal, | 该命名空间关联的实例数量 | [optional] -**branchInstanceCount** | decimal.Decimal, int, | decimal.Decimal, | 分支命名空间关联的实例数量 | [optional] -**linkedNamespaceCount** | decimal.Decimal, int, | decimal.Decimal, | 关联到该公共命名空间的命名空间数量 | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/OpenOrganizationDto.md b/python/docs/models/OpenOrganizationDto.md deleted file mode 100644 index 193aff41..00000000 --- a/python/docs/models/OpenOrganizationDto.md +++ /dev/null @@ -1,15 +0,0 @@ -# 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/OpenPermissionConditionDTO.md b/python/docs/models/OpenPermissionConditionDTO.md deleted file mode 100644 index 1de393a0..00000000 --- a/python/docs/models/OpenPermissionConditionDTO.md +++ /dev/null @@ -1,14 +0,0 @@ -# apollo_openapi.model.open_permission_condition_dto.OpenPermissionConditionDTO - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**hasPermission** | 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/OpenReleaseChangeDTO.md b/python/docs/models/OpenReleaseChangeDTO.md deleted file mode 100644 index 92e0b2dc..00000000 --- a/python/docs/models/OpenReleaseChangeDTO.md +++ /dev/null @@ -1,17 +0,0 @@ -# apollo_openapi.model.open_release_change_dto.OpenReleaseChangeDTO - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**changeType** | str, | str, | 修改类型 | [optional] -**key** | str, | str, | key | [optional] -**newValue** | str, | str, | new value | [optional] -**oldValue** | str, | str, | old value | [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/OpenReleaseDTO.md b/python/docs/models/OpenReleaseDTO.md deleted file mode 100644 index f63e2b2f..00000000 --- a/python/docs/models/OpenReleaseDTO.md +++ /dev/null @@ -1,28 +0,0 @@ -# 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] -**dataChangeCreatedByDisplayName** | str, | str, | 发布创建者显示名称,用于展示创建者的友好名称 | [optional] -**dataChangeLastModifiedBy** | str, | str, | 发布最后修改者用户名,记录最后一次修改发布信息的用户 | [optional] -**dataChangeLastModifiedByDisplayName** | 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/OpenReleaseDiffDTO.md b/python/docs/models/OpenReleaseDiffDTO.md deleted file mode 100644 index 18812143..00000000 --- a/python/docs/models/OpenReleaseDiffDTO.md +++ /dev/null @@ -1,28 +0,0 @@ -# apollo_openapi.model.open_release_diff_dto.OpenReleaseDiffDTO - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**[changes](#changes)** | list, tuple, | tuple, | A list of changes, ensuring order if necessary. | [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] - -# changes - -A list of changes, ensuring order if necessary. - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -list, tuple, | tuple, | A list of changes, ensuring order if necessary. | - -### Tuple Items -Class Name | Input Type | Accessed Type | Description | Notes -------------- | ------------- | ------------- | ------------- | ------------- -[**OpenReleaseChangeDTO**](OpenReleaseChangeDTO.md) | [**OpenReleaseChangeDTO**](OpenReleaseChangeDTO.md) | [**OpenReleaseChangeDTO**](OpenReleaseChangeDTO.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/OpenUserDTO.md b/python/docs/models/OpenUserDTO.md deleted file mode 100644 index 74ff36fa..00000000 --- a/python/docs/models/OpenUserDTO.md +++ /dev/null @@ -1,18 +0,0 @@ -# apollo_openapi.model.open_user_dto.OpenUserDTO - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**username** | str, | str, | 用户名 | [optional] -**userDisplayName** | str, | str, | 用户显示名 | [optional] -**password** | str, | str, | 用户密码 | [optional] -**email** | str, | str, | 用户邮箱 | [optional] -**enabled** | decimal.Decimal, int, | decimal.Decimal, | 是否启用,1 表示启用,0 表示禁用 | [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/OpenUserInfoDTO.md b/python/docs/models/OpenUserInfoDTO.md deleted file mode 100644 index 694e4287..00000000 --- a/python/docs/models/OpenUserInfoDTO.md +++ /dev/null @@ -1,17 +0,0 @@ -# apollo_openapi.model.open_user_info_dto.OpenUserInfoDTO - -## Model Type Info -Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | | - -### Dictionary Keys -Key | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- -**userId** | str, | str, | | [optional] -**name** | str, | str, | | [optional] -**email** | str, | str, | | [optional] -**enabled** | decimal.Decimal, int, | decimal.Decimal, | | [optional] -**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] - -[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/python/docs/models/StringToStringBoolMap.md b/python/docs/models/StringToStringBoolMap.md deleted file mode 100644 index 5e43fe6d..00000000 --- a/python/docs/models/StringToStringBoolMap.md +++ /dev/null @@ -1,25 +0,0 @@ -# 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 deleted file mode 100644 index 18f86b99..00000000 --- a/python/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/python/requirements.txt b/python/requirements.txt deleted file mode 100644 index 3cb66126..00000000 --- a/python/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -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.cfg b/python/setup.cfg deleted file mode 100644 index 11433ee8..00000000 --- a/python/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[flake8] -max-line-length=99 diff --git a/python/setup.py b/python/setup.py deleted file mode 100644 index 6df3590c..00000000 --- a/python/setup.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -from setuptools import setup, find_packages # noqa: H301 - -NAME = "apollo-openapi" -VERSION = "0.3.8" -# To install the library, run the following -# -# python setup.py install -# -# prerequisite: setuptools -# http://pypi.python.org/pypi/setuptools - -REQUIRES = [ - "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( - name=NAME, - version=VERSION, - description="Apollo OpenAPI", - author="OpenAPI Generator community", - 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="""\ - <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 deleted file mode 100644 index 2d88b034..00000000 --- a/python/test-requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -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 deleted file mode 100644 index 8b137891..00000000 --- a/python/test/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_models/__init__.py b/python/test/test_models/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_models/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_models/test_exception_response.py b/python/test/test_models/test_exception_response.py deleted file mode 100644 index ea2b376d..00000000 --- a/python/test/test_models/test_exception_response.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_map_string.py b/python/test/test_models/test_map_string.py deleted file mode 100644 index 52863d36..00000000 --- a/python/test/test_models/test_map_string.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_namespace_gray_del_release_dto.py b/python/test/test_models/test_namespace_gray_del_release_dto.py deleted file mode 100644 index e51e6402..00000000 --- a/python/test/test_models/test_namespace_gray_del_release_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index 0e059b47..00000000 --- a/python/test/test_models/test_namespace_release_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_access_key_dto.py b/python/test/test_models/test_open_access_key_dto.py deleted file mode 100644 index edac15c3..00000000 --- a/python/test/test_models/test_open_access_key_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -import unittest - -import apollo_openapi -from apollo_openapi.model.open_access_key_dto import OpenAccessKeyDTO -from apollo_openapi import configuration - - -class TestOpenAccessKeyDTO(unittest.TestCase): - """OpenAccessKeyDTO 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 deleted file mode 100644 index 9001bd11..00000000 --- a/python/test/test_models/test_open_app_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index 876d4eb4..00000000 --- a/python/test/test_models/test_open_app_namespace_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_app_role_user_dto.py b/python/test/test_models/test_open_app_role_user_dto.py deleted file mode 100644 index cc3a87d9..00000000 --- a/python/test/test_models/test_open_app_role_user_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -import unittest - -import apollo_openapi -from apollo_openapi.model.open_app_role_user_dto import OpenAppRoleUserDTO -from apollo_openapi import configuration - - -class TestOpenAppRoleUserDTO(unittest.TestCase): - """OpenAppRoleUserDTO 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 deleted file mode 100644 index 41f2e6cf..00000000 --- a/python/test/test_models/test_open_cluster_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_cluster_namespace_role_user_dto.py b/python/test/test_models/test_open_cluster_namespace_role_user_dto.py deleted file mode 100644 index bc6b12f0..00000000 --- a/python/test/test_models/test_open_cluster_namespace_role_user_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -import unittest - -import apollo_openapi -from apollo_openapi.model.open_cluster_namespace_role_user_dto import OpenClusterNamespaceRoleUserDTO -from apollo_openapi import configuration - - -class TestOpenClusterNamespaceRoleUserDTO(unittest.TestCase): - """OpenClusterNamespaceRoleUserDTO 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 deleted file mode 100644 index ec2e89f1..00000000 --- a/python/test/test_models/test_open_create_app_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_create_namespace_dto.py b/python/test/test_models/test_open_create_namespace_dto.py deleted file mode 100644 index 51d761b0..00000000 --- a/python/test/test_models/test_open_create_namespace_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -import unittest - -import apollo_openapi -from apollo_openapi.model.open_create_namespace_dto import OpenCreateNamespaceDTO -from apollo_openapi import configuration - - -class TestOpenCreateNamespaceDTO(unittest.TestCase): - """OpenCreateNamespaceDTO 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 deleted file mode 100644 index 97ab6f80..00000000 --- a/python/test/test_models/test_open_env_cluster_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index d9e8bc3d..00000000 --- a/python/test/test_models/test_open_env_cluster_info.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_env_namespace_role_user_dto.py b/python/test/test_models/test_open_env_namespace_role_user_dto.py deleted file mode 100644 index 45805c32..00000000 --- a/python/test/test_models/test_open_env_namespace_role_user_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -import unittest - -import apollo_openapi -from apollo_openapi.model.open_env_namespace_role_user_dto import OpenEnvNamespaceRoleUserDTO -from apollo_openapi import configuration - - -class TestOpenEnvNamespaceRoleUserDTO(unittest.TestCase): - """OpenEnvNamespaceRoleUserDTO 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 deleted file mode 100644 index 23388d04..00000000 --- a/python/test/test_models/test_open_gray_release_rule_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index 92bbdfa6..00000000 --- a/python/test/test_models/test_open_gray_release_rule_item_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index b8b700c8..00000000 --- a/python/test/test_models/test_open_instance_config_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index 94435d2b..00000000 --- a/python/test/test_models/test_open_instance_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_instance_page_dto.py b/python/test/test_models/test_open_instance_page_dto.py deleted file mode 100644 index 144fec1f..00000000 --- a/python/test/test_models/test_open_instance_page_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -import unittest - -import apollo_openapi -from apollo_openapi.model.open_instance_page_dto import OpenInstancePageDTO -from apollo_openapi import configuration - - -class TestOpenInstancePageDTO(unittest.TestCase): - """OpenInstancePageDTO unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_models/test_open_item_diff_dto.py b/python/test/test_models/test_open_item_diff_dto.py deleted file mode 100644 index b9db0ff8..00000000 --- a/python/test/test_models/test_open_item_diff_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -import unittest - -import apollo_openapi -from apollo_openapi.model.open_item_diff_dto import OpenItemDiffDTO -from apollo_openapi import configuration - - -class TestOpenItemDiffDTO(unittest.TestCase): - """OpenItemDiffDTO 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 deleted file mode 100644 index 4fe5aca7..00000000 --- a/python/test/test_models/test_open_item_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_item_extend_dto.py b/python/test/test_models/test_open_item_extend_dto.py deleted file mode 100644 index 6ed48249..00000000 --- a/python/test/test_models/test_open_item_extend_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -import unittest - -import apollo_openapi -from apollo_openapi.model.open_item_extend_dto import OpenItemExtendDTO -from apollo_openapi import configuration - - -class TestOpenItemExtendDTO(unittest.TestCase): - """OpenItemExtendDTO unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_models/test_open_item_page_dto.py b/python/test/test_models/test_open_item_page_dto.py deleted file mode 100644 index d69d8d4f..00000000 --- a/python/test/test_models/test_open_item_page_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -import unittest - -import apollo_openapi -from apollo_openapi.model.open_item_page_dto import OpenItemPageDTO -from apollo_openapi import configuration - - -class TestOpenItemPageDTO(unittest.TestCase): - """OpenItemPageDTO unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_models/test_open_miss_env_dto.py b/python/test/test_models/test_open_miss_env_dto.py deleted file mode 100644 index 75952418..00000000 --- a/python/test/test_models/test_open_miss_env_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -import unittest - -import apollo_openapi -from apollo_openapi.model.open_miss_env_dto import OpenMissEnvDTO -from apollo_openapi import configuration - - -class TestOpenMissEnvDTO(unittest.TestCase): - """OpenMissEnvDTO unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_models/test_open_namespace_dto.py b/python/test/test_models/test_open_namespace_dto.py deleted file mode 100644 index b408ea02..00000000 --- a/python/test/test_models/test_open_namespace_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_extend_dto.py b/python/test/test_models/test_open_namespace_extend_dto.py deleted file mode 100644 index a5b2d905..00000000 --- a/python/test/test_models/test_open_namespace_extend_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -import unittest - -import apollo_openapi -from apollo_openapi.model.open_namespace_extend_dto import OpenNamespaceExtendDTO -from apollo_openapi import configuration - - -class TestOpenNamespaceExtendDTO(unittest.TestCase): - """OpenNamespaceExtendDTO unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_models/test_open_namespace_identifier.py b/python/test/test_models/test_open_namespace_identifier.py deleted file mode 100644 index 74a6b330..00000000 --- a/python/test/test_models/test_open_namespace_identifier.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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 deleted file mode 100644 index dc3332a8..00000000 --- a/python/test/test_models/test_open_namespace_lock_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_role_user_dto.py b/python/test/test_models/test_open_namespace_role_user_dto.py deleted file mode 100644 index 1c2d9b8b..00000000 --- a/python/test/test_models/test_open_namespace_role_user_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -import unittest - -import apollo_openapi -from apollo_openapi.model.open_namespace_role_user_dto import OpenNamespaceRoleUserDTO -from apollo_openapi import configuration - - -class TestOpenNamespaceRoleUserDTO(unittest.TestCase): - """OpenNamespaceRoleUserDTO unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_models/test_open_namespace_sync_dto.py b/python/test/test_models/test_open_namespace_sync_dto.py deleted file mode 100644 index 7a811f38..00000000 --- a/python/test/test_models/test_open_namespace_sync_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -import unittest - -import apollo_openapi -from apollo_openapi.model.open_namespace_sync_dto import OpenNamespaceSyncDTO -from apollo_openapi import configuration - - -class TestOpenNamespaceSyncDTO(unittest.TestCase): - """OpenNamespaceSyncDTO unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_models/test_open_namespace_text_model.py b/python/test/test_models/test_open_namespace_text_model.py deleted file mode 100644 index 87213c38..00000000 --- a/python/test/test_models/test_open_namespace_text_model.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_namespace_usage_dto.py b/python/test/test_models/test_open_namespace_usage_dto.py deleted file mode 100644 index 5c57a2f0..00000000 --- a/python/test/test_models/test_open_namespace_usage_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -import unittest - -import apollo_openapi -from apollo_openapi.model.open_namespace_usage_dto import OpenNamespaceUsageDTO -from apollo_openapi import configuration - - -class TestOpenNamespaceUsageDTO(unittest.TestCase): - """OpenNamespaceUsageDTO unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_models/test_open_organization_dto.py b/python/test/test_models/test_open_organization_dto.py deleted file mode 100644 index 3ddcc453..00000000 --- a/python/test/test_models/test_open_organization_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_permission_condition_dto.py b/python/test/test_models/test_open_permission_condition_dto.py deleted file mode 100644 index f812da4d..00000000 --- a/python/test/test_models/test_open_permission_condition_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -import unittest - -import apollo_openapi -from apollo_openapi.model.open_permission_condition_dto import OpenPermissionConditionDTO -from apollo_openapi import configuration - - -class TestOpenPermissionConditionDTO(unittest.TestCase): - """OpenPermissionConditionDTO unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_models/test_open_release_change_dto.py b/python/test/test_models/test_open_release_change_dto.py deleted file mode 100644 index d26bd363..00000000 --- a/python/test/test_models/test_open_release_change_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -import unittest - -import apollo_openapi -from apollo_openapi.model.open_release_change_dto import OpenReleaseChangeDTO -from apollo_openapi import configuration - - -class TestOpenReleaseChangeDTO(unittest.TestCase): - """OpenReleaseChangeDTO unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_models/test_open_release_diff_dto.py b/python/test/test_models/test_open_release_diff_dto.py deleted file mode 100644 index 891f8a20..00000000 --- a/python/test/test_models/test_open_release_diff_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -import unittest - -import apollo_openapi -from apollo_openapi.model.open_release_diff_dto import OpenReleaseDiffDTO -from apollo_openapi import configuration - - -class TestOpenReleaseDiffDTO(unittest.TestCase): - """OpenReleaseDiffDTO 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 deleted file mode 100644 index 2a060012..00000000 --- a/python/test/test_models/test_open_release_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_open_user_dto.py b/python/test/test_models/test_open_user_dto.py deleted file mode 100644 index 8c7ae5f6..00000000 --- a/python/test/test_models/test_open_user_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -import unittest - -import apollo_openapi -from apollo_openapi.model.open_user_dto import OpenUserDTO -from apollo_openapi import configuration - - -class TestOpenUserDTO(unittest.TestCase): - """OpenUserDTO unit test stubs""" - _configuration = configuration.Configuration() - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_models/test_open_user_info_dto.py b/python/test/test_models/test_open_user_info_dto.py deleted file mode 100644 index 602d7981..00000000 --- a/python/test/test_models/test_open_user_info_dto.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - Generated by: https://openapi-generator.tech -""" - -import unittest - -import apollo_openapi -from apollo_openapi.model.open_user_info_dto import OpenUserInfoDTO -from apollo_openapi import configuration - - -class TestOpenUserInfoDTO(unittest.TestCase): - """OpenUserInfoDTO 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 deleted file mode 100644 index 845949ca..00000000 --- a/python/test/test_models/test_string_to_string_bool_map.py +++ /dev/null @@ -1,24 +0,0 @@ -# coding: utf-8 - -""" - Apollo OpenAPI - -

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
# noqa: E501 - - 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_paths/__init__.py b/python/test/test_paths/__init__.py deleted file mode 100644 index 1309632d..00000000 --- a/python/test/test_paths/__init__.py +++ /dev/null @@ -1,68 +0,0 @@ -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_apollo_audit_logs/__init__.py b/python/test/test_paths/test_openapi_v1_apollo_audit_logs/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apollo_audit_logs/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apollo_audit_logs/test_get.py b/python/test/test_paths/test_openapi_v1_apollo_audit_logs/test_get.py deleted file mode 100644 index 50f84379..00000000 --- a/python/test/test_paths/test_openapi_v1_apollo_audit_logs/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_apollo_audit_logs import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1ApolloAuditLogs(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1ApolloAuditLogs 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_apollo_audit_logs_by_name_or_type_or_operator/__init__.py b/python/test/test_paths/test_openapi_v1_apollo_audit_logs_by_name_or_type_or_operator/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apollo_audit_logs_by_name_or_type_or_operator/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apollo_audit_logs_by_name_or_type_or_operator/test_get.py b/python/test/test_paths/test_openapi_v1_apollo_audit_logs_by_name_or_type_or_operator/test_get.py deleted file mode 100644 index fc209b46..00000000 --- a/python/test/test_paths/test_openapi_v1_apollo_audit_logs_by_name_or_type_or_operator/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_apollo_audit_logs_by_name_or_type_or_operator import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1ApolloAuditLogsByNameOrTypeOrOperator(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1ApolloAuditLogsByNameOrTypeOrOperator 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_apollo_audit_logs_data_influences_field/__init__.py b/python/test/test_paths/test_openapi_v1_apollo_audit_logs_data_influences_field/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apollo_audit_logs_data_influences_field/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apollo_audit_logs_data_influences_field/test_get.py b/python/test/test_paths/test_openapi_v1_apollo_audit_logs_data_influences_field/test_get.py deleted file mode 100644 index f958d020..00000000 --- a/python/test/test_paths/test_openapi_v1_apollo_audit_logs_data_influences_field/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_apollo_audit_logs_data_influences_field import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1ApolloAuditLogsDataInfluencesField(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1ApolloAuditLogsDataInfluencesField 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_apollo_audit_logs_op_name/__init__.py b/python/test/test_paths/test_openapi_v1_apollo_audit_logs_op_name/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apollo_audit_logs_op_name/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apollo_audit_logs_op_name/test_get.py b/python/test/test_paths/test_openapi_v1_apollo_audit_logs_op_name/test_get.py deleted file mode 100644 index 5e20b11f..00000000 --- a/python/test/test_paths/test_openapi_v1_apollo_audit_logs_op_name/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_apollo_audit_logs_op_name import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1ApolloAuditLogsOpName(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1ApolloAuditLogsOpName 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_apollo_audit_properties/__init__.py b/python/test/test_paths/test_openapi_v1_apollo_audit_properties/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apollo_audit_properties/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apollo_audit_properties/test_get.py b/python/test/test_paths/test_openapi_v1_apollo_audit_properties/test_get.py deleted file mode 100644 index 829846fb..00000000 --- a/python/test/test_paths/test_openapi_v1_apollo_audit_properties/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_apollo_audit_properties import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1ApolloAuditProperties(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1ApolloAuditProperties 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_apollo_audit_trace/__init__.py b/python/test/test_paths/test_openapi_v1_apollo_audit_trace/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apollo_audit_trace/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apollo_audit_trace/test_get.py b/python/test/test_paths/test_openapi_v1_apollo_audit_trace/test_get.py deleted file mode 100644 index 1070ed3b..00000000 --- a/python/test/test_paths/test_openapi_v1_apollo_audit_trace/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_apollo_audit_trace import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1ApolloAuditTrace(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1ApolloAuditTrace 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_appnamespaces/__init__.py b/python/test/test_paths/test_openapi_v1_appnamespaces/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_appnamespaces/__init__.py +++ /dev/null @@ -1 +0,0 @@ - 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 deleted file mode 100644 index 99284f91..00000000 --- a/python/test/test_paths/test_openapi_v1_appnamespaces/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_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 deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps/__init__.py +++ /dev/null @@ -1 +0,0 @@ - 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 deleted file mode 100644 index 5463c37e..00000000 --- a/python/test/test_paths/test_openapi_v1_apps/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_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 deleted file mode 100644 index 239cea97..00000000 --- a/python/test/test_paths/test_openapi_v1_apps/test_post.py +++ /dev/null @@ -1,42 +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_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 - response_body = '' - - - - -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 deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id/__init__.py +++ /dev/null @@ -1 +0,0 @@ - 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 deleted file mode 100644 index 1b937bf4..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id/test_delete.py +++ /dev/null @@ -1,40 +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_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 - response_body = '' - - -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 deleted file mode 100644 index 60120fa9..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id/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_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 deleted file mode 100644 index fcebe44b..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id/test_put.py +++ /dev/null @@ -1,42 +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_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 - response_body = '' - - - - -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 deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces/__init__.py +++ /dev/null @@ -1 +0,0 @@ - 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 deleted file mode 100644 index c3b1a303..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces/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_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 deleted file mode 100644 index b5f8f450..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces/test_post.py +++ /dev/null @@ -1,43 +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_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 deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/__init__.py +++ /dev/null @@ -1 +0,0 @@ - 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 deleted file mode 100644 index ac8ad5de..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/test_delete.py +++ /dev/null @@ -1,40 +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_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 - response_body = '' - - -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 deleted file mode 100644 index 9ccb594f..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name/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_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_appnamespaces_namespace_name_usage/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/test_get.py deleted file mode 100644 index 69f0dacf..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_appnamespaces_namespace_name_usage/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_apps_app_id_appnamespaces_namespace_name_usage import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdAppnamespacesNamespaceNameUsage(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdAppnamespacesNamespaceNameUsage unit test stubs - 查询appnamespace使用情况(new added) # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_env_cluster_info/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_env_cluster_info/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_env_cluster_info/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_env_cluster_info/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_env_cluster_info/test_get.py deleted file mode 100644 index dcdaa0cc..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_env_cluster_info/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_apps_app_id_env_cluster_info import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvClusterInfo(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvClusterInfo 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_envclusters/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envclusters/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envclusters/__init__.py +++ /dev/null @@ -1 +0,0 @@ - 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 deleted file mode 100644 index 22f09110..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envclusters/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_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_accesskeys/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys/test_get.py deleted file mode 100644 index 13c4fffc..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys/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_apps_app_id_envs_env_accesskeys import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvAccesskeys(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvAccesskeys unit test stubs - 查找AccessKey # 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_accesskeys/test_post.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys/test_post.py deleted file mode 100644 index 64fd22e7..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys/test_post.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_apps_app_id_envs_env_accesskeys import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvAccesskeys(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvAccesskeys unit test stubs - 创建AccessKey # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id/test_delete.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id/test_delete.py deleted file mode 100644 index e694bbef..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id/test_delete.py +++ /dev/null @@ -1,40 +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_apps_app_id_envs_env_accesskeys_access_key_id import delete # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvAccesskeysAccessKeyId(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvAccesskeysAccessKeyId unit test stubs - 删除AccessKey # 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 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation/test_put.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation/test_put.py deleted file mode 100644 index e66c5d03..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_activation/test_put.py +++ /dev/null @@ -1,40 +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_apps_app_id_envs_env_accesskeys_access_key_id_activation import put # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvAccesskeysAccessKeyIdActivation(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvAccesskeysAccessKeyIdActivation unit test stubs - 启用AccessKey # 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 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation/test_put.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation/test_put.py deleted file mode 100644 index d2220c00..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_accesskeys_access_key_id_deactivation/test_put.py +++ /dev/null @@ -1,40 +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_apps_app_id_envs_env_accesskeys_access_key_id_deactivation import put # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvAccesskeysAccessKeyIdDeactivation(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvAccesskeysAccessKeyIdDeactivation unit test stubs - 禁用AccessKey # 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 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/test_get.py deleted file mode 100644 index c89e9166..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/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_apps_app_id_envs_env_clusters_cluster_name_export import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameExport(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvClustersClusterNameExport 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_envs_env_clusters_cluster_name_export/test_head.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/test_head.py deleted file mode 100644 index 24b535e1..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_export/test_head.py +++ /dev/null @@ -1,40 +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_apps_app_id_envs_env_clusters_cluster_name_export import head # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameExport(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvClustersClusterNameExport unit test stubs - 检查应用配置导出权限(new added) # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = head.ApiForhead(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import/test_post.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import/test_post.py deleted file mode 100644 index c7d4e642..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_import/test_post.py +++ /dev/null @@ -1,40 +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_apps_app_id_envs_env_clusters_cluster_name_import import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameImport(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvClustersClusterNameImport 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 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/test_get.py deleted file mode 100644 index 6b18e2ff..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/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_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameMissingNamespaces(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvClustersClusterNameMissingNamespaces unit test stubs - 查找缺失的Namespace (new added) # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = 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_missing_namespaces/test_post.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/test_post.py deleted file mode 100644 index a424cdcf..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces/test_post.py +++ /dev/null @@ -1,40 +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_apps_app_id_envs_env_clusters_cluster_name_missing_namespaces import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameMissingNamespaces(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvClustersClusterNameMissingNamespaces unit test stubs - 创建缺失的Namespace (new added) # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - -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/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/test_delete.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/test_delete.py deleted file mode 100644 index 7c0c6ce5..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name/test_delete.py +++ /dev/null @@ -1,40 +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_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name import delete # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceName(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceName 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 - response_body = '' - - -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_commits/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits/test_get.py deleted file mode 100644 index 28009825..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits/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_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_commits import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameCommits(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameCommits 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_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export/test_get.py deleted file mode 100644 index 824d95e2..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export/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_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_export import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsExport(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsExport 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_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import/test_post.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import/test_post.py deleted file mode 100644 index 47cf95de..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import/test_post.py +++ /dev/null @@ -1,40 +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_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_items_import import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsImport(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameItemsImport 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 - response_body = '' - - -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_releases_histories/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories/test_get.py deleted file mode 100644 index b5777893..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories/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_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_releases_histories import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameReleasesHistories(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameReleasesHistories 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_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/test_get.py deleted file mode 100644 index b41e2cec..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage/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_apps_app_id_envs_env_clusters_cluster_name_namespaces_namespace_name_usage import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameUsage(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesNamespaceNameUsage 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_permission_init/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init/test_post.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init/test_post.py deleted file mode 100644 index c8a8e367..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init/test_post.py +++ /dev/null @@ -1,40 +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_apps_app_id_envs_env_clusters_cluster_name_namespaces_permission_init import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesPermissionInit(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesPermissionInit unit test stubs - 初始化集群Namespace权限 (new added) # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type/test_get.py deleted file mode 100644 index 01be7951..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type/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_apps_app_id_envs_env_clusters_cluster_name_namespaces_permissions_permission_type import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesPermissionsPermissionType(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesPermissionsPermissionType 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_role_users/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users/test_get.py deleted file mode 100644 index a4c553c0..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users/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_apps_app_id_envs_env_clusters_cluster_name_namespaces_role_users import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesRoleUsers(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvClustersClusterNameNamespacesRoleUsers 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_roles_role_type/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/test_delete.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/test_delete.py deleted file mode 100644 index 6a6ec01e..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/test_delete.py +++ /dev/null @@ -1,40 +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_apps_app_id_envs_env_clusters_cluster_name_roles_role_type import delete # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameRolesRoleType(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvClustersClusterNameRolesRoleType 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 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/test_post.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/test_post.py deleted file mode 100644 index 84d0fbd6..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_clusters_cluster_name_roles_role_type/test_post.py +++ /dev/null @@ -1,40 +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_apps_app_id_envs_env_clusters_cluster_name_roles_role_type import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvClustersClusterNameRolesRoleType(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvClustersClusterNameRolesRoleType unit test stubs - 分配集群Namespace角色 (new added) # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type/test_get.py deleted file mode 100644 index a67060b7..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type/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_apps_app_id_envs_env_namespaces_namespace_name_permissions_permission_type import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvNamespacesNamespaceNamePermissionsPermissionType(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvNamespacesNamespaceNamePermissionsPermissionType 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_namespaces_namespace_name_role_users/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users/test_get.py deleted file mode 100644 index 9552669f..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_role_users/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_apps_app_id_envs_env_namespaces_namespace_name_role_users import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvNamespacesNamespaceNameRoleUsers(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvNamespacesNamespaceNameRoleUsers 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_namespaces_namespace_name_roles_role_type/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/test_delete.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/test_delete.py deleted file mode 100644 index 3b35b8aa..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/test_delete.py +++ /dev/null @@ -1,40 +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_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type import delete # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvNamespacesNamespaceNameRolesRoleType(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvNamespacesNamespaceNameRolesRoleType 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 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/test_post.py b/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/test_post.py deleted file mode 100644 index 962d8faa..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type/test_post.py +++ /dev/null @@ -1,40 +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_apps_app_id_envs_env_namespaces_namespace_name_roles_role_type import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdEnvsEnvNamespacesNamespaceNameRolesRoleType(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdEnvsEnvNamespacesNamespaceNameRolesRoleType unit test stubs - 分配环境Namespace角色 (new added) # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/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 deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_miss_envs/__init__.py +++ /dev/null @@ -1 +0,0 @@ - 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 deleted file mode 100644 index 85665d5d..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_miss_envs/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_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_namespace_name_permission_init/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_permission_init/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_permission_init/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_permission_init/test_post.py b/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_permission_init/test_post.py deleted file mode 100644 index 751b2856..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_permission_init/test_post.py +++ /dev/null @@ -1,40 +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_apps_app_id_namespaces_namespace_name_permission_init import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdNamespacesNamespaceNamePermissionInit(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdNamespacesNamespaceNamePermissionInit 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 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type/test_get.py deleted file mode 100644 index 0e7f26ff..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_permissions_permission_type/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_apps_app_id_namespaces_namespace_name_permissions_permission_type import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdNamespacesNamespaceNamePermissionsPermissionType(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdNamespacesNamespaceNamePermissionsPermissionType 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_namespaces_namespace_name_role_users/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_role_users/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_role_users/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_role_users/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_role_users/test_get.py deleted file mode 100644 index 38a0d86e..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_role_users/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_apps_app_id_namespaces_namespace_name_role_users import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdNamespacesNamespaceNameRoleUsers(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdNamespacesNamespaceNameRoleUsers 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_namespaces_namespace_name_roles_role_type/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/test_delete.py b/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/test_delete.py deleted file mode 100644 index 8403d495..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/test_delete.py +++ /dev/null @@ -1,40 +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_apps_app_id_namespaces_namespace_name_roles_role_type import delete # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdNamespacesNamespaceNameRolesRoleType(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdNamespacesNamespaceNameRolesRoleType 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 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/test_post.py b/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/test_post.py deleted file mode 100644 index 847a970e..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_namespace_name_roles_role_type/test_post.py +++ /dev/null @@ -1,40 +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_apps_app_id_namespaces_namespace_name_roles_role_type import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdNamespacesNamespaceNameRolesRoleType(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdNamespacesNamespaceNameRolesRoleType unit test stubs - 分配Namespace角色 (new added) # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/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 deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_releases_status/__init__.py +++ /dev/null @@ -1 +0,0 @@ - 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 deleted file mode 100644 index c2ded84a..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_namespaces_releases_status/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_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_permissions_permission_type/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_permissions_permission_type/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_permissions_permission_type/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_permissions_permission_type/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_permissions_permission_type/test_get.py deleted file mode 100644 index fd7fee30..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_permissions_permission_type/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_apps_app_id_permissions_permission_type import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdPermissionsPermissionType(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdPermissionsPermissionType 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_role_users/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_role_users/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_role_users/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_role_users/test_get.py b/python/test/test_paths/test_openapi_v1_apps_app_id_role_users/test_get.py deleted file mode 100644 index 85d2d90f..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_role_users/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_apps_app_id_role_users import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdRoleUsers(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdRoleUsers 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_roles_master/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_roles_master/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_roles_master/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_roles_master/test_delete.py b/python/test/test_paths/test_openapi_v1_apps_app_id_roles_master/test_delete.py deleted file mode 100644 index 2ed7cd30..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_roles_master/test_delete.py +++ /dev/null @@ -1,40 +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_apps_app_id_roles_master import delete # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdRolesMaster(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdRolesMaster unit test stubs - 移除AppMaster (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 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_roles_master/test_post.py b/python/test/test_paths/test_openapi_v1_apps_app_id_roles_master/test_post.py deleted file mode 100644 index c3047ae9..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_roles_master/test_post.py +++ /dev/null @@ -1,40 +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_apps_app_id_roles_master import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdRolesMaster(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdRolesMaster unit test stubs - 分配AppMaster (new added) # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_roles_role_type/__init__.py b/python/test/test_paths/test_openapi_v1_apps_app_id_roles_role_type/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_roles_role_type/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_roles_role_type/test_delete.py b/python/test/test_paths/test_openapi_v1_apps_app_id_roles_role_type/test_delete.py deleted file mode 100644 index a5557fe9..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_roles_role_type/test_delete.py +++ /dev/null @@ -1,40 +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_apps_app_id_roles_role_type import delete # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdRolesRoleType(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdRolesRoleType 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 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_app_id_roles_role_type/test_post.py b/python/test/test_paths/test_openapi_v1_apps_app_id_roles_role_type/test_post.py deleted file mode 100644 index 480932aa..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_app_id_roles_role_type/test_post.py +++ /dev/null @@ -1,40 +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_apps_app_id_roles_role_type import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsAppIdRolesRoleType(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsAppIdRolesRoleType 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 - response_body = '' - - -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 deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_authorized/__init__.py +++ /dev/null @@ -1 +0,0 @@ - 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 deleted file mode 100644 index f54e451a..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_authorized/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_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 deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_by_self/__init__.py +++ /dev/null @@ -1 +0,0 @@ - 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 deleted file mode 100644 index 86daebff..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_by_self/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_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/User的应用列表(分页)(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 deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_envs_env/__init__.py +++ /dev/null @@ -1 +0,0 @@ - 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 deleted file mode 100644 index 1b071477..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_envs_env/test_post.py +++ /dev/null @@ -1,42 +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_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 - response_body = '' - - - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_apps_search_by_appid_or_name/__init__.py b/python/test/test_paths/test_openapi_v1_apps_search_by_appid_or_name/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_search_by_appid_or_name/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_apps_search_by_appid_or_name/test_get.py b/python/test/test_paths/test_openapi_v1_apps_search_by_appid_or_name/test_get.py deleted file mode 100644 index 3b1dcfeb..00000000 --- a/python/test/test_paths/test_openapi_v1_apps_search_by_appid_or_name/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_apps_search_by_appid_or_name import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1AppsSearchByAppidOrName(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1AppsSearchByAppidOrName unit test stubs - 按应用ID或名称搜索应用(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_configs_export/__init__.py b/python/test/test_paths/test_openapi_v1_configs_export/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_configs_export/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_configs_export/test_get.py b/python/test/test_paths/test_openapi_v1_configs_export/test_get.py deleted file mode 100644 index e4abef1f..00000000 --- a/python/test/test_paths/test_openapi_v1_configs_export/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_configs_export import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1ConfigsExport(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1ConfigsExport 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_configs_import/__init__.py b/python/test/test_paths/test_openapi_v1_configs_import/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_configs_import/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_configs_import/test_post.py b/python/test/test_paths/test_openapi_v1_configs_import/test_post.py deleted file mode 100644 index faf07372..00000000 --- a/python/test/test_paths/test_openapi_v1_configs_import/test_post.py +++ /dev/null @@ -1,40 +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_configs_import import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1ConfigsImport(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1ConfigsImport 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 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_consumer_tokens_by_app_id/__init__.py b/python/test/test_paths/test_openapi_v1_consumer_tokens_by_app_id/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_consumer_tokens_by_app_id/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_consumer_tokens_by_app_id/test_get.py b/python/test/test_paths/test_openapi_v1_consumer_tokens_by_app_id/test_get.py deleted file mode 100644 index 244055b4..00000000 --- a/python/test/test_paths/test_openapi_v1_consumer_tokens_by_app_id/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_consumer_tokens_by_app_id import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1ConsumerTokensByAppId(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1ConsumerTokensByAppId unit test stubs - 按应用ID查询消费者Token(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_consumers/__init__.py b/python/test/test_paths/test_openapi_v1_consumers/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_consumers/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_consumers/test_get.py b/python/test/test_paths/test_openapi_v1_consumers/test_get.py deleted file mode 100644 index a51866f2..00000000 --- a/python/test/test_paths/test_openapi_v1_consumers/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_consumers import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1Consumers(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1Consumers 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_consumers/test_post.py b/python/test/test_paths/test_openapi_v1_consumers/test_post.py deleted file mode 100644 index 579b31f6..00000000 --- a/python/test/test_paths/test_openapi_v1_consumers/test_post.py +++ /dev/null @@ -1,43 +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_consumers import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1Consumers(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1Consumers 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_consumers_by_app_id/__init__.py b/python/test/test_paths/test_openapi_v1_consumers_by_app_id/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_consumers_by_app_id/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_consumers_by_app_id/test_delete.py b/python/test/test_paths/test_openapi_v1_consumers_by_app_id/test_delete.py deleted file mode 100644 index 7a2337d5..00000000 --- a/python/test/test_paths/test_openapi_v1_consumers_by_app_id/test_delete.py +++ /dev/null @@ -1,40 +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_consumers_by_app_id import delete # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1ConsumersByAppId(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1ConsumersByAppId unit test stubs - 按应用ID删除消费者(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 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_consumers_token_assign_role/__init__.py b/python/test/test_paths/test_openapi_v1_consumers_token_assign_role/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_consumers_token_assign_role/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_consumers_token_assign_role/test_post.py b/python/test/test_paths/test_openapi_v1_consumers_token_assign_role/test_post.py deleted file mode 100644 index de401577..00000000 --- a/python/test/test_paths/test_openapi_v1_consumers_token_assign_role/test_post.py +++ /dev/null @@ -1,43 +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_consumers_token_assign_role import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1ConsumersTokenAssignRole(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1ConsumersTokenAssignRole 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/__init__.py b/python/test/test_paths/test_openapi_v1_envs/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_envs/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_envs/test_get.py b/python/test/test_paths/test_openapi_v1_envs/test_get.py deleted file mode 100644 index 483125b4..00000000 --- a/python/test/test_paths/test_openapi_v1_envs/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 import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1Envs(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1Envs unit test stubs - 获取所有环境 # 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_appnamespaces_public_namespace_name_instances/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/__init__.py +++ /dev/null @@ -1 +0,0 @@ - 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 deleted file mode 100644 index 056069bd..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_appnamespaces_public_namespace_name_instances/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_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 deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters/__init__.py +++ /dev/null @@ -1 +0,0 @@ - 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 deleted file mode 100644 index d8bcbe3f..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters/test_post.py +++ /dev/null @@ -1,43 +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 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 deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name/__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/test_delete.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name/test_delete.py deleted file mode 100644 index 04c4346c..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name/test_delete.py +++ /dev/null @@ -1,40 +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 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 - response_body = '' - - -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 deleted file mode 100644 index 3326b47e..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name/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 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 deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/__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/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/test_get.py deleted file mode 100644 index 0335e903..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces/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 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 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/__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/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 deleted file mode 100644 index 1051f60e..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name/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 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_associated_public_namespace/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/__init__.py 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_associated_public_namespace/__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_associated_public_namespace/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/test_get.py deleted file mode 100644 index ead71124..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_associated_public_namespace/test_get.py +++ /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_associated_public_namespace import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameAssociatedPublicNamespace(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameAssociatedPublicNamespace unit test stubs - 查询关联Namespace对应的公共Namespace详情 (new added) # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/__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_branches/__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_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 deleted file mode 100644 index d32df6ed..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/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_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 deleted file mode 100644 index 9f2c988a..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches/test_post.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_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 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_branches_branch_name/__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_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 deleted file mode 100644 index cdb37cb5..00000000 --- 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 +++ /dev/null @@ -1,40 +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_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 - response_body = '' - - -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_post.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_post.py deleted file mode 100644 index 84cd97e2..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_branches_branch_name/test_post.py +++ /dev/null @@ -1,43 +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_branches_branch_name import post # 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 = 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_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 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_branches_branch_name_gray_del_releases/__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_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 deleted file mode 100644 index 58658d22..00000000 --- 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 +++ /dev/null @@ -1,43 +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_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 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_branches_branch_name_items/__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_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 deleted file mode 100644 index 145aefd1..00000000 --- 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 +++ /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_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 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_branches_branch_name_merge/__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_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 deleted file mode 100644 index fc36e060..00000000 --- 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 +++ /dev/null @@ -1,43 +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_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 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_branches_branch_name_releases/__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_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 deleted file mode 100644 index 7efa4ce3..00000000 --- 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 +++ /dev/null @@ -1,43 +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_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 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_branches_branch_name_rules/__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_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 deleted file mode 100644 index c4f12162..00000000 --- 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 +++ /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_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 deleted file mode 100644 index c5ab0f71..00000000 --- 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 +++ /dev/null @@ -1,42 +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_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 - response_body = '' - - - - -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 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_encoded_items_key/__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_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 deleted file mode 100644 index b94b137b..00000000 --- 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 +++ /dev/null @@ -1,40 +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_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 - response_body = '' - - -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 deleted file mode 100644 index 4a700c49..00000000 --- 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 +++ /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_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 deleted file mode 100644 index 41db1ecf..00000000 --- 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 +++ /dev/null @@ -1,42 +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_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 - response_body = '' - - - - -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 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/__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/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 deleted file mode 100644 index c9ce280e..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_instances/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 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_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 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_items/__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_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 deleted file mode 100644 index 37c2020b..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/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_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 deleted file mode 100644 index d6e3a8aa..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/test_post.py +++ /dev/null @@ -1,43 +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_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/test_put.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/test_put.py deleted file mode 100644 index 315e5e50..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items/test_put.py +++ /dev/null @@ -1,42 +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_items import put # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItems(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItems 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 - response_body = '' - - - - -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_diff/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/__init__.py 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_items_diff/__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_items_diff/test_post.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/test_post.py deleted file mode 100644 index f4c9d153..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_diff/test_post.py +++ /dev/null @@ -1,43 +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_items_diff import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsDiff(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsDiff 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 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_items_key/__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_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 deleted file mode 100644 index 61a90bd5..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_delete.py +++ /dev/null @@ -1,40 +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_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 - response_body = '' - - -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 deleted file mode 100644 index 523e1e6c..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/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_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 deleted file mode 100644 index 22a3f035..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_key/test_put.py +++ /dev/null @@ -1,42 +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_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 - response_body = '' - - - - -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_revocation/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/__init__.py 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_items_revocation/__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_items_revocation/test_post.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/test_post.py deleted file mode 100644 index d3792183..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_revocation/test_post.py +++ /dev/null @@ -1,40 +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_items_revocation import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevocation(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsRevocation 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 - response_body = '' - - -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_synchronize/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/__init__.py 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_items_synchronize/__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_items_synchronize/test_post.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/test_post.py deleted file mode 100644 index c3aa8b57..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_synchronize/test_post.py +++ /dev/null @@ -1,42 +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_items_synchronize import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSynchronize(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsSynchronize 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 - response_body = '' - - - - -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_validation/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/__init__.py 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_items_validation/__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_items_validation/test_post.py b/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/test_post.py deleted file mode 100644 index 2779ae69..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_items_validation/test_post.py +++ /dev/null @@ -1,42 +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_items_validation import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidation(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1EnvsEnvAppsAppIdClustersClusterNameNamespacesNamespaceNameItemsValidation 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 - response_body = '' - - - - -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 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_lock/__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_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 deleted file mode 100644 index 4715c718..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_lock/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_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 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_releases/__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_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 deleted file mode 100644 index 55b32bf7..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases/test_post.py +++ /dev/null @@ -1,43 +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_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 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_releases_active/__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_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 deleted file mode 100644 index e1b3342e..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_active/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_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_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 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_releases_latest/__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_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 deleted file mode 100644 index e7f99039..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_apps_app_id_clusters_cluster_name_namespaces_namespace_name_releases_latest/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_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_instances_by_namespace/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace/test_get.py deleted file mode 100644 index 5d697fcb..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace/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_instances_by_namespace import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1EnvsEnvInstancesByNamespace(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1EnvsEnvInstancesByNamespace unit test stubs - 根据namespaceName查询实例(new added) # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/test_get.py deleted file mode 100644 index 0281ca1a..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_instances_by_namespace_and_releases_not_in/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_instances_by_namespace_and_releases_not_in import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1EnvsEnvInstancesByNamespaceAndReleasesNotIn(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1EnvsEnvInstancesByNamespaceAndReleasesNotIn unit test stubs - 查询不在指定发布版本中的实例 (new added) # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - - - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_envs_env_instances_by_release/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_instances_by_release/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_instances_by_release/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_envs_env_instances_by_release/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_instances_by_release/test_get.py deleted file mode 100644 index 1ebac62a..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_instances_by_release/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_instances_by_release import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1EnvsEnvInstancesByRelease(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1EnvsEnvInstancesByRelease 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_comparison/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_releases_comparison/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_releases_comparison/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_envs_env_releases_comparison/test_get.py b/python/test/test_paths/test_openapi_v1_envs_env_releases_comparison/test_get.py deleted file mode 100644 index 08ea3745..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_releases_comparison/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_releases_comparison import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1EnvsEnvReleasesComparison(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1EnvsEnvReleasesComparison unit test stubs - Compare two releases # 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 deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id/__init__.py +++ /dev/null @@ -1 +0,0 @@ - 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 deleted file mode 100644 index b229feb5..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id/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_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_rollback/__init__.py b/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_rollback/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_rollback/__init__.py +++ /dev/null @@ -1 +0,0 @@ - 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 deleted file mode 100644 index 28d2de3d..00000000 --- a/python/test/test_paths/test_openapi_v1_envs_env_releases_release_id_rollback/test_put.py +++ /dev/null @@ -1,40 +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_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 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_favorites/__init__.py b/python/test/test_paths/test_openapi_v1_favorites/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_favorites/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_favorites/test_get.py b/python/test/test_paths/test_openapi_v1_favorites/test_get.py deleted file mode 100644 index 679c291f..00000000 --- a/python/test/test_paths/test_openapi_v1_favorites/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_favorites import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1Favorites(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1Favorites 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_favorites/test_post.py b/python/test/test_paths/test_openapi_v1_favorites/test_post.py deleted file mode 100644 index 92f8fa71..00000000 --- a/python/test/test_paths/test_openapi_v1_favorites/test_post.py +++ /dev/null @@ -1,43 +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_favorites import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1Favorites(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1Favorites 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_favorites_favorite_id/__init__.py b/python/test/test_paths/test_openapi_v1_favorites_favorite_id/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_favorites_favorite_id/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_favorites_favorite_id/test_delete.py b/python/test/test_paths/test_openapi_v1_favorites_favorite_id/test_delete.py deleted file mode 100644 index 24154bb6..00000000 --- a/python/test/test_paths/test_openapi_v1_favorites_favorite_id/test_delete.py +++ /dev/null @@ -1,40 +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_favorites_favorite_id import delete # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1FavoritesFavoriteId(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1FavoritesFavoriteId 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 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_favorites_favorite_id/test_put.py b/python/test/test_paths/test_openapi_v1_favorites_favorite_id/test_put.py deleted file mode 100644 index f533861a..00000000 --- a/python/test/test_paths/test_openapi_v1_favorites_favorite_id/test_put.py +++ /dev/null @@ -1,40 +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_favorites_favorite_id import put # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1FavoritesFavoriteId(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1FavoritesFavoriteId 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 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_global_search_item_info_by_key_or_value/__init__.py b/python/test/test_paths/test_openapi_v1_global_search_item_info_by_key_or_value/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_global_search_item_info_by_key_or_value/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_global_search_item_info_by_key_or_value/test_get.py b/python/test/test_paths/test_openapi_v1_global_search_item_info_by_key_or_value/test_get.py deleted file mode 100644 index e1b68f55..00000000 --- a/python/test/test_paths/test_openapi_v1_global_search_item_info_by_key_or_value/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_global_search_item_info_by_key_or_value import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1GlobalSearchItemInfoByKeyOrValue(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1GlobalSearchItemInfoByKeyOrValue unit test stubs - 按Key或Value全局搜索配置(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_import/__init__.py b/python/test/test_paths/test_openapi_v1_import/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_import/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_import/test_post.py b/python/test/test_paths/test_openapi_v1_import/test_post.py deleted file mode 100644 index 7305c34a..00000000 --- a/python/test/test_paths/test_openapi_v1_import/test_post.py +++ /dev/null @@ -1,40 +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_import import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1Import(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1Import 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 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_namespaces/__init__.py b/python/test/test_paths/test_openapi_v1_namespaces/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_namespaces/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_namespaces/test_post.py b/python/test/test_paths/test_openapi_v1_namespaces/test_post.py deleted file mode 100644 index 0172b9d1..00000000 --- a/python/test/test_paths/test_openapi_v1_namespaces/test_post.py +++ /dev/null @@ -1,42 +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_namespaces import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1Namespaces(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1Namespaces unit test stubs - 创建Namespace (new added) # noqa: E501 - """ - _configuration = configuration.Configuration() - - def setUp(self): - used_api_client = api_client.ApiClient(configuration=self._configuration) - self.api = post.ApiForpost(api_client=used_api_client) # noqa: E501 - - def tearDown(self): - pass - - response_status = 200 - response_body = '' - - - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_organizations/__init__.py b/python/test/test_paths/test_openapi_v1_organizations/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_organizations/__init__.py +++ /dev/null @@ -1 +0,0 @@ - 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 deleted file mode 100644 index 4789f9ac..00000000 --- a/python/test/test_paths/test_openapi_v1_organizations/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_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_paths/test_openapi_v1_page_settings/__init__.py b/python/test/test_paths/test_openapi_v1_page_settings/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_page_settings/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_page_settings/test_get.py b/python/test/test_paths/test_openapi_v1_page_settings/test_get.py deleted file mode 100644 index 02882d1c..00000000 --- a/python/test/test_paths/test_openapi_v1_page_settings/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_page_settings import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1PageSettings(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1PageSettings unit test stubs - 获取Portal页面配置(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_permissions_root/__init__.py b/python/test/test_paths/test_openapi_v1_permissions_root/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_permissions_root/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_permissions_root/test_get.py b/python/test/test_paths/test_openapi_v1_permissions_root/test_get.py deleted file mode 100644 index a69a45ef..00000000 --- a/python/test/test_paths/test_openapi_v1_permissions_root/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_permissions_root import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1PermissionsRoot(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1PermissionsRoot unit test stubs - 校验Root权限 (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_server_envs_env_config_db_config/__init__.py b/python/test/test_paths/test_openapi_v1_server_envs_env_config_db_config/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_server_envs_env_config_db_config/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_server_envs_env_config_db_config/test_delete.py b/python/test/test_paths/test_openapi_v1_server_envs_env_config_db_config/test_delete.py deleted file mode 100644 index 94ab41c5..00000000 --- a/python/test/test_paths/test_openapi_v1_server_envs_env_config_db_config/test_delete.py +++ /dev/null @@ -1,40 +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_server_envs_env_config_db_config import delete # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1ServerEnvsEnvConfigDbConfig(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1ServerEnvsEnvConfigDbConfig unit test stubs - 删除Config DB配置(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 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_server_envs_env_config_db_config/test_post.py b/python/test/test_paths/test_openapi_v1_server_envs_env_config_db_config/test_post.py deleted file mode 100644 index ddc7f7d9..00000000 --- a/python/test/test_paths/test_openapi_v1_server_envs_env_config_db_config/test_post.py +++ /dev/null @@ -1,43 +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_server_envs_env_config_db_config import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1ServerEnvsEnvConfigDbConfig(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1ServerEnvsEnvConfigDbConfig unit test stubs - 创建或更新Config DB配置(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_server_envs_env_config_db_config_find_all_config/__init__.py b/python/test/test_paths/test_openapi_v1_server_envs_env_config_db_config_find_all_config/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_server_envs_env_config_db_config_find_all_config/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_server_envs_env_config_db_config_find_all_config/test_get.py b/python/test/test_paths/test_openapi_v1_server_envs_env_config_db_config_find_all_config/test_get.py deleted file mode 100644 index 502efcf1..00000000 --- a/python/test/test_paths/test_openapi_v1_server_envs_env_config_db_config_find_all_config/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_server_envs_env_config_db_config_find_all_config import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1ServerEnvsEnvConfigDbConfigFindAllConfig(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1ServerEnvsEnvConfigDbConfigFindAllConfig unit test stubs - 查询指定环境全部Config DB配置(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_server_portal_db_config/__init__.py b/python/test/test_paths/test_openapi_v1_server_portal_db_config/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_server_portal_db_config/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_server_portal_db_config/test_delete.py b/python/test/test_paths/test_openapi_v1_server_portal_db_config/test_delete.py deleted file mode 100644 index c2d98337..00000000 --- a/python/test/test_paths/test_openapi_v1_server_portal_db_config/test_delete.py +++ /dev/null @@ -1,40 +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_server_portal_db_config import delete # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1ServerPortalDbConfig(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1ServerPortalDbConfig unit test stubs - 删除Portal DB配置(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 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_server_portal_db_config/test_post.py b/python/test/test_paths/test_openapi_v1_server_portal_db_config/test_post.py deleted file mode 100644 index 229b2943..00000000 --- a/python/test/test_paths/test_openapi_v1_server_portal_db_config/test_post.py +++ /dev/null @@ -1,43 +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_server_portal_db_config import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1ServerPortalDbConfig(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1ServerPortalDbConfig unit test stubs - 创建或更新Portal DB配置(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_server_portal_db_config_find_all_config/__init__.py b/python/test/test_paths/test_openapi_v1_server_portal_db_config_find_all_config/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_server_portal_db_config_find_all_config/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_server_portal_db_config_find_all_config/test_get.py b/python/test/test_paths/test_openapi_v1_server_portal_db_config_find_all_config/test_get.py deleted file mode 100644 index feb6eb73..00000000 --- a/python/test/test_paths/test_openapi_v1_server_portal_db_config_find_all_config/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_server_portal_db_config_find_all_config import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1ServerPortalDbConfigFindAllConfig(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1ServerPortalDbConfigFindAllConfig unit test stubs - 查询全部Portal DB配置(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_system_info/__init__.py b/python/test/test_paths/test_openapi_v1_system_info/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_system_info/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_system_info/test_get.py b/python/test/test_paths/test_openapi_v1_system_info/test_get.py deleted file mode 100644 index 353295a4..00000000 --- a/python/test/test_paths/test_openapi_v1_system_info/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_system_info import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1SystemInfo(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1SystemInfo 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_system_info_health/__init__.py b/python/test/test_paths/test_openapi_v1_system_info_health/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_system_info_health/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_system_info_health/test_get.py b/python/test/test_paths/test_openapi_v1_system_info_health/test_get.py deleted file mode 100644 index 8d5c2f97..00000000 --- a/python/test/test_paths/test_openapi_v1_system_info_health/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_system_info_health import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1SystemInfoHealth(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1SystemInfoHealth 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_system_role_manage_app_master/__init__.py b/python/test/test_paths/test_openapi_v1_system_role_manage_app_master/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_system_role_manage_app_master/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_system_role_manage_app_master/test_get.py b/python/test/test_paths/test_openapi_v1_system_role_manage_app_master/test_get.py deleted file mode 100644 index 7f2258a9..00000000 --- a/python/test/test_paths/test_openapi_v1_system_role_manage_app_master/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_system_role_manage_app_master import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1SystemRoleManageAppMaster(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1SystemRoleManageAppMaster unit test stubs - 校验AppMaster开关 (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_system_roles_create_application/__init__.py b/python/test/test_paths/test_openapi_v1_system_roles_create_application/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_system_roles_create_application/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_system_roles_create_application/test_delete.py b/python/test/test_paths/test_openapi_v1_system_roles_create_application/test_delete.py deleted file mode 100644 index 91a61446..00000000 --- a/python/test/test_paths/test_openapi_v1_system_roles_create_application/test_delete.py +++ /dev/null @@ -1,40 +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_system_roles_create_application import delete # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1SystemRolesCreateApplication(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1SystemRolesCreateApplication 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 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_system_roles_create_application/test_get.py b/python/test/test_paths/test_openapi_v1_system_roles_create_application/test_get.py deleted file mode 100644 index 594bfd01..00000000 --- a/python/test/test_paths/test_openapi_v1_system_roles_create_application/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_system_roles_create_application import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1SystemRolesCreateApplication(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1SystemRolesCreateApplication 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_system_roles_create_application/test_post.py b/python/test/test_paths/test_openapi_v1_system_roles_create_application/test_post.py deleted file mode 100644 index d6b8e4d9..00000000 --- a/python/test/test_paths/test_openapi_v1_system_roles_create_application/test_post.py +++ /dev/null @@ -1,40 +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_system_roles_create_application import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1SystemRolesCreateApplication(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1SystemRolesCreateApplication 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 - response_body = '' - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_system_roles_create_application_role_users/__init__.py b/python/test/test_paths/test_openapi_v1_system_roles_create_application_role_users/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_system_roles_create_application_role_users/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_system_roles_create_application_role_users/test_get.py b/python/test/test_paths/test_openapi_v1_system_roles_create_application_role_users/test_get.py deleted file mode 100644 index c015516b..00000000 --- a/python/test/test_paths/test_openapi_v1_system_roles_create_application_role_users/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_system_roles_create_application_role_users import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1SystemRolesCreateApplicationRoleUsers(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1SystemRolesCreateApplicationRoleUsers 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_user/__init__.py b/python/test/test_paths/test_openapi_v1_user/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_user/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_user/test_get.py b/python/test/test_paths/test_openapi_v1_user/test_get.py deleted file mode 100644 index 8c4cb5c2..00000000 --- a/python/test/test_paths/test_openapi_v1_user/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_user import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1User(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1User unit test stubs - 获取当前Portal用户(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_users/__init__.py b/python/test/test_paths/test_openapi_v1_users/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_users/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_users/test_get.py b/python/test/test_paths/test_openapi_v1_users/test_get.py deleted file mode 100644 index 5820c4c1..00000000 --- a/python/test/test_paths/test_openapi_v1_users/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_users import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1Users(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1Users 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_users/test_post.py b/python/test/test_paths/test_openapi_v1_users/test_post.py deleted file mode 100644 index a449ba39..00000000 --- a/python/test/test_paths/test_openapi_v1_users/test_post.py +++ /dev/null @@ -1,42 +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_users import post # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1Users(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1Users 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 - response_body = '' - - - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_users_enabled/__init__.py b/python/test/test_paths/test_openapi_v1_users_enabled/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_users_enabled/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_users_enabled/test_put.py b/python/test/test_paths/test_openapi_v1_users_enabled/test_put.py deleted file mode 100644 index 00a17d5b..00000000 --- a/python/test/test_paths/test_openapi_v1_users_enabled/test_put.py +++ /dev/null @@ -1,42 +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_users_enabled import put # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1UsersEnabled(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1UsersEnabled 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 - response_body = '' - - - - -if __name__ == '__main__': - unittest.main() diff --git a/python/test/test_paths/test_openapi_v1_users_user_id/__init__.py b/python/test/test_paths/test_openapi_v1_users_user_id/__init__.py deleted file mode 100644 index 8b137891..00000000 --- a/python/test/test_paths/test_openapi_v1_users_user_id/__init__.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/python/test/test_paths/test_openapi_v1_users_user_id/test_get.py b/python/test/test_paths/test_openapi_v1_users_user_id/test_get.py deleted file mode 100644 index f2278426..00000000 --- a/python/test/test_paths/test_openapi_v1_users_user_id/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_users_user_id import get # noqa: E501 -from apollo_openapi import configuration, schemas, api_client - -from .. import ApiTestMixin - - -class TestOpenapiV1UsersUserId(ApiTestMixin, unittest.TestCase): - """ - OpenapiV1UsersUserId 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/tox.ini b/python/tox.ini deleted file mode 100644 index 730c4005..00000000 --- a/python/tox.ini +++ /dev/null @@ -1,10 +0,0 @@ -[tox] -envlist = py37 - -[testenv] -passenv = PYTHON_VERSION -deps=-r{toxinidir}/requirements.txt - -r{toxinidir}/test-requirements.txt - -commands= - pytest --cov=apollo_openapi diff --git a/rust/.gitignore b/rust/.gitignore deleted file mode 100644 index 6aa10640..00000000 --- a/rust/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/target/ -**/*.rs.bk -Cargo.lock diff --git a/rust/.openapi-generator-ignore b/rust/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/rust/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/rust/.openapi-generator/FILES b/rust/.openapi-generator/FILES deleted file mode 100644 index 3b1adb58..00000000 --- a/rust/.openapi-generator/FILES +++ /dev/null @@ -1,88 +0,0 @@ -.gitignore -.openapi-generator-ignore -.travis.yml -Cargo.toml -README.md -docs/ExceptionResponse.md -docs/NamespaceGrayDelReleaseDto.md -docs/NamespaceReleaseDto.md -docs/OpenAccessKeyDto.md -docs/OpenAppDto.md -docs/OpenAppNamespaceDto.md -docs/OpenAppRoleUserDto.md -docs/OpenClusterDto.md -docs/OpenClusterNamespaceRoleUserDto.md -docs/OpenCreateAppDto.md -docs/OpenCreateNamespaceDto.md -docs/OpenEnvClusterDto.md -docs/OpenEnvClusterInfo.md -docs/OpenEnvNamespaceRoleUserDto.md -docs/OpenGrayReleaseRuleDto.md -docs/OpenGrayReleaseRuleItemDto.md -docs/OpenInstanceConfigDto.md -docs/OpenInstanceDto.md -docs/OpenInstancePageDto.md -docs/OpenItemDiffDto.md -docs/OpenItemDto.md -docs/OpenItemExtendDto.md -docs/OpenItemPageDto.md -docs/OpenMissEnvDto.md -docs/OpenNamespaceDto.md -docs/OpenNamespaceExtendDto.md -docs/OpenNamespaceIdentifier.md -docs/OpenNamespaceLockDto.md -docs/OpenNamespaceRoleUserDto.md -docs/OpenNamespaceSyncDto.md -docs/OpenNamespaceTextModel.md -docs/OpenNamespaceUsageDto.md -docs/OpenOrganizationDto.md -docs/OpenPermissionConditionDto.md -docs/OpenReleaseChangeDto.md -docs/OpenReleaseDiffDto.md -docs/OpenReleaseDto.md -docs/OpenUserDto.md -docs/OpenUserInfoDto.md -git_push.sh -src/apis/configuration.rs -src/apis/mod.rs -src/lib.rs -src/models/exception_response.rs -src/models/mod.rs -src/models/namespace_gray_del_release_dto.rs -src/models/namespace_release_dto.rs -src/models/open_access_key_dto.rs -src/models/open_app_dto.rs -src/models/open_app_namespace_dto.rs -src/models/open_app_role_user_dto.rs -src/models/open_cluster_dto.rs -src/models/open_cluster_namespace_role_user_dto.rs -src/models/open_create_app_dto.rs -src/models/open_create_namespace_dto.rs -src/models/open_env_cluster_dto.rs -src/models/open_env_cluster_info.rs -src/models/open_env_namespace_role_user_dto.rs -src/models/open_gray_release_rule_dto.rs -src/models/open_gray_release_rule_item_dto.rs -src/models/open_instance_config_dto.rs -src/models/open_instance_dto.rs -src/models/open_instance_page_dto.rs -src/models/open_item_diff_dto.rs -src/models/open_item_dto.rs -src/models/open_item_extend_dto.rs -src/models/open_item_page_dto.rs -src/models/open_miss_env_dto.rs -src/models/open_namespace_dto.rs -src/models/open_namespace_extend_dto.rs -src/models/open_namespace_identifier.rs -src/models/open_namespace_lock_dto.rs -src/models/open_namespace_role_user_dto.rs -src/models/open_namespace_sync_dto.rs -src/models/open_namespace_text_model.rs -src/models/open_namespace_usage_dto.rs -src/models/open_organization_dto.rs -src/models/open_permission_condition_dto.rs -src/models/open_release_change_dto.rs -src/models/open_release_diff_dto.rs -src/models/open_release_dto.rs -src/models/open_user_dto.rs -src/models/open_user_info_dto.rs diff --git a/rust/.openapi-generator/VERSION b/rust/.openapi-generator/VERSION deleted file mode 100644 index 826f5ce0..00000000 --- a/rust/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 diff --git a/rust/.travis.yml b/rust/.travis.yml deleted file mode 100644 index 22761ba7..00000000 --- a/rust/.travis.yml +++ /dev/null @@ -1 +0,0 @@ -language: rust diff --git a/rust/Cargo.toml b/rust/Cargo.toml deleted file mode 100644 index a3210b9d..00000000 --- a/rust/Cargo.toml +++ /dev/null @@ -1,18 +0,0 @@ -[package] -name = "apollo-openapi" -version = "0.3.8" -authors = ["OpenAPI Generator team and contributors"] -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 = "2018" - -[dependencies] -serde = "^1.0" -serde_derive = "^1.0" -serde_json = "^1.0" -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 deleted file mode 100644 index 375ba979..00000000 --- a/rust/README.md +++ /dev/null @@ -1,94 +0,0 @@ -# Rust API client for apollo-openapi - -

Apollo配置中心OpenAPI接口文档

- -

认证方式

-

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

- -

获取 Token 的方式:

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

使用示例

-
curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\
--H \"Authorization: your_token_here\"
- - - -## Overview - -This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [openapi-spec](https://openapis.org) from a remote server, you can easily generate an API client. - -- API version: 0.3.8 -- Package version: 0.3.8 -- Build package: `org.openapitools.codegen.languages.RustClientCodegen` - -## Installation - -Put the package under your project folder in a directory named `apollo-openapi` and add the following to `Cargo.toml` under `[dependencies]`: - -``` -apollo-openapi = { path = "./apollo-openapi" } -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://localhost* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- - - -## Documentation For Models - - - [ExceptionResponse](docs/ExceptionResponse.md) - - [NamespaceGrayDelReleaseDto](docs/NamespaceGrayDelReleaseDto.md) - - [NamespaceReleaseDto](docs/NamespaceReleaseDto.md) - - [OpenAccessKeyDto](docs/OpenAccessKeyDto.md) - - [OpenAppDto](docs/OpenAppDto.md) - - [OpenAppNamespaceDto](docs/OpenAppNamespaceDto.md) - - [OpenAppRoleUserDto](docs/OpenAppRoleUserDto.md) - - [OpenClusterDto](docs/OpenClusterDto.md) - - [OpenClusterNamespaceRoleUserDto](docs/OpenClusterNamespaceRoleUserDto.md) - - [OpenCreateAppDto](docs/OpenCreateAppDto.md) - - [OpenCreateNamespaceDto](docs/OpenCreateNamespaceDto.md) - - [OpenEnvClusterDto](docs/OpenEnvClusterDto.md) - - [OpenEnvClusterInfo](docs/OpenEnvClusterInfo.md) - - [OpenEnvNamespaceRoleUserDto](docs/OpenEnvNamespaceRoleUserDto.md) - - [OpenGrayReleaseRuleDto](docs/OpenGrayReleaseRuleDto.md) - - [OpenGrayReleaseRuleItemDto](docs/OpenGrayReleaseRuleItemDto.md) - - [OpenInstanceConfigDto](docs/OpenInstanceConfigDto.md) - - [OpenInstanceDto](docs/OpenInstanceDto.md) - - [OpenInstancePageDto](docs/OpenInstancePageDto.md) - - [OpenItemDiffDto](docs/OpenItemDiffDto.md) - - [OpenItemDto](docs/OpenItemDto.md) - - [OpenItemExtendDto](docs/OpenItemExtendDto.md) - - [OpenItemPageDto](docs/OpenItemPageDto.md) - - [OpenMissEnvDto](docs/OpenMissEnvDto.md) - - [OpenNamespaceDto](docs/OpenNamespaceDto.md) - - [OpenNamespaceExtendDto](docs/OpenNamespaceExtendDto.md) - - [OpenNamespaceIdentifier](docs/OpenNamespaceIdentifier.md) - - [OpenNamespaceLockDto](docs/OpenNamespaceLockDto.md) - - [OpenNamespaceRoleUserDto](docs/OpenNamespaceRoleUserDto.md) - - [OpenNamespaceSyncDto](docs/OpenNamespaceSyncDto.md) - - [OpenNamespaceTextModel](docs/OpenNamespaceTextModel.md) - - [OpenNamespaceUsageDto](docs/OpenNamespaceUsageDto.md) - - [OpenOrganizationDto](docs/OpenOrganizationDto.md) - - [OpenPermissionConditionDto](docs/OpenPermissionConditionDto.md) - - [OpenReleaseChangeDto](docs/OpenReleaseChangeDto.md) - - [OpenReleaseDiffDto](docs/OpenReleaseDiffDto.md) - - [OpenReleaseDto](docs/OpenReleaseDto.md) - - [OpenUserDto](docs/OpenUserDto.md) - - [OpenUserInfoDto](docs/OpenUserInfoDto.md) - - -To get access to the crate's generated documentation, use: - -``` -cargo doc --open -``` - -## Author diff --git a/rust/docs/ExceptionResponse.md b/rust/docs/ExceptionResponse.md deleted file mode 100644 index b00f01ad..00000000 --- a/rust/docs/ExceptionResponse.md +++ /dev/null @@ -1,12 +0,0 @@ -# ExceptionResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | Option<**i32**> | HTTP 状态码 | [optional] -**message** | Option<**String**> | 错误信息 | [optional] -**timestamp** | Option<**String**> | 时间戳 | [optional] -**exception** | Option<**String**> | 错误类名 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/NamespaceGrayDelReleaseDto.md b/rust/docs/NamespaceGrayDelReleaseDto.md deleted file mode 100644 index 55a68b3d..00000000 --- a/rust/docs/NamespaceGrayDelReleaseDto.md +++ /dev/null @@ -1,13 +0,0 @@ -# NamespaceGrayDelReleaseDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**release_title** | Option<**String**> | 发布标题,用于标识这次灰度删除发布的名称或版本号 | [optional] -**release_comment** | Option<**String**> | 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 | [optional] -**released_by** | Option<**String**> | 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 | [optional] -**is_emergency_publish** | Option<**bool**> | 是否为紧急发布,紧急发布可能会跳过某些审核流程 | [optional] -**gray_del_keys** | Option<**Vec**> | 需要在灰度发布中删除的配置项键名列表 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/NamespaceReleaseDto.md b/rust/docs/NamespaceReleaseDto.md deleted file mode 100644 index b43d059d..00000000 --- a/rust/docs/NamespaceReleaseDto.md +++ /dev/null @@ -1,12 +0,0 @@ -# NamespaceReleaseDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**release_title** | Option<**String**> | 发布标题,用于标识这次发布的名称或版本号 | [optional] -**release_comment** | Option<**String**> | 发布备注,详细描述本次发布的变更内容和目的 | [optional] -**released_by** | Option<**String**> | 发布操作者用户名,记录是谁执行了这次发布操作 | [optional] -**is_emergency_publish** | Option<**bool**> | 是否为紧急发布,紧急发布可能会跳过某些审核流程 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenAccessKeyDto.md b/rust/docs/OpenAccessKeyDto.md deleted file mode 100644 index 668d7661..00000000 --- a/rust/docs/OpenAccessKeyDto.md +++ /dev/null @@ -1,19 +0,0 @@ -# OpenAccessKeyDto - -## 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] -**secret** | Option<**String**> | | [optional] -**app_id** | Option<**String**> | | [optional] -**mode** | Option<**i32**> | | [optional] -**enabled** | 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/OpenAppDto.md b/rust/docs/OpenAppDto.md deleted file mode 100644 index 5e9ef66a..00000000 --- a/rust/docs/OpenAppDto.md +++ /dev/null @@ -1,21 +0,0 @@ -# OpenAppDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | 数据创建者用户名,记录是谁创建了这个应用 | [optional] -**data_change_created_by_display_name** | Option<**String**> | 数据创建者显示名称,用于展示创建者的友好名称 | [optional] -**data_change_last_modified_by** | 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] -**name** | Option<**String**> | 应用名称,用于显示的友好名称 | [optional] -**app_id** | Option<**String**> | 应用唯一标识符,全局唯一的应用ID | [optional] -**org_id** | Option<**String**> | 组织ID,应用所属组织的唯一标识 | [optional] -**org_name** | Option<**String**> | 组织名称,应用所属组织的显示名称 | [optional] -**owner_name** | Option<**String**> | 应用负责人姓名,应用的主要负责人 | [optional] -**owner_email** | Option<**String**> | 应用负责人邮箱地址,用于接收应用相关通知 | [optional] -**owner_display_name** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenAppNamespaceDto.md b/rust/docs/OpenAppNamespaceDto.md deleted file mode 100644 index 1f7d4940..00000000 --- a/rust/docs/OpenAppNamespaceDto.md +++ /dev/null @@ -1,20 +0,0 @@ -# OpenAppNamespaceDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | 命名空间创建者用户名,记录是谁创建了这个应用命名空间 | [optional] -**data_change_created_by_display_name** | Option<**String**> | 命名空间创建者显示名称,用于展示创建者的友好名称 | [optional] -**data_change_last_modified_by** | 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] -**name** | Option<**String**> | 命名空间名称,在同一应用内唯一标识一个命名空间 | [optional] -**app_id** | Option<**String**> | 所属应用的唯一标识符 | [optional] -**format** | Option<**String**> | 命名空间格式类型,如properties、xml、json、yml等 | [optional] -**is_public** | Option<**bool**> | 是否为公共命名空间,公共命名空间可以被其他应用关联使用 | [optional] -**append_namespace_prefix** | Option<**bool**> | 对于公共命名空间,是否在命名空间名称前添加前缀 | [optional][default to true] -**comment** | Option<**String**> | 命名空间备注说明,描述命名空间的用途和包含的配置类型 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenAppRoleUserDto.md b/rust/docs/OpenAppRoleUserDto.md deleted file mode 100644 index 2bc5027a..00000000 --- a/rust/docs/OpenAppRoleUserDto.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenAppRoleUserDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app_id** | Option<**String**> | | [optional] -**master_users** | Option<[**Vec**](OpenUserInfoDTO.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/OpenClusterDto.md b/rust/docs/OpenClusterDto.md deleted file mode 100644 index 73f89961..00000000 --- a/rust/docs/OpenClusterDto.md +++ /dev/null @@ -1,19 +0,0 @@ -# OpenClusterDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | 集群创建者用户名,记录是谁创建了这个集群 | [optional] -**data_change_created_by_display_name** | Option<**String**> | 集群创建者显示名称,用于展示创建者的友好名称 | [optional] -**data_change_last_modified_by** | 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] -**name** | Option<**String**> | 集群名称,在同一应用和环境下唯一标识一个集群 | [optional] -**app_id** | Option<**String**> | 所属应用的唯一标识符 | [optional] -**id** | Option<**i64**> | 集群的唯一标识符 | [optional] -**parent_cluster_id** | Option<**i64**> | 父集群的ID | [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/OpenClusterNamespaceRoleUserDto.md b/rust/docs/OpenClusterNamespaceRoleUserDto.md deleted file mode 100644 index aa122868..00000000 --- a/rust/docs/OpenClusterNamespaceRoleUserDto.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenClusterNamespaceRoleUserDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app_id** | Option<**String**> | | [optional] -**env** | Option<**String**> | | [optional] -**cluster** | Option<**String**> | | [optional] -**modify_role_users** | Option<[**Vec**](OpenUserInfoDTO.md)> | | [optional] -**release_role_users** | Option<[**Vec**](OpenUserInfoDTO.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/OpenCreateAppDto.md b/rust/docs/OpenCreateAppDto.md deleted file mode 100644 index 57646739..00000000 --- a/rust/docs/OpenCreateAppDto.md +++ /dev/null @@ -1,11 +0,0 @@ -# OpenCreateAppDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**assign_app_role_to_self** | Option<**bool**> | 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 | [optional] -**admins** | Option<**Vec**> | 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 | [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/OpenCreateNamespaceDto.md b/rust/docs/OpenCreateNamespaceDto.md deleted file mode 100644 index 0d7469f6..00000000 --- a/rust/docs/OpenCreateNamespaceDto.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenCreateNamespaceDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app_id** | Option<**String**> | 所属应用的唯一标识符 | [optional] -**env** | Option<**String**> | 所在那个环境创建 | [optional] -**cluster_name** | Option<**String**> | 所属集群的名称 | [optional] -**app_namespace_name** | Option<**String**> | 根据已创建的appnamespace来实例化namespace | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenEnvClusterDto.md b/rust/docs/OpenEnvClusterDto.md deleted file mode 100644 index 975c856d..00000000 --- a/rust/docs/OpenEnvClusterDto.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenEnvClusterDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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/OpenEnvClusterInfo.md b/rust/docs/OpenEnvClusterInfo.md deleted file mode 100644 index 37bb4f9e..00000000 --- a/rust/docs/OpenEnvClusterInfo.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenEnvClusterInfo - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | Option<**i32**> | 查询状态码 | [optional] -**message** | Option<**String**> | 相关信息 | [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/OpenEnvNamespaceRoleUserDto.md b/rust/docs/OpenEnvNamespaceRoleUserDto.md deleted file mode 100644 index 8ff84da2..00000000 --- a/rust/docs/OpenEnvNamespaceRoleUserDto.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenEnvNamespaceRoleUserDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app_id** | Option<**String**> | | [optional] -**namespace_name** | Option<**String**> | | [optional] -**modify_role_users** | Option<[**Vec**](OpenUserInfoDTO.md)> | | [optional] -**release_role_users** | Option<[**Vec**](OpenUserInfoDTO.md)> | | [optional] -**env** | 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/OpenGrayReleaseRuleDto.md b/rust/docs/OpenGrayReleaseRuleDto.md deleted file mode 100644 index eee6e0fe..00000000 --- a/rust/docs/OpenGrayReleaseRuleDto.md +++ /dev/null @@ -1,19 +0,0 @@ -# OpenGrayReleaseRuleDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 | [optional] -**data_change_created_by_display_name** | Option<**String**> | 灰度规则创建者显示名称,用于展示创建者的友好名称 | [optional] -**data_change_last_modified_by** | 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] -**app_id** | Option<**String**> | 所属应用的唯一标识符 | [optional] -**cluster_name** | Option<**String**> | 所属集群的名称 | [optional] -**namespace_name** | Option<**String**> | 所属命名空间的名称 | [optional] -**branch_name** | Option<**String**> | 灰度分支名称,标识灰度发布的分支 | [optional] -**rule_items** | Option<[**Vec**](OpenGrayReleaseRuleItemDTO.md)> | 灰度发布规则项列表,包含具体的灰度规则条件 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenGrayReleaseRuleItemDto.md b/rust/docs/OpenGrayReleaseRuleItemDto.md deleted file mode 100644 index 1db97c8c..00000000 --- a/rust/docs/OpenGrayReleaseRuleItemDto.md +++ /dev/null @@ -1,11 +0,0 @@ -# OpenGrayReleaseRuleItemDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**client_app_id** | Option<**String**> | 客户端应用ID,指定哪个应用可以获取灰度配置 | [optional] -**client_ip_list** | Option<**Vec**> | 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 | [optional] -**client_label_list** | Option<**Vec**> | 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenInstanceConfigDto.md b/rust/docs/OpenInstanceConfigDto.md deleted file mode 100644 index 1d9bc8dd..00000000 --- a/rust/docs/OpenInstanceConfigDto.md +++ /dev/null @@ -1,11 +0,0 @@ -# OpenInstanceConfigDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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 deleted file mode 100644 index 4e4169ea..00000000 --- a/rust/docs/OpenInstanceDto.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenInstanceDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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/OpenInstancePageDto.md b/rust/docs/OpenInstancePageDto.md deleted file mode 100644 index 89fb2308..00000000 --- a/rust/docs/OpenInstancePageDto.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenInstancePageDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | 当前页码,从0开始计数 | [optional] -**size** | Option<**i32**> | 每页显示的记录数量 | [optional] -**total** | Option<**i64**> | 总记录数,符合查询条件的实例总数量 | [optional] -**instances** | Option<[**Vec**](OpenInstanceDTO.md)> | 当前页的实例列表,包含具体的实例数据 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenItemDiffDto.md b/rust/docs/OpenItemDiffDto.md deleted file mode 100644 index d6b6459a..00000000 --- a/rust/docs/OpenItemDiffDto.md +++ /dev/null @@ -1,14 +0,0 @@ -# OpenItemDiffDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | Option<**i32**> | 查找结果 | [optional] -**message** | Option<**String**> | 查找结果信息 | [optional] -**namespace** | Option<[**crate::models::OpenNamespaceIdentifier**](OpenNamespaceIdentifier.md)> | | [optional] -**create_items** | Option<[**Vec**](OpenItemDTO.md)> | | [optional] -**delete_items** | Option<[**Vec**](OpenItemDTO.md)> | | [optional] -**update_items** | Option<[**Vec**](OpenItemDTO.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenItemDto.md b/rust/docs/OpenItemDto.md deleted file mode 100644 index e818041e..00000000 --- a/rust/docs/OpenItemDto.md +++ /dev/null @@ -1,20 +0,0 @@ -# OpenItemDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**key** | Option<**String**> | 配置项的键名,在同一命名空间内唯一标识一个配置项 | [optional] -**value** | Option<**String**> | 配置项的值,可以是字符串、数字、JSON等格式 | [optional] -**r#type** | Option<**i32**> | 配置项类型 | [optional] -**comment** | Option<**String**> | 配置项的注释说明,用于描述配置项的用途和含义 | [optional] -**line_num** | Option<**i32**> | 配置项在命名空间中的行号,用于保持和旧版 Portal 配置项列表一致的默认展示顺序 | [optional] -**extend_info** | Option<[**crate::models::OpenItemExtendDto**](OpenItemExtendDTO.md)> | | [optional] -**data_change_created_by** | Option<**String**> | 配置项创建者用户名,记录是谁创建了这个配置项 | [optional] -**data_change_created_by_display_name** | Option<**String**> | 配置项创建者显示名称,用于展示创建者的友好名称 | [optional] -**data_change_last_modified_by** | 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] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenItemExtendDto.md b/rust/docs/OpenItemExtendDto.md deleted file mode 100644 index 92d25e3b..00000000 --- a/rust/docs/OpenItemExtendDto.md +++ /dev/null @@ -1,14 +0,0 @@ -# OpenItemExtendDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**namespace_id** | Option<**i64**> | 所属命名空间的ID | [optional] -**is_modified** | Option<**bool**> | 是否有未发布的修改 | [optional] -**is_deleted** | Option<**bool**> | 是否被标记为删除(未发布) | [optional] -**is_newly_added** | Option<**bool**> | 是否为新添加的配置项(未发布) | [optional] -**new_value** | Option<**String**> | 新的值 | [optional] -**old_value** | Option<**String**> | 上一次发布的值,用于对比变更 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenItemPageDto.md b/rust/docs/OpenItemPageDto.md deleted file mode 100644 index e17fa4d1..00000000 --- a/rust/docs/OpenItemPageDto.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenItemPageDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**page** | Option<**i32**> | 当前页码,从0开始计数 | [optional] -**size** | Option<**i32**> | 每页显示的记录数量 | [optional] -**total** | Option<**i64**> | 总记录数,符合查询条件的配置项总数量 | [optional] -**content** | Option<[**Vec**](OpenItemDTO.md)> | 当前页的配置项列表,包含具体的配置项数据 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenMissEnvDto.md b/rust/docs/OpenMissEnvDto.md deleted file mode 100644 index d4ee72d8..00000000 --- a/rust/docs/OpenMissEnvDto.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenMissEnvDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**code** | Option<**i32**> | 查询状态码 | [optional] -**message** | Option<**String**> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenNamespaceDto.md b/rust/docs/OpenNamespaceDto.md deleted file mode 100644 index 85ad2399..00000000 --- a/rust/docs/OpenNamespaceDto.md +++ /dev/null @@ -1,22 +0,0 @@ -# OpenNamespaceDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | 命名空间创建者用户名,记录是谁创建了这个命名空间 | [optional] -**data_change_created_by_display_name** | Option<**String**> | 命名空间创建者显示名称,用于展示创建者的友好名称 | [optional] -**data_change_last_modified_by** | 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] -**app_id** | Option<**String**> | 所属应用的唯一标识符 | [optional] -**cluster_name** | Option<**String**> | 所属集群的名称 | [optional] -**namespace_name** | Option<**String**> | 命名空间名称,在同一应用和集群下唯一标识一个命名空间 | [optional] -**comment** | Option<**String**> | 命名空间备注说明,描述命名空间的用途 | [optional] -**format** | Option<**String**> | 命名空间格式类型,如properties、xml、json、yml等 | [optional] -**is_public** | Option<**bool**> | 是否为公共命名空间,公共命名空间可以被其他应用关联使用 | [optional] -**items** | Option<[**Vec**](OpenItemDTO.md)> | 命名空间包含的配置项列表 | [optional] -**extend_info** | Option<[**crate::models::OpenNamespaceExtendDto**](OpenNamespaceExtendDTO.md)> | | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenNamespaceExtendDto.md b/rust/docs/OpenNamespaceExtendDto.md deleted file mode 100644 index 436af325..00000000 --- a/rust/docs/OpenNamespaceExtendDto.md +++ /dev/null @@ -1,11 +0,0 @@ -# OpenNamespaceExtendDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**is_config_hidden** | Option<**bool**> | 当当前用户无权限查看配置时置为 true | [optional] -**parent_app_id** | Option<**String**> | 公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转 | [optional] -**item_modified_cnt** | Option<**i32**> | 未发布变更数 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenNamespaceIdentifier.md b/rust/docs/OpenNamespaceIdentifier.md deleted file mode 100644 index 25cf4624..00000000 --- a/rust/docs/OpenNamespaceIdentifier.md +++ /dev/null @@ -1,12 +0,0 @@ -# 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 deleted file mode 100644 index 22a25732..00000000 --- a/rust/docs/OpenNamespaceLockDto.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenNamespaceLockDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**namespace_name** | Option<**String**> | 命名空间名称 | [optional] -**is_locked** | Option<**bool**> | 是否被锁定 | [optional] -**locked_by** | Option<**String**> | 锁定者用户名 | [optional] -**is_emergency_publish_allowed** | Option<**bool**> | 是否允许紧急发布 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenNamespaceRoleUserDto.md b/rust/docs/OpenNamespaceRoleUserDto.md deleted file mode 100644 index abd7992e..00000000 --- a/rust/docs/OpenNamespaceRoleUserDto.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenNamespaceRoleUserDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**app_id** | Option<**String**> | | [optional] -**namespace_name** | Option<**String**> | | [optional] -**modify_role_users** | Option<[**Vec**](OpenUserInfoDTO.md)> | | [optional] -**release_role_users** | Option<[**Vec**](OpenUserInfoDTO.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/OpenNamespaceSyncDto.md b/rust/docs/OpenNamespaceSyncDto.md deleted file mode 100644 index 03c9662c..00000000 --- a/rust/docs/OpenNamespaceSyncDto.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenNamespaceSyncDto - -## 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 deleted file mode 100644 index 7cce6861..00000000 --- a/rust/docs/OpenNamespaceTextModel.md +++ /dev/null @@ -1,16 +0,0 @@ -# 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/OpenNamespaceUsageDto.md b/rust/docs/OpenNamespaceUsageDto.md deleted file mode 100644 index 1bd9115d..00000000 --- a/rust/docs/OpenNamespaceUsageDto.md +++ /dev/null @@ -1,15 +0,0 @@ -# OpenNamespaceUsageDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**namespace_name** | Option<**String**> | 命名空间名称 | [optional] -**app_id** | Option<**String**> | 所属应用的唯一标识符 | [optional] -**cluster_name** | Option<**String**> | 所属集群名称 | [optional] -**env_name** | Option<**String**> | 环境名称 | [optional] -**instance_count** | Option<**i32**> | 该命名空间关联的实例数量 | [optional] -**branch_instance_count** | Option<**i32**> | 分支命名空间关联的实例数量 | [optional] -**linked_namespace_count** | Option<**i32**> | 关联到该公共命名空间的命名空间数量 | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenOrganizationDto.md b/rust/docs/OpenOrganizationDto.md deleted file mode 100644 index ebd911d9..00000000 --- a/rust/docs/OpenOrganizationDto.md +++ /dev/null @@ -1,10 +0,0 @@ -# OpenOrganizationDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**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/OpenPermissionConditionDto.md b/rust/docs/OpenPermissionConditionDto.md deleted file mode 100644 index 679645f1..00000000 --- a/rust/docs/OpenPermissionConditionDto.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenPermissionConditionDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**has_permission** | 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/OpenReleaseChangeDto.md b/rust/docs/OpenReleaseChangeDto.md deleted file mode 100644 index f164f1ea..00000000 --- a/rust/docs/OpenReleaseChangeDto.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenReleaseChangeDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**change_type** | Option<**String**> | 修改类型 | [optional] -**key** | Option<**String**> | key | [optional] -**new_value** | Option<**String**> | new value | [optional] -**old_value** | Option<**String**> | old value | [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/OpenReleaseDiffDto.md b/rust/docs/OpenReleaseDiffDto.md deleted file mode 100644 index 61a801f2..00000000 --- a/rust/docs/OpenReleaseDiffDto.md +++ /dev/null @@ -1,9 +0,0 @@ -# OpenReleaseDiffDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**changes** | Option<[**Vec**](OpenReleaseChangeDTO.md)> | A list of changes, ensuring order if necessary. | [optional] - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/rust/docs/OpenReleaseDto.md b/rust/docs/OpenReleaseDto.md deleted file mode 100644 index d55324c7..00000000 --- a/rust/docs/OpenReleaseDto.md +++ /dev/null @@ -1,21 +0,0 @@ -# OpenReleaseDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**data_change_created_by** | Option<**String**> | 发布创建者用户名,记录是谁创建了这次发布 | [optional] -**data_change_created_by_display_name** | Option<**String**> | 发布创建者显示名称,用于展示创建者的友好名称 | [optional] -**data_change_last_modified_by** | 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] -**id** | Option<**i64**> | 发布记录的唯一标识符,系统自动生成 | [optional] -**app_id** | Option<**String**> | 所属应用的唯一标识符 | [optional] -**cluster_name** | Option<**String**> | 所属集群的名称 | [optional] -**namespace_name** | Option<**String**> | 所属命名空间的名称 | [optional] -**name** | Option<**String**> | 发布名称,用于标识这次发布的版本或描述 | [optional] -**configurations** | Option<**::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/OpenUserDto.md b/rust/docs/OpenUserDto.md deleted file mode 100644 index 05e5fda9..00000000 --- a/rust/docs/OpenUserDto.md +++ /dev/null @@ -1,13 +0,0 @@ -# OpenUserDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**username** | Option<**String**> | 用户名 | [optional] -**user_display_name** | Option<**String**> | 用户显示名 | [optional] -**password** | Option<**String**> | 用户密码 | [optional] -**email** | Option<**String**> | 用户邮箱 | [optional] -**enabled** | Option<**i32**> | 是否启用,1 表示启用,0 表示禁用 | [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/OpenUserInfoDto.md b/rust/docs/OpenUserInfoDto.md deleted file mode 100644 index e164f699..00000000 --- a/rust/docs/OpenUserInfoDto.md +++ /dev/null @@ -1,12 +0,0 @@ -# OpenUserInfoDto - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**user_id** | Option<**String**> | | [optional] -**name** | Option<**String**> | | [optional] -**email** | Option<**String**> | | [optional] -**enabled** | 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/git_push.sh b/rust/git_push.sh deleted file mode 100644 index f53a75d4..00000000 --- a/rust/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/rust/src/apis/configuration.rs b/rust/src/apis/configuration.rs deleted file mode 100644 index 5a03bca2..00000000 --- a/rust/src/apis/configuration.rs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - -#[derive(Debug, Clone)] -pub struct Configuration { - pub base_path: String, - pub user_agent: Option, - pub client: reqwest::Client, - pub basic_auth: Option, - pub oauth_access_token: Option, - pub bearer_access_token: Option, - pub api_key: Option, - // TODO: take an oauth2 token source, similar to the go one -} - -pub type BasicAuth = (String, Option); - -#[derive(Debug, Clone)] -pub struct ApiKey { - pub prefix: Option, - pub key: String, -} - - -impl Configuration { - pub fn new() -> Configuration { - Configuration::default() - } -} - -impl Default for Configuration { - fn default() -> Self { - Configuration { - base_path: "http://localhost".to_owned(), - user_agent: Some("OpenAPI-Generator/0.3.8/rust".to_owned()), - client: reqwest::Client::new(), - basic_auth: None, - oauth_access_token: None, - bearer_access_token: None, - api_key: None, - - } - } -} diff --git a/rust/src/apis/mod.rs b/rust/src/apis/mod.rs deleted file mode 100644 index dccbc940..00000000 --- a/rust/src/apis/mod.rs +++ /dev/null @@ -1,94 +0,0 @@ -use std::error; -use std::fmt; - -#[derive(Debug, Clone)] -pub struct ResponseContent { - pub status: reqwest::StatusCode, - pub content: String, - pub entity: Option, -} - -#[derive(Debug)] -pub enum Error { - Reqwest(reqwest::Error), - Serde(serde_json::Error), - Io(std::io::Error), - ResponseError(ResponseContent), -} - -impl fmt::Display for Error { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let (module, e) = match self { - Error::Reqwest(e) => ("reqwest", e.to_string()), - Error::Serde(e) => ("serde", e.to_string()), - Error::Io(e) => ("IO", e.to_string()), - Error::ResponseError(e) => ("response", format!("status code {}", e.status)), - }; - write!(f, "error in {}: {}", module, e) - } -} - -impl error::Error for Error { - fn source(&self) -> Option<&(dyn error::Error + 'static)> { - Some(match self { - Error::Reqwest(e) => e, - Error::Serde(e) => e, - Error::Io(e) => e, - Error::ResponseError(_) => return None, - }) - } -} - -impl From for Error { - fn from(e: reqwest::Error) -> Self { - Error::Reqwest(e) - } -} - -impl From for Error { - fn from(e: serde_json::Error) -> Self { - Error::Serde(e) - } -} - -impl From for Error { - fn from(e: std::io::Error) -> Self { - Error::Io(e) - } -} - -pub fn urlencode>(s: T) -> String { - ::url::form_urlencoded::byte_serialize(s.as_ref().as_bytes()).collect() -} - -pub fn parse_deep_object(prefix: &str, value: &serde_json::Value) -> Vec<(String, String)> { - if let serde_json::Value::Object(object) = value { - let mut params = vec![]; - - for (key, value) in object { - match value { - serde_json::Value::Object(_) => params.append(&mut parse_deep_object( - &format!("{}[{}]", prefix, key), - value, - )), - serde_json::Value::Array(array) => { - for (i, value) in array.iter().enumerate() { - params.append(&mut parse_deep_object( - &format!("{}[{}][{}]", prefix, key, i), - value, - )); - } - }, - serde_json::Value::String(s) => params.push((format!("{}[{}]", prefix, key), s.clone())), - _ => params.push((format!("{}[{}]", prefix, key), value.to_string())), - } - } - - return params; - } - - unimplemented!("Only objects are supported with style=deepObject") -} - - -pub mod configuration; diff --git a/rust/src/lib.rs b/rust/src/lib.rs deleted file mode 100644 index c1dd666f..00000000 --- a/rust/src/lib.rs +++ /dev/null @@ -1,10 +0,0 @@ -#[macro_use] -extern crate serde_derive; - -extern crate serde; -extern crate serde_json; -extern crate url; -extern crate reqwest; - -pub mod apis; -pub mod models; diff --git a/rust/src/models/exception_response.rs b/rust/src/models/exception_response.rs deleted file mode 100644 index aa79108e..00000000 --- a/rust/src/models/exception_response.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct ExceptionResponse { - /// HTTP 状态码 - #[serde(rename = "status", skip_serializing_if = "Option::is_none")] - pub status: Option, - /// 错误信息 - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - /// 时间戳 - #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")] - pub timestamp: Option, - /// 错误类名 - #[serde(rename = "exception", skip_serializing_if = "Option::is_none")] - pub exception: Option, -} - -impl ExceptionResponse { - pub fn new() -> ExceptionResponse { - ExceptionResponse { - status: None, - message: None, - timestamp: None, - exception: None, - } - } -} diff --git a/rust/src/models/mod.rs b/rust/src/models/mod.rs deleted file mode 100644 index 2e9e710a..00000000 --- a/rust/src/models/mod.rs +++ /dev/null @@ -1,78 +0,0 @@ -pub mod exception_response; -pub use self::exception_response::ExceptionResponse; -pub mod namespace_gray_del_release_dto; -pub use self::namespace_gray_del_release_dto::NamespaceGrayDelReleaseDto; -pub mod namespace_release_dto; -pub use self::namespace_release_dto::NamespaceReleaseDto; -pub mod open_access_key_dto; -pub use self::open_access_key_dto::OpenAccessKeyDto; -pub mod open_app_dto; -pub use self::open_app_dto::OpenAppDto; -pub mod open_app_namespace_dto; -pub use self::open_app_namespace_dto::OpenAppNamespaceDto; -pub mod open_app_role_user_dto; -pub use self::open_app_role_user_dto::OpenAppRoleUserDto; -pub mod open_cluster_dto; -pub use self::open_cluster_dto::OpenClusterDto; -pub mod open_cluster_namespace_role_user_dto; -pub use self::open_cluster_namespace_role_user_dto::OpenClusterNamespaceRoleUserDto; -pub mod open_create_app_dto; -pub use self::open_create_app_dto::OpenCreateAppDto; -pub mod open_create_namespace_dto; -pub use self::open_create_namespace_dto::OpenCreateNamespaceDto; -pub mod open_env_cluster_dto; -pub use self::open_env_cluster_dto::OpenEnvClusterDto; -pub mod open_env_cluster_info; -pub use self::open_env_cluster_info::OpenEnvClusterInfo; -pub mod open_env_namespace_role_user_dto; -pub use self::open_env_namespace_role_user_dto::OpenEnvNamespaceRoleUserDto; -pub mod open_gray_release_rule_dto; -pub use self::open_gray_release_rule_dto::OpenGrayReleaseRuleDto; -pub mod open_gray_release_rule_item_dto; -pub use self::open_gray_release_rule_item_dto::OpenGrayReleaseRuleItemDto; -pub mod open_instance_config_dto; -pub use self::open_instance_config_dto::OpenInstanceConfigDto; -pub mod open_instance_dto; -pub use self::open_instance_dto::OpenInstanceDto; -pub mod open_instance_page_dto; -pub use self::open_instance_page_dto::OpenInstancePageDto; -pub mod open_item_diff_dto; -pub use self::open_item_diff_dto::OpenItemDiffDto; -pub mod open_item_dto; -pub use self::open_item_dto::OpenItemDto; -pub mod open_item_extend_dto; -pub use self::open_item_extend_dto::OpenItemExtendDto; -pub mod open_item_page_dto; -pub use self::open_item_page_dto::OpenItemPageDto; -pub mod open_miss_env_dto; -pub use self::open_miss_env_dto::OpenMissEnvDto; -pub mod open_namespace_dto; -pub use self::open_namespace_dto::OpenNamespaceDto; -pub mod open_namespace_extend_dto; -pub use self::open_namespace_extend_dto::OpenNamespaceExtendDto; -pub mod open_namespace_identifier; -pub use self::open_namespace_identifier::OpenNamespaceIdentifier; -pub mod open_namespace_lock_dto; -pub use self::open_namespace_lock_dto::OpenNamespaceLockDto; -pub mod open_namespace_role_user_dto; -pub use self::open_namespace_role_user_dto::OpenNamespaceRoleUserDto; -pub mod open_namespace_sync_dto; -pub use self::open_namespace_sync_dto::OpenNamespaceSyncDto; -pub mod open_namespace_text_model; -pub use self::open_namespace_text_model::OpenNamespaceTextModel; -pub mod open_namespace_usage_dto; -pub use self::open_namespace_usage_dto::OpenNamespaceUsageDto; -pub mod open_organization_dto; -pub use self::open_organization_dto::OpenOrganizationDto; -pub mod open_permission_condition_dto; -pub use self::open_permission_condition_dto::OpenPermissionConditionDto; -pub mod open_release_change_dto; -pub use self::open_release_change_dto::OpenReleaseChangeDto; -pub mod open_release_diff_dto; -pub use self::open_release_diff_dto::OpenReleaseDiffDto; -pub mod open_release_dto; -pub use self::open_release_dto::OpenReleaseDto; -pub mod open_user_dto; -pub use self::open_user_dto::OpenUserDto; -pub mod open_user_info_dto; -pub use self::open_user_info_dto::OpenUserInfoDto; diff --git a/rust/src/models/namespace_gray_del_release_dto.rs b/rust/src/models/namespace_gray_del_release_dto.rs deleted file mode 100644 index 10e85da8..00000000 --- a/rust/src/models/namespace_gray_del_release_dto.rs +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - -/// NamespaceGrayDelReleaseDto : 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct NamespaceGrayDelReleaseDto { - /// 发布标题,用于标识这次灰度删除发布的名称或版本号 - #[serde(rename = "releaseTitle", skip_serializing_if = "Option::is_none")] - pub release_title: Option, - /// 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 - #[serde(rename = "releaseComment", skip_serializing_if = "Option::is_none")] - pub release_comment: Option, - /// 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 - #[serde(rename = "releasedBy", skip_serializing_if = "Option::is_none")] - pub released_by: Option, - /// 是否为紧急发布,紧急发布可能会跳过某些审核流程 - #[serde(rename = "isEmergencyPublish", skip_serializing_if = "Option::is_none")] - pub is_emergency_publish: Option, - /// 需要在灰度发布中删除的配置项键名列表 - #[serde(rename = "grayDelKeys", skip_serializing_if = "Option::is_none")] - pub gray_del_keys: Option>, -} - -impl NamespaceGrayDelReleaseDto { - /// 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 - pub fn new() -> NamespaceGrayDelReleaseDto { - NamespaceGrayDelReleaseDto { - release_title: None, - release_comment: None, - released_by: None, - is_emergency_publish: None, - gray_del_keys: None, - } - } -} diff --git a/rust/src/models/namespace_release_dto.rs b/rust/src/models/namespace_release_dto.rs deleted file mode 100644 index 8f15a3f0..00000000 --- a/rust/src/models/namespace_release_dto.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - -/// NamespaceReleaseDto : 命名空间发布请求数据传输对象,用于创建新的配置发布 - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct NamespaceReleaseDto { - /// 发布标题,用于标识这次发布的名称或版本号 - #[serde(rename = "releaseTitle", skip_serializing_if = "Option::is_none")] - pub release_title: Option, - /// 发布备注,详细描述本次发布的变更内容和目的 - #[serde(rename = "releaseComment", skip_serializing_if = "Option::is_none")] - pub release_comment: Option, - /// 发布操作者用户名,记录是谁执行了这次发布操作 - #[serde(rename = "releasedBy", skip_serializing_if = "Option::is_none")] - pub released_by: Option, - /// 是否为紧急发布,紧急发布可能会跳过某些审核流程 - #[serde(rename = "isEmergencyPublish", skip_serializing_if = "Option::is_none")] - pub is_emergency_publish: Option, -} - -impl NamespaceReleaseDto { - /// 命名空间发布请求数据传输对象,用于创建新的配置发布 - pub fn new() -> NamespaceReleaseDto { - NamespaceReleaseDto { - release_title: None, - release_comment: None, - released_by: None, - is_emergency_publish: None, - } - } -} diff --git a/rust/src/models/open_access_key_dto.rs b/rust/src/models/open_access_key_dto.rs deleted file mode 100644 index 5f82ba70..00000000 --- a/rust/src/models/open_access_key_dto.rs +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenAccessKeyDto { - /// - #[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 = "secret", skip_serializing_if = "Option::is_none")] - pub secret: Option, - /// - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// - #[serde(rename = "mode", skip_serializing_if = "Option::is_none")] - pub mode: Option, - /// - #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")] - pub enabled: Option, -} - -impl OpenAccessKeyDto { - pub fn new() -> OpenAccessKeyDto { - OpenAccessKeyDto { - 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, - secret: None, - app_id: None, - mode: None, - enabled: None, - } - } -} diff --git a/rust/src/models/open_app_dto.rs b/rust/src/models/open_app_dto.rs deleted file mode 100644 index ffad5342..00000000 --- a/rust/src/models/open_app_dto.rs +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - -/// OpenAppDto : Apollo应用信息数据传输对象,包含应用的基本信息和元数据 - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenAppDto { - /// 数据创建者用户名,记录是谁创建了这个应用 - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// 数据创建者显示名称,用于展示创建者的友好名称 - #[serde(rename = "dataChangeCreatedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_created_by_display_name: Option, - /// 数据最后修改者用户名,记录最后一次修改应用信息的用户 - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: 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 = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// 应用唯一标识符,全局唯一的应用ID - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// 组织ID,应用所属组织的唯一标识 - #[serde(rename = "orgId", skip_serializing_if = "Option::is_none")] - pub org_id: Option, - /// 组织名称,应用所属组织的显示名称 - #[serde(rename = "orgName", skip_serializing_if = "Option::is_none")] - pub org_name: Option, - /// 应用负责人姓名,应用的主要负责人 - #[serde(rename = "ownerName", skip_serializing_if = "Option::is_none")] - pub owner_name: Option, - /// 应用负责人邮箱地址,用于接收应用相关通知 - #[serde(rename = "ownerEmail", skip_serializing_if = "Option::is_none")] - pub owner_email: Option, - #[serde(rename = "ownerDisplayName", skip_serializing_if = "Option::is_none")] - pub owner_display_name: Option, -} - -impl OpenAppDto { - /// Apollo应用信息数据传输对象,包含应用的基本信息和元数据 - pub fn new() -> OpenAppDto { - OpenAppDto { - data_change_created_by: None, - data_change_created_by_display_name: None, - data_change_last_modified_by: None, - data_change_last_modified_by_display_name: None, - data_change_created_time: None, - data_change_last_modified_time: None, - name: None, - app_id: None, - org_id: None, - org_name: None, - owner_name: None, - owner_email: None, - owner_display_name: None, - } - } -} diff --git a/rust/src/models/open_app_namespace_dto.rs b/rust/src/models/open_app_namespace_dto.rs deleted file mode 100644 index a6445788..00000000 --- a/rust/src/models/open_app_namespace_dto.rs +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - -/// OpenAppNamespaceDto : Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenAppNamespaceDto { - /// 命名空间创建者用户名,记录是谁创建了这个应用命名空间 - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// 命名空间创建者显示名称,用于展示创建者的友好名称 - #[serde(rename = "dataChangeCreatedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_created_by_display_name: Option, - /// 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: 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 = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// 所属应用的唯一标识符 - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// 命名空间格式类型,如properties、xml、json、yml等 - #[serde(rename = "format", skip_serializing_if = "Option::is_none")] - pub format: Option, - /// 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - #[serde(rename = "isPublic", skip_serializing_if = "Option::is_none")] - pub is_public: Option, - /// 对于公共命名空间,是否在命名空间名称前添加前缀 - #[serde(rename = "appendNamespacePrefix", skip_serializing_if = "Option::is_none")] - pub append_namespace_prefix: Option, - /// 命名空间备注说明,描述命名空间的用途和包含的配置类型 - #[serde(rename = "comment", skip_serializing_if = "Option::is_none")] - pub comment: Option, -} - -impl OpenAppNamespaceDto { - /// Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 - pub fn new() -> OpenAppNamespaceDto { - OpenAppNamespaceDto { - data_change_created_by: None, - data_change_created_by_display_name: None, - data_change_last_modified_by: None, - data_change_last_modified_by_display_name: None, - data_change_created_time: None, - data_change_last_modified_time: None, - name: None, - app_id: None, - format: None, - is_public: None, - append_namespace_prefix: None, - comment: None, - } - } -} diff --git a/rust/src/models/open_app_role_user_dto.rs b/rust/src/models/open_app_role_user_dto.rs deleted file mode 100644 index 41c25d01..00000000 --- a/rust/src/models/open_app_role_user_dto.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenAppRoleUserDto { - /// - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// - #[serde(rename = "masterUsers", skip_serializing_if = "Option::is_none")] - pub master_users: Option>, -} - -impl OpenAppRoleUserDto { - pub fn new() -> OpenAppRoleUserDto { - OpenAppRoleUserDto { - app_id: None, - master_users: None, - } - } -} diff --git a/rust/src/models/open_cluster_dto.rs b/rust/src/models/open_cluster_dto.rs deleted file mode 100644 index 08911477..00000000 --- a/rust/src/models/open_cluster_dto.rs +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - -/// OpenClusterDto : Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenClusterDto { - /// 集群创建者用户名,记录是谁创建了这个集群 - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// 集群创建者显示名称,用于展示创建者的友好名称 - #[serde(rename = "dataChangeCreatedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_created_by_display_name: Option, - /// 集群最后修改者用户名,记录最后一次修改集群信息的用户 - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: 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 = "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 = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - /// 父集群的ID - #[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 OpenClusterDto { - /// Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 - pub fn new() -> OpenClusterDto { - OpenClusterDto { - data_change_created_by: None, - data_change_created_by_display_name: None, - data_change_last_modified_by: None, - data_change_last_modified_by_display_name: None, - data_change_created_time: None, - data_change_last_modified_time: None, - name: None, - app_id: None, - id: None, - parent_cluster_id: None, - comment: None, - } - } -} diff --git a/rust/src/models/open_cluster_namespace_role_user_dto.rs b/rust/src/models/open_cluster_namespace_role_user_dto.rs deleted file mode 100644 index bad8cfcf..00000000 --- a/rust/src/models/open_cluster_namespace_role_user_dto.rs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenClusterNamespaceRoleUserDto { - /// - #[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 = "cluster", skip_serializing_if = "Option::is_none")] - pub cluster: Option, - /// - #[serde(rename = "modifyRoleUsers", skip_serializing_if = "Option::is_none")] - pub modify_role_users: Option>, - /// - #[serde(rename = "releaseRoleUsers", skip_serializing_if = "Option::is_none")] - pub release_role_users: Option>, -} - -impl OpenClusterNamespaceRoleUserDto { - pub fn new() -> OpenClusterNamespaceRoleUserDto { - OpenClusterNamespaceRoleUserDto { - app_id: None, - env: None, - cluster: None, - modify_role_users: None, - release_role_users: None, - } - } -} diff --git a/rust/src/models/open_create_app_dto.rs b/rust/src/models/open_create_app_dto.rs deleted file mode 100644 index 115dd623..00000000 --- a/rust/src/models/open_create_app_dto.rs +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - -/// OpenCreateAppDto : 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenCreateAppDto { - /// 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 - #[serde(rename = "assignAppRoleToSelf", skip_serializing_if = "Option::is_none")] - pub assign_app_role_to_self: Option, - /// 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 - #[serde(rename = "admins", skip_serializing_if = "Option::is_none")] - pub admins: Option>, - #[serde(rename = "app", skip_serializing_if = "Option::is_none")] - pub app: Option>, -} - -impl OpenCreateAppDto { - /// 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 - pub fn new() -> OpenCreateAppDto { - OpenCreateAppDto { - assign_app_role_to_self: None, - admins: None, - app: None, - } - } -} diff --git a/rust/src/models/open_create_namespace_dto.rs b/rust/src/models/open_create_namespace_dto.rs deleted file mode 100644 index c62d79ae..00000000 --- a/rust/src/models/open_create_namespace_dto.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - -/// OpenCreateNamespaceDto : Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenCreateNamespaceDto { - /// 所属应用的唯一标识符 - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// 所在那个环境创建 - #[serde(rename = "env", skip_serializing_if = "Option::is_none")] - pub env: Option, - /// 所属集群的名称 - #[serde(rename = "clusterName", skip_serializing_if = "Option::is_none")] - pub cluster_name: Option, - /// 根据已创建的appnamespace来实例化namespace - #[serde(rename = "appNamespaceName", skip_serializing_if = "Option::is_none")] - pub app_namespace_name: Option, -} - -impl OpenCreateNamespaceDto { - /// Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - pub fn new() -> OpenCreateNamespaceDto { - OpenCreateNamespaceDto { - app_id: None, - env: None, - cluster_name: None, - app_namespace_name: None, - } - } -} diff --git a/rust/src/models/open_env_cluster_dto.rs b/rust/src/models/open_env_cluster_dto.rs deleted file mode 100644 index 4b18a0cd..00000000 --- a/rust/src/models/open_env_cluster_dto.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[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>, -} - -impl OpenEnvClusterDto { - pub fn new() -> OpenEnvClusterDto { - OpenEnvClusterDto { - env: None, - clusters: None, - } - } -} diff --git a/rust/src/models/open_env_cluster_info.rs b/rust/src/models/open_env_cluster_info.rs deleted file mode 100644 index e4937019..00000000 --- a/rust/src/models/open_env_cluster_info.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenEnvClusterInfo { - /// 查询状态码 - #[serde(rename = "code", skip_serializing_if = "Option::is_none")] - pub code: Option, - /// 相关信息 - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - /// 环境标识 - #[serde(rename = "env", skip_serializing_if = "Option::is_none")] - pub env: Option, - /// 集群信息列表 - #[serde(rename = "clusters", skip_serializing_if = "Option::is_none")] - pub clusters: Option>, -} - -impl OpenEnvClusterInfo { - pub fn new() -> OpenEnvClusterInfo { - OpenEnvClusterInfo { - code: None, - message: None, - env: None, - clusters: None, - } - } -} diff --git a/rust/src/models/open_env_namespace_role_user_dto.rs b/rust/src/models/open_env_namespace_role_user_dto.rs deleted file mode 100644 index 69b1b8cd..00000000 --- a/rust/src/models/open_env_namespace_role_user_dto.rs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenEnvNamespaceRoleUserDto { - /// - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// - #[serde(rename = "namespaceName", skip_serializing_if = "Option::is_none")] - pub namespace_name: Option, - /// - #[serde(rename = "modifyRoleUsers", skip_serializing_if = "Option::is_none")] - pub modify_role_users: Option>, - /// - #[serde(rename = "releaseRoleUsers", skip_serializing_if = "Option::is_none")] - pub release_role_users: Option>, - /// - #[serde(rename = "env", skip_serializing_if = "Option::is_none")] - pub env: Option, -} - -impl OpenEnvNamespaceRoleUserDto { - pub fn new() -> OpenEnvNamespaceRoleUserDto { - OpenEnvNamespaceRoleUserDto { - app_id: None, - namespace_name: None, - modify_role_users: None, - release_role_users: None, - env: None, - } - } -} diff --git a/rust/src/models/open_gray_release_rule_dto.rs b/rust/src/models/open_gray_release_rule_dto.rs deleted file mode 100644 index c724b060..00000000 --- a/rust/src/models/open_gray_release_rule_dto.rs +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - -/// OpenGrayReleaseRuleDto : Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenGrayReleaseRuleDto { - /// 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// 灰度规则创建者显示名称,用于展示创建者的友好名称 - #[serde(rename = "dataChangeCreatedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_created_by_display_name: Option, - /// 灰度规则最后修改者用户名,记录最后一次修改规则的用户 - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: 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 = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// 所属集群的名称 - #[serde(rename = "clusterName", skip_serializing_if = "Option::is_none")] - pub cluster_name: Option, - /// 所属命名空间的名称 - #[serde(rename = "namespaceName", skip_serializing_if = "Option::is_none")] - pub namespace_name: Option, - /// 灰度分支名称,标识灰度发布的分支 - #[serde(rename = "branchName", skip_serializing_if = "Option::is_none")] - pub branch_name: Option, - /// 灰度发布规则项列表,包含具体的灰度规则条件 - #[serde(rename = "ruleItems", skip_serializing_if = "Option::is_none")] - pub rule_items: Option>, -} - -impl OpenGrayReleaseRuleDto { - /// Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 - pub fn new() -> OpenGrayReleaseRuleDto { - OpenGrayReleaseRuleDto { - data_change_created_by: None, - data_change_created_by_display_name: None, - data_change_last_modified_by: None, - data_change_last_modified_by_display_name: None, - data_change_created_time: None, - data_change_last_modified_time: None, - app_id: None, - cluster_name: None, - namespace_name: None, - branch_name: None, - rule_items: None, - } - } -} diff --git a/rust/src/models/open_gray_release_rule_item_dto.rs b/rust/src/models/open_gray_release_rule_item_dto.rs deleted file mode 100644 index 119bdaf3..00000000 --- a/rust/src/models/open_gray_release_rule_item_dto.rs +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - -/// OpenGrayReleaseRuleItemDto : Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenGrayReleaseRuleItemDto { - /// 客户端应用ID,指定哪个应用可以获取灰度配置 - #[serde(rename = "clientAppId", skip_serializing_if = "Option::is_none")] - pub client_app_id: Option, - /// 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 - #[serde(rename = "clientIpList", skip_serializing_if = "Option::is_none")] - pub client_ip_list: Option>, - /// 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 - #[serde(rename = "clientLabelList", skip_serializing_if = "Option::is_none")] - pub client_label_list: Option>, -} - -impl OpenGrayReleaseRuleItemDto { - /// Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 - pub fn new() -> OpenGrayReleaseRuleItemDto { - OpenGrayReleaseRuleItemDto { - client_app_id: None, - client_ip_list: None, - client_label_list: None, - } - } -} diff --git a/rust/src/models/open_instance_config_dto.rs b/rust/src/models/open_instance_config_dto.rs deleted file mode 100644 index 306d17b4..00000000 --- a/rust/src/models/open_instance_config_dto.rs +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenInstanceConfigDto { - #[serde(rename = "release", skip_serializing_if = "Option::is_none")] - 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, -} - -impl OpenInstanceConfigDto { - pub fn new() -> OpenInstanceConfigDto { - OpenInstanceConfigDto { - release: None, - release_delivery_time: None, - data_change_last_modified_time: None, - } - } -} diff --git a/rust/src/models/open_instance_dto.rs b/rust/src/models/open_instance_dto.rs deleted file mode 100644 index cbaf2bfe..00000000 --- a/rust/src/models/open_instance_dto.rs +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[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>, - /// 数据创建时间(ISO 8601) - #[serde(rename = "dataChangeCreatedTime", skip_serializing_if = "Option::is_none")] - pub data_change_created_time: Option, -} - -impl OpenInstanceDto { - pub fn new() -> OpenInstanceDto { - OpenInstanceDto { - id: None, - app_id: None, - cluster_name: None, - data_center: None, - ip: None, - configs: None, - data_change_created_time: None, - } - } -} diff --git a/rust/src/models/open_instance_page_dto.rs b/rust/src/models/open_instance_page_dto.rs deleted file mode 100644 index 47b15100..00000000 --- a/rust/src/models/open_instance_page_dto.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - -/// OpenInstancePageDto : 分页实例数据传输对象,用于返回分页查询的实例列表结果 - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenInstancePageDto { - /// 当前页码,从0开始计数 - #[serde(rename = "page", skip_serializing_if = "Option::is_none")] - pub page: Option, - /// 每页显示的记录数量 - #[serde(rename = "size", skip_serializing_if = "Option::is_none")] - pub size: Option, - /// 总记录数,符合查询条件的实例总数量 - #[serde(rename = "total", skip_serializing_if = "Option::is_none")] - pub total: Option, - /// 当前页的实例列表,包含具体的实例数据 - #[serde(rename = "instances", skip_serializing_if = "Option::is_none")] - pub instances: Option>, -} - -impl OpenInstancePageDto { - /// 分页实例数据传输对象,用于返回分页查询的实例列表结果 - pub fn new() -> OpenInstancePageDto { - OpenInstancePageDto { - page: None, - size: None, - total: None, - instances: None, - } - } -} diff --git a/rust/src/models/open_item_diff_dto.rs b/rust/src/models/open_item_diff_dto.rs deleted file mode 100644 index 709a75ca..00000000 --- a/rust/src/models/open_item_diff_dto.rs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenItemDiffDto { - /// 查找结果 - #[serde(rename = "code", skip_serializing_if = "Option::is_none")] - pub code: Option, - /// 查找结果信息 - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, - #[serde(rename = "namespace", skip_serializing_if = "Option::is_none")] - pub namespace: Option>, - #[serde(rename = "createItems", skip_serializing_if = "Option::is_none")] - pub create_items: Option>, - #[serde(rename = "deleteItems", skip_serializing_if = "Option::is_none")] - pub delete_items: Option>, - #[serde(rename = "updateItems", skip_serializing_if = "Option::is_none")] - pub update_items: Option>, -} - -impl OpenItemDiffDto { - pub fn new() -> OpenItemDiffDto { - OpenItemDiffDto { - code: None, - message: None, - namespace: None, - create_items: None, - delete_items: None, - update_items: None, - } - } -} diff --git a/rust/src/models/open_item_dto.rs b/rust/src/models/open_item_dto.rs deleted file mode 100644 index c6ff3e05..00000000 --- a/rust/src/models/open_item_dto.rs +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - -/// OpenItemDto : Apollo配置项核心数据对象,仅包含键值及基础审计信息 - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenItemDto { - /// 配置项的键名,在同一命名空间内唯一标识一个配置项 - #[serde(rename = "key", skip_serializing_if = "Option::is_none")] - pub key: Option, - /// 配置项的值,可以是字符串、数字、JSON等格式 - #[serde(rename = "value", skip_serializing_if = "Option::is_none")] - pub value: Option, - /// 配置项类型 - #[serde(rename = "type", skip_serializing_if = "Option::is_none")] - pub r#type: Option, - /// 配置项的注释说明,用于描述配置项的用途和含义 - #[serde(rename = "comment", skip_serializing_if = "Option::is_none")] - pub comment: Option, - /// 配置项在命名空间中的行号,用于保持和旧版 Portal 配置项列表一致的默认展示顺序 - #[serde(rename = "lineNum", skip_serializing_if = "Option::is_none")] - pub line_num: Option, - #[serde(rename = "extendInfo", skip_serializing_if = "Option::is_none")] - pub extend_info: Option>, - /// 配置项创建者用户名,记录是谁创建了这个配置项 - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// 配置项创建者显示名称,用于展示创建者的友好名称 - #[serde(rename = "dataChangeCreatedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_created_by_display_name: Option, - /// 配置项最后修改者用户名,记录最后一次修改配置的用户 - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: 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, -} - -impl OpenItemDto { - /// Apollo配置项核心数据对象,仅包含键值及基础审计信息 - pub fn new() -> OpenItemDto { - OpenItemDto { - key: None, - value: None, - r#type: None, - comment: None, - line_num: None, - extend_info: None, - data_change_created_by: None, - data_change_created_by_display_name: None, - data_change_last_modified_by: None, - data_change_last_modified_by_display_name: None, - data_change_created_time: None, - data_change_last_modified_time: None, - } - } -} diff --git a/rust/src/models/open_item_extend_dto.rs b/rust/src/models/open_item_extend_dto.rs deleted file mode 100644 index 8f71e877..00000000 --- a/rust/src/models/open_item_extend_dto.rs +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - -/// OpenItemExtendDto : Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenItemExtendDto { - /// 所属命名空间的ID - #[serde(rename = "namespaceId", skip_serializing_if = "Option::is_none")] - pub namespace_id: Option, - /// 是否有未发布的修改 - #[serde(rename = "isModified", skip_serializing_if = "Option::is_none")] - pub is_modified: Option, - /// 是否被标记为删除(未发布) - #[serde(rename = "isDeleted", skip_serializing_if = "Option::is_none")] - pub is_deleted: Option, - /// 是否为新添加的配置项(未发布) - #[serde(rename = "isNewlyAdded", skip_serializing_if = "Option::is_none")] - pub is_newly_added: Option, - /// 新的值 - #[serde(rename = "newValue", skip_serializing_if = "Option::is_none")] - pub new_value: Option, - /// 上一次发布的值,用于对比变更 - #[serde(rename = "oldValue", skip_serializing_if = "Option::is_none")] - pub old_value: Option, -} - -impl OpenItemExtendDto { - /// Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 - pub fn new() -> OpenItemExtendDto { - OpenItemExtendDto { - namespace_id: None, - is_modified: None, - is_deleted: None, - is_newly_added: None, - new_value: None, - old_value: None, - } - } -} diff --git a/rust/src/models/open_item_page_dto.rs b/rust/src/models/open_item_page_dto.rs deleted file mode 100644 index 6f37ecca..00000000 --- a/rust/src/models/open_item_page_dto.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - -/// OpenItemPageDto : 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenItemPageDto { - /// 当前页码,从0开始计数 - #[serde(rename = "page", skip_serializing_if = "Option::is_none")] - pub page: Option, - /// 每页显示的记录数量 - #[serde(rename = "size", skip_serializing_if = "Option::is_none")] - pub size: Option, - /// 总记录数,符合查询条件的配置项总数量 - #[serde(rename = "total", skip_serializing_if = "Option::is_none")] - pub total: Option, - /// 当前页的配置项列表,包含具体的配置项数据 - #[serde(rename = "content", skip_serializing_if = "Option::is_none")] - pub content: Option>, -} - -impl OpenItemPageDto { - /// 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 - pub fn new() -> OpenItemPageDto { - OpenItemPageDto { - page: None, - size: None, - total: None, - content: None, - } - } -} diff --git a/rust/src/models/open_miss_env_dto.rs b/rust/src/models/open_miss_env_dto.rs deleted file mode 100644 index e6e03744..00000000 --- a/rust/src/models/open_miss_env_dto.rs +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenMissEnvDto { - /// 查询状态码 - #[serde(rename = "code", skip_serializing_if = "Option::is_none")] - pub code: Option, - #[serde(rename = "message", skip_serializing_if = "Option::is_none")] - pub message: Option, -} - -impl OpenMissEnvDto { - pub fn new() -> OpenMissEnvDto { - OpenMissEnvDto { - code: None, - message: None, - } - } -} diff --git a/rust/src/models/open_namespace_dto.rs b/rust/src/models/open_namespace_dto.rs deleted file mode 100644 index dcd12ff2..00000000 --- a/rust/src/models/open_namespace_dto.rs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - -/// OpenNamespaceDto : Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenNamespaceDto { - /// 命名空间创建者用户名,记录是谁创建了这个命名空间 - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// 命名空间创建者显示名称,用于展示创建者的友好名称 - #[serde(rename = "dataChangeCreatedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_created_by_display_name: Option, - /// 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: 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 = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// 所属集群的名称 - #[serde(rename = "clusterName", skip_serializing_if = "Option::is_none")] - pub cluster_name: Option, - /// 命名空间名称,在同一应用和集群下唯一标识一个命名空间 - #[serde(rename = "namespaceName", skip_serializing_if = "Option::is_none")] - pub namespace_name: Option, - /// 命名空间备注说明,描述命名空间的用途 - #[serde(rename = "comment", skip_serializing_if = "Option::is_none")] - pub comment: Option, - /// 命名空间格式类型,如properties、xml、json、yml等 - #[serde(rename = "format", skip_serializing_if = "Option::is_none")] - pub format: Option, - /// 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - #[serde(rename = "isPublic", skip_serializing_if = "Option::is_none")] - pub is_public: Option, - /// 命名空间包含的配置项列表 - #[serde(rename = "items", skip_serializing_if = "Option::is_none")] - pub items: Option>, - #[serde(rename = "extendInfo", skip_serializing_if = "Option::is_none")] - pub extend_info: Option>, -} - -impl OpenNamespaceDto { - /// Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - pub fn new() -> OpenNamespaceDto { - OpenNamespaceDto { - data_change_created_by: None, - data_change_created_by_display_name: None, - data_change_last_modified_by: None, - data_change_last_modified_by_display_name: None, - data_change_created_time: None, - data_change_last_modified_time: None, - app_id: None, - cluster_name: None, - namespace_name: None, - comment: None, - format: None, - is_public: None, - items: None, - extend_info: None, - } - } -} diff --git a/rust/src/models/open_namespace_extend_dto.rs b/rust/src/models/open_namespace_extend_dto.rs deleted file mode 100644 index a1c4fce8..00000000 --- a/rust/src/models/open_namespace_extend_dto.rs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenNamespaceExtendDto { - /// 当当前用户无权限查看配置时置为 true - #[serde(rename = "isConfigHidden", skip_serializing_if = "Option::is_none")] - pub is_config_hidden: Option, - /// 公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转 - #[serde(rename = "parentAppId", skip_serializing_if = "Option::is_none")] - pub parent_app_id: Option, - /// 未发布变更数 - #[serde(rename = "itemModifiedCnt", skip_serializing_if = "Option::is_none")] - pub item_modified_cnt: Option, -} - -impl OpenNamespaceExtendDto { - pub fn new() -> OpenNamespaceExtendDto { - OpenNamespaceExtendDto { - is_config_hidden: None, - parent_app_id: None, - item_modified_cnt: None, - } - } -} diff --git a/rust/src/models/open_namespace_identifier.rs b/rust/src/models/open_namespace_identifier.rs deleted file mode 100644 index 5e690b20..00000000 --- a/rust/src/models/open_namespace_identifier.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * 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 deleted file mode 100644 index ed828bd6..00000000 --- a/rust/src/models/open_namespace_lock_dto.rs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - -/// OpenNamespaceLockDto : Apollo命名空间锁状态数据传输对象 - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenNamespaceLockDto { - /// 命名空间名称 - #[serde(rename = "namespaceName", skip_serializing_if = "Option::is_none")] - pub namespace_name: Option, - /// 是否被锁定 - #[serde(rename = "isLocked", skip_serializing_if = "Option::is_none")] - pub is_locked: Option, - /// 锁定者用户名 - #[serde(rename = "lockedBy", skip_serializing_if = "Option::is_none")] - pub locked_by: Option, - /// 是否允许紧急发布 - #[serde(rename = "isEmergencyPublishAllowed", skip_serializing_if = "Option::is_none")] - pub is_emergency_publish_allowed: Option, -} - -impl OpenNamespaceLockDto { - /// Apollo命名空间锁状态数据传输对象 - pub fn new() -> OpenNamespaceLockDto { - OpenNamespaceLockDto { - namespace_name: None, - is_locked: None, - locked_by: None, - is_emergency_publish_allowed: None, - } - } -} diff --git a/rust/src/models/open_namespace_role_user_dto.rs b/rust/src/models/open_namespace_role_user_dto.rs deleted file mode 100644 index 39b543f6..00000000 --- a/rust/src/models/open_namespace_role_user_dto.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenNamespaceRoleUserDto { - /// - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// - #[serde(rename = "namespaceName", skip_serializing_if = "Option::is_none")] - pub namespace_name: Option, - /// - #[serde(rename = "modifyRoleUsers", skip_serializing_if = "Option::is_none")] - pub modify_role_users: Option>, - /// - #[serde(rename = "releaseRoleUsers", skip_serializing_if = "Option::is_none")] - pub release_role_users: Option>, -} - -impl OpenNamespaceRoleUserDto { - pub fn new() -> OpenNamespaceRoleUserDto { - OpenNamespaceRoleUserDto { - app_id: None, - namespace_name: None, - modify_role_users: None, - release_role_users: None, - } - } -} diff --git a/rust/src/models/open_namespace_sync_dto.rs b/rust/src/models/open_namespace_sync_dto.rs deleted file mode 100644 index f07d6a0e..00000000 --- a/rust/src/models/open_namespace_sync_dto.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenNamespaceSyncDto { - /// 目标命名空间标识列表 - #[serde(rename = "syncToNamespaces", skip_serializing_if = "Option::is_none")] - pub sync_to_namespaces: Option>, - /// 需要修改的配置项列表 - #[serde(rename = "syncItems", skip_serializing_if = "Option::is_none")] - pub sync_items: Option>, -} - -impl OpenNamespaceSyncDto { - pub fn new() -> OpenNamespaceSyncDto { - OpenNamespaceSyncDto { - sync_to_namespaces: None, - sync_items: None, - } - } -} diff --git a/rust/src/models/open_namespace_text_model.rs b/rust/src/models/open_namespace_text_model.rs deleted file mode 100644 index 2c36a6b9..00000000 --- a/rust/src/models/open_namespace_text_model.rs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[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 OpenNamespaceTextModel { - pub fn new() -> OpenNamespaceTextModel { - OpenNamespaceTextModel { - app_id: None, - env: None, - cluster_name: None, - namespace_name: None, - namespace_id: None, - format: None, - config_text: None, - operator: None, - } - } -} diff --git a/rust/src/models/open_namespace_usage_dto.rs b/rust/src/models/open_namespace_usage_dto.rs deleted file mode 100644 index e4439142..00000000 --- a/rust/src/models/open_namespace_usage_dto.rs +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - -/// OpenNamespaceUsageDto : 命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenNamespaceUsageDto { - /// 命名空间名称 - #[serde(rename = "namespaceName", skip_serializing_if = "Option::is_none")] - pub namespace_name: Option, - /// 所属应用的唯一标识符 - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// 所属集群名称 - #[serde(rename = "clusterName", skip_serializing_if = "Option::is_none")] - pub cluster_name: Option, - /// 环境名称 - #[serde(rename = "envName", skip_serializing_if = "Option::is_none")] - pub env_name: Option, - /// 该命名空间关联的实例数量 - #[serde(rename = "instanceCount", skip_serializing_if = "Option::is_none")] - pub instance_count: Option, - /// 分支命名空间关联的实例数量 - #[serde(rename = "branchInstanceCount", skip_serializing_if = "Option::is_none")] - pub branch_instance_count: Option, - /// 关联到该公共命名空间的命名空间数量 - #[serde(rename = "linkedNamespaceCount", skip_serializing_if = "Option::is_none")] - pub linked_namespace_count: Option, -} - -impl OpenNamespaceUsageDto { - /// 命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 - pub fn new() -> OpenNamespaceUsageDto { - OpenNamespaceUsageDto { - namespace_name: None, - app_id: None, - cluster_name: None, - env_name: None, - instance_count: None, - branch_instance_count: None, - linked_namespace_count: None, - } - } -} diff --git a/rust/src/models/open_organization_dto.rs b/rust/src/models/open_organization_dto.rs deleted file mode 100644 index c45b2b5f..00000000 --- a/rust/src/models/open_organization_dto.rs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[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, -} - -impl OpenOrganizationDto { - pub fn new() -> OpenOrganizationDto { - OpenOrganizationDto { - org_id: None, - org_name: None, - } - } -} diff --git a/rust/src/models/open_permission_condition_dto.rs b/rust/src/models/open_permission_condition_dto.rs deleted file mode 100644 index 8e5b768e..00000000 --- a/rust/src/models/open_permission_condition_dto.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenPermissionConditionDto { - /// - #[serde(rename = "hasPermission", skip_serializing_if = "Option::is_none")] - pub has_permission: Option, -} - -impl OpenPermissionConditionDto { - pub fn new() -> OpenPermissionConditionDto { - OpenPermissionConditionDto { - has_permission: None, - } - } -} diff --git a/rust/src/models/open_release_change_dto.rs b/rust/src/models/open_release_change_dto.rs deleted file mode 100644 index 035c7cfc..00000000 --- a/rust/src/models/open_release_change_dto.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenReleaseChangeDto { - /// 修改类型 - #[serde(rename = "changeType", skip_serializing_if = "Option::is_none")] - pub change_type: Option, - /// key - #[serde(rename = "key", skip_serializing_if = "Option::is_none")] - pub key: Option, - /// new value - #[serde(rename = "newValue", skip_serializing_if = "Option::is_none")] - pub new_value: Option, - /// old value - #[serde(rename = "oldValue", skip_serializing_if = "Option::is_none")] - pub old_value: Option, -} - -impl OpenReleaseChangeDto { - pub fn new() -> OpenReleaseChangeDto { - OpenReleaseChangeDto { - change_type: None, - key: None, - new_value: None, - old_value: None, - } - } -} diff --git a/rust/src/models/open_release_diff_dto.rs b/rust/src/models/open_release_diff_dto.rs deleted file mode 100644 index f8d472a3..00000000 --- a/rust/src/models/open_release_diff_dto.rs +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenReleaseDiffDto { - /// A list of changes, ensuring order if necessary. - #[serde(rename = "changes", skip_serializing_if = "Option::is_none")] - pub changes: Option>, -} - -impl OpenReleaseDiffDto { - pub fn new() -> OpenReleaseDiffDto { - OpenReleaseDiffDto { - changes: None, - } - } -} diff --git a/rust/src/models/open_release_dto.rs b/rust/src/models/open_release_dto.rs deleted file mode 100644 index dc8459e9..00000000 --- a/rust/src/models/open_release_dto.rs +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - -/// OpenReleaseDto : Apollo发布信息数据传输对象,表示一次配置发布的完整信息 - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenReleaseDto { - /// 发布创建者用户名,记录是谁创建了这次发布 - #[serde(rename = "dataChangeCreatedBy", skip_serializing_if = "Option::is_none")] - pub data_change_created_by: Option, - /// 发布创建者显示名称,用于展示创建者的友好名称 - #[serde(rename = "dataChangeCreatedByDisplayName", skip_serializing_if = "Option::is_none")] - pub data_change_created_by_display_name: Option, - /// 发布最后修改者用户名,记录最后一次修改发布信息的用户 - #[serde(rename = "dataChangeLastModifiedBy", skip_serializing_if = "Option::is_none")] - pub data_change_last_modified_by: 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 = "id", skip_serializing_if = "Option::is_none")] - pub id: Option, - /// 所属应用的唯一标识符 - #[serde(rename = "appId", skip_serializing_if = "Option::is_none")] - pub app_id: Option, - /// 所属集群的名称 - #[serde(rename = "clusterName", skip_serializing_if = "Option::is_none")] - pub cluster_name: Option, - /// 所属命名空间的名称 - #[serde(rename = "namespaceName", skip_serializing_if = "Option::is_none")] - pub namespace_name: Option, - /// 发布名称,用于标识这次发布的版本或描述 - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "configurations", skip_serializing_if = "Option::is_none")] - pub configurations: Option<::std::collections::HashMap>, - /// 发布备注,描述本次发布的变更内容和目的 - #[serde(rename = "comment", skip_serializing_if = "Option::is_none")] - pub comment: Option, -} - -impl OpenReleaseDto { - /// Apollo发布信息数据传输对象,表示一次配置发布的完整信息 - pub fn new() -> OpenReleaseDto { - OpenReleaseDto { - data_change_created_by: None, - data_change_created_by_display_name: None, - data_change_last_modified_by: None, - data_change_last_modified_by_display_name: None, - data_change_created_time: None, - data_change_last_modified_time: None, - id: None, - app_id: None, - cluster_name: None, - namespace_name: None, - name: None, - configurations: None, - comment: None, - } - } -} diff --git a/rust/src/models/open_user_dto.rs b/rust/src/models/open_user_dto.rs deleted file mode 100644 index 4975e00c..00000000 --- a/rust/src/models/open_user_dto.rs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenUserDto { - /// 用户名 - #[serde(rename = "username", skip_serializing_if = "Option::is_none")] - pub username: Option, - /// 用户显示名 - #[serde(rename = "userDisplayName", skip_serializing_if = "Option::is_none")] - pub user_display_name: Option, - /// 用户密码 - #[serde(rename = "password", skip_serializing_if = "Option::is_none")] - pub password: Option, - /// 用户邮箱 - #[serde(rename = "email", skip_serializing_if = "Option::is_none")] - pub email: Option, - /// 是否启用,1 表示启用,0 表示禁用 - #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")] - pub enabled: Option, -} - -impl OpenUserDto { - pub fn new() -> OpenUserDto { - OpenUserDto { - username: None, - user_display_name: None, - password: None, - email: None, - enabled: None, - } - } -} diff --git a/rust/src/models/open_user_info_dto.rs b/rust/src/models/open_user_info_dto.rs deleted file mode 100644 index 8f752c7c..00000000 --- a/rust/src/models/open_user_info_dto.rs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Apollo OpenAPI - * - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * Generated by: https://openapi-generator.tech - */ - - - - -#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)] -pub struct OpenUserInfoDto { - /// - #[serde(rename = "userId", skip_serializing_if = "Option::is_none")] - pub user_id: Option, - /// - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - /// - #[serde(rename = "email", skip_serializing_if = "Option::is_none")] - pub email: Option, - /// - #[serde(rename = "enabled", skip_serializing_if = "Option::is_none")] - pub enabled: Option, -} - -impl OpenUserInfoDto { - pub fn new() -> OpenUserInfoDto { - OpenUserInfoDto { - user_id: None, - name: None, - email: None, - enabled: None, - } - } -} diff --git a/spring-boot2/.mvn/wrapper/MavenWrapperDownloader.java b/spring-boot2/.mvn/wrapper/MavenWrapperDownloader.java deleted file mode 100644 index b901097f..00000000 --- a/spring-boot2/.mvn/wrapper/MavenWrapperDownloader.java +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Copyright 2007-present the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import java.net.*; -import java.io.*; -import java.nio.channels.*; -import java.util.Properties; - -public class MavenWrapperDownloader { - - private static final String WRAPPER_VERSION = "0.5.6"; - /** - * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided. - */ - private static final String DEFAULT_DOWNLOAD_URL = "https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/" - + WRAPPER_VERSION + "/maven-wrapper-" + WRAPPER_VERSION + ".jar"; - - /** - * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to - * use instead of the default one. - */ - private static final String MAVEN_WRAPPER_PROPERTIES_PATH = - ".mvn/wrapper/maven-wrapper.properties"; - - /** - * Path where the maven-wrapper.jar will be saved to. - */ - private static final String MAVEN_WRAPPER_JAR_PATH = - ".mvn/wrapper/maven-wrapper.jar"; - - /** - * Name of the property which should be used to override the default download url for the wrapper. - */ - private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl"; - - public static void main(String args[]) { - System.out.println("- Downloader started"); - File baseDirectory = new File(args[0]); - System.out.println("- Using base directory: " + baseDirectory.getAbsolutePath()); - - // If the maven-wrapper.properties exists, read it and check if it contains a custom - // wrapperUrl parameter. - File mavenWrapperPropertyFile = new File(baseDirectory, MAVEN_WRAPPER_PROPERTIES_PATH); - String url = DEFAULT_DOWNLOAD_URL; - if(mavenWrapperPropertyFile.exists()) { - FileInputStream mavenWrapperPropertyFileInputStream = null; - try { - mavenWrapperPropertyFileInputStream = new FileInputStream(mavenWrapperPropertyFile); - Properties mavenWrapperProperties = new Properties(); - mavenWrapperProperties.load(mavenWrapperPropertyFileInputStream); - url = mavenWrapperProperties.getProperty(PROPERTY_NAME_WRAPPER_URL, url); - } catch (IOException e) { - System.out.println("- ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'"); - } finally { - try { - if(mavenWrapperPropertyFileInputStream != null) { - mavenWrapperPropertyFileInputStream.close(); - } - } catch (IOException e) { - // Ignore ... - } - } - } - System.out.println("- Downloading from: " + url); - - File outputFile = new File(baseDirectory.getAbsolutePath(), MAVEN_WRAPPER_JAR_PATH); - if(!outputFile.getParentFile().exists()) { - if(!outputFile.getParentFile().mkdirs()) { - System.out.println( - "- ERROR creating output directory '" + outputFile.getParentFile().getAbsolutePath() + "'"); - } - } - System.out.println("- Downloading to: " + outputFile.getAbsolutePath()); - try { - downloadFileFromURL(url, outputFile); - System.out.println("Done"); - System.exit(0); - } catch (Throwable e) { - System.out.println("- Error downloading"); - e.printStackTrace(); - System.exit(1); - } - } - - private static void downloadFileFromURL(String urlString, File destination) throws Exception { - if (System.getenv("MVNW_USERNAME") != null && System.getenv("MVNW_PASSWORD") != null) { - String username = System.getenv("MVNW_USERNAME"); - char[] password = System.getenv("MVNW_PASSWORD").toCharArray(); - Authenticator.setDefault(new Authenticator() { - @Override - protected PasswordAuthentication getPasswordAuthentication() { - return new PasswordAuthentication(username, password); - } - }); - } - URL website = new URL(urlString); - ReadableByteChannel rbc; - rbc = Channels.newChannel(website.openStream()); - FileOutputStream fos = new FileOutputStream(destination); - fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE); - fos.close(); - rbc.close(); - } - -} diff --git a/spring-boot2/.mvn/wrapper/maven-wrapper.jar b/spring-boot2/.mvn/wrapper/maven-wrapper.jar deleted file mode 100644 index 2cc7d4a55c0cd0092912bf49ae38b3a9e3fd0054..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 50710 zcmbTd1CVCTmM+|7+wQV$+qP}n>auOywyU~q+qUhh+uxis_~*a##hm*_WW?9E7Pb7N%LRFiwbEGCJ0XP=%-6oeT$XZcYgtzC2~q zk(K08IQL8oTl}>>+hE5YRgXTB@fZ4TH9>7=79e`%%tw*SQUa9~$xKD5rS!;ZG@ocK zQdcH}JX?W|0_Afv?y`-NgLum62B&WSD$-w;O6G0Sm;SMX65z)l%m1e-g8Q$QTI;(Q z+x$xth4KFvH@Bs6(zn!iF#nenk^Y^ce;XIItAoCsow38eq?Y-Auh!1in#Rt-_D>H^ z=EjbclGGGa6VnaMGmMLj`x3NcwA43Jb(0gzl;RUIRAUDcR1~99l2SAPkVhoRMMtN} zXvC<tOmX83grD8GSo_Lo?%lNfhD#EBgPo z*nf@ppMC#B!T)Ae0RG$mlJWmGl7CkuU~B8-==5i;rS;8i6rJ=PoQxf446XDX9g|c> zU64ePyMlsI^V5Jq5A+BPe#e73+kpc_r1tv#B)~EZ;7^67F0*QiYfrk0uVW;Qb=NsG zN>gsuCwvb?s-KQIppEaeXtEMdc9dy6Dfduz-tMTms+i01{eD9JE&h?Kht*$eOl#&L zJdM_-vXs(V#$Ed;5wyNWJdPNh+Z$+;$|%qR(t`4W@kDhd*{(7-33BOS6L$UPDeE_53j${QfKN-0v-HG z(QfyvFNbwPK%^!eIo4ac1;b>c0vyf9}Xby@YY!lkz-UvNp zwj#Gg|4B~?n?G^{;(W;|{SNoJbHTMpQJ*Wq5b{l9c8(%?Kd^1?H1om1de0Da9M;Q=n zUfn{f87iVb^>Exl*nZ0hs(Yt>&V9$Pg`zX`AI%`+0SWQ4Zc(8lUDcTluS z5a_KerZWe}a-MF9#Cd^fi!y3%@RFmg&~YnYZ6<=L`UJ0v={zr)>$A;x#MCHZy1st7 ztT+N07NR+vOwSV2pvWuN1%lO!K#Pj0Fr>Q~R40{bwdL%u9i`DSM4RdtEH#cW)6}+I-eE< z&tZs+(Ogu(H_;$a$!7w`MH0r%h&@KM+<>gJL@O~2K2?VrSYUBbhCn#yy?P)uF3qWU z0o09mIik+kvzV6w>vEZy@&Mr)SgxPzUiDA&%07m17udz9usD82afQEps3$pe!7fUf z0eiidkJ)m3qhOjVHC_M(RYCBO%CZKZXFb8}s0-+}@CIn&EF(rRWUX2g^yZCvl0bI} zbP;1S)iXnRC&}5-Tl(hASKqdSnO?ASGJ*MIhOXIblmEudj(M|W!+I3eDc}7t`^mtg z)PKlaXe(OH+q-)qcQ8a@!llRrpGI8DsjhoKvw9T;TEH&?s=LH0w$EzI>%u;oD@x83 zJL7+ncjI9nn!TlS_KYu5vn%f*@qa5F;| zEFxY&B?g=IVlaF3XNm_03PA)=3|{n-UCgJoTr;|;1AU9|kPE_if8!Zvb}0q$5okF$ zHaJdmO&gg!9oN|M{!qGE=tb|3pVQ8PbL$}e;NgXz<6ZEggI}wO@aBP**2Wo=yN#ZC z4G$m^yaM9g=|&!^ft8jOLuzc3Psca*;7`;gnHm}tS0%f4{|VGEwu45KptfNmwxlE~ z^=r30gi@?cOm8kAz!EylA4G~7kbEiRlRIzwrb~{_2(x^$-?|#e6Bi_**(vyr_~9Of z!n>Gqf+Qwiu!xhi9f53=PM3`3tNF}pCOiPU|H4;pzjcsqbwg*{{kyrTxk<;mx~(;; z1NMrpaQ`57yn34>Jo3b|HROE(UNcQash!0p2-!Cz;{IRv#Vp5!3o$P8!%SgV~k&Hnqhp`5eLjTcy93cK!3Hm-$`@yGnaE=?;*2uSpiZTs_dDd51U%i z{|Zd9ou-;laGS_x=O}a+ zB||za<795A?_~Q=r=coQ+ZK@@ zId~hWQL<%)fI_WDIX#=(WNl!Dm$a&ROfLTd&B$vatq!M-2Jcs;N2vps$b6P1(N}=oI3<3luMTmC|0*{ zm1w8bt7vgX($!0@V0A}XIK)w!AzUn7vH=pZEp0RU0p?}ch2XC-7r#LK&vyc2=-#Q2 z^L%8)JbbcZ%g0Du;|8=q8B>X=mIQirpE=&Ox{TiuNDnOPd-FLI^KfEF729!!0x#Es z@>3ursjFSpu%C-8WL^Zw!7a0O-#cnf`HjI+AjVCFitK}GXO`ME&on|^=~Zc}^LBp9 zj=-vlN;Uc;IDjtK38l7}5xxQF&sRtfn4^TNtnzXv4M{r&ek*(eNbIu!u$>Ed%` z5x7+&)2P&4>0J`N&ZP8$vcR+@FS0126s6+Jx_{{`3ZrIMwaJo6jdrRwE$>IU_JTZ} z(||hyyQ)4Z1@wSlT94(-QKqkAatMmkT7pCycEB1U8KQbFX&?%|4$yyxCtm3=W`$4fiG0WU3yI@c zx{wfmkZAYE_5M%4{J-ygbpH|(|GD$2f$3o_Vti#&zfSGZMQ5_f3xt6~+{RX=$H8at z?GFG1Tmp}}lmm-R->ve*Iv+XJ@58p|1_jRvfEgz$XozU8#iJS})UM6VNI!3RUU!{5 zXB(+Eqd-E;cHQ>)`h0(HO_zLmzR3Tu-UGp;08YntWwMY-9i^w_u#wR?JxR2bky5j9 z3Sl-dQQU$xrO0xa&>vsiK`QN<$Yd%YXXM7*WOhnRdSFt5$aJux8QceC?lA0_if|s> ze{ad*opH_kb%M&~(~&UcX0nFGq^MqjxW?HJIP462v9XG>j(5Gat_)#SiNfahq2Mz2 zU`4uV8m$S~o9(W>mu*=h%Gs(Wz+%>h;R9Sg)jZ$q8vT1HxX3iQnh6&2rJ1u|j>^Qf`A76K%_ubL`Zu?h4`b=IyL>1!=*%!_K)=XC z6d}4R5L+sI50Q4P3upXQ3Z!~1ZXLlh!^UNcK6#QpYt-YC=^H=EPg3)z*wXo*024Q4b2sBCG4I# zlTFFY=kQ>xvR+LsuDUAk)q%5pEcqr(O_|^spjhtpb1#aC& zghXzGkGDC_XDa%t(X`E+kvKQ4zrQ*uuQoj>7@@ykWvF332)RO?%AA&Fsn&MNzmFa$ zWk&&^=NNjxLjrli_8ESU)}U|N{%j&TQmvY~lk!~Jh}*=^INA~&QB9em!in_X%Rl1&Kd~Z(u z9mra#<@vZQlOY+JYUwCrgoea4C8^(xv4ceCXcejq84TQ#sF~IU2V}LKc~Xlr_P=ry zl&Hh0exdCbVd^NPCqNNlxM3vA13EI8XvZ1H9#bT7y*U8Y{H8nwGpOR!e!!}*g;mJ#}T{ekSb}5zIPmye*If(}}_=PcuAW#yidAa^9-`<8Gr0 z)Fz=NiZ{)HAvw{Pl5uu)?)&i&Us$Cx4gE}cIJ}B4Xz~-q7)R_%owbP!z_V2=Aq%Rj z{V;7#kV1dNT9-6R+H}}(ED*_!F=~uz>&nR3gb^Ce%+0s#u|vWl<~JD3MvS0T9thdF zioIG3c#Sdsv;LdtRv3ml7%o$6LTVL>(H`^@TNg`2KPIk*8-IB}X!MT0`hN9Ddf7yN z?J=GxPL!uJ7lqwowsl?iRrh@#5C$%E&h~Z>XQcvFC*5%0RN-Opq|=IwX(dq(*sjs+ zqy99+v~m|6T#zR*e1AVxZ8djd5>eIeCi(b8sUk)OGjAsKSOg^-ugwl2WSL@d#?mdl zib0v*{u-?cq}dDGyZ%$XRY=UkQwt2oGu`zQneZh$=^! zj;!pCBWQNtvAcwcWIBM2y9!*W|8LmQy$H~5BEx)78J`4Z0(FJO2P^!YyQU{*Al+fs z){!4JvT1iLrJ8aU3k0t|P}{RN)_^v%$$r;+p0DY7N8CXzmS*HB*=?qaaF9D@#_$SN zSz{moAK<*RH->%r7xX~9gVW$l7?b|_SYI)gcjf0VAUJ%FcQP(TpBs; zg$25D!Ry_`8xpS_OJdeo$qh#7U+cepZ??TII7_%AXsT$B z=e)Bx#v%J0j``00Zk5hsvv6%T^*xGNx%KN-=pocSoqE5_R)OK%-Pbu^1MNzfds)mL zxz^F4lDKV9D&lEY;I+A)ui{TznB*CE$=9(wgE{m}`^<--OzV-5V4X2w9j(_!+jpTr zJvD*y6;39&T+==$F&tsRKM_lqa1HC}aGL0o`%c9mO=fts?36@8MGm7Vi{Y z^<7m$(EtdSr#22<(rm_(l_(`j!*Pu~Y>>xc>I9M#DJYDJNHO&4=HM%YLIp?;iR&$m z#_$ZWYLfGLt5FJZhr3jpYb`*%9S!zCG6ivNHYzNHcI%khtgHBliM^Ou}ZVD7ehU9 zS+W@AV=?Ro!=%AJ>Kcy9aU3%VX3|XM_K0A+ZaknKDyIS3S-Hw1C7&BSW5)sqj5Ye_ z4OSW7Yu-;bCyYKHFUk}<*<(@TH?YZPHr~~Iy%9@GR2Yd}J2!N9K&CN7Eq{Ka!jdu; zQNB*Y;i(7)OxZK%IHGt#Rt?z`I|A{q_BmoF!f^G}XVeTbe1Wnzh%1g>j}>DqFf;Rp zz7>xIs12@Ke0gr+4-!pmFP84vCIaTjqFNg{V`5}Rdt~xE^I;Bxp4)|cs8=f)1YwHz zqI`G~s2~qqDV+h02b`PQpUE#^^Aq8l%y2|ByQeXSADg5*qMprEAE3WFg0Q39`O+i1 z!J@iV!`Y~C$wJ!5Z+j5$i<1`+@)tBG$JL=!*uk=2k;T<@{|s1$YL079FvK%mPhyHV zP8^KGZnp`(hVMZ;s=n~3r2y;LTwcJwoBW-(ndU-$03{RD zh+Qn$ja_Z^OuMf3Ub|JTY74s&Am*(n{J3~@#OJNYuEVVJd9*H%)oFoRBkySGm`hx! zT3tG|+aAkXcx-2Apy)h^BkOyFTWQVeZ%e2@;*0DtlG9I3Et=PKaPt&K zw?WI7S;P)TWED7aSH$3hL@Qde?H#tzo^<(o_sv_2ci<7M?F$|oCFWc?7@KBj-;N$P zB;q!8@bW-WJY9do&y|6~mEruZAVe$!?{)N9rZZxD-|oltkhW9~nR8bLBGXw<632!l z*TYQn^NnUy%Ds}$f^=yQ+BM-a5X4^GHF=%PDrRfm_uqC zh{sKwIu|O0&jWb27;wzg4w5uA@TO_j(1X?8E>5Zfma|Ly7Bklq|s z9)H`zoAGY3n-+&JPrT!>u^qg9Evx4y@GI4$n-Uk_5wttU1_t?6><>}cZ-U+&+~JE) zPlDbO_j;MoxdLzMd~Ew|1o^a5q_1R*JZ=#XXMzg?6Zy!^hop}qoLQlJ{(%!KYt`MK z8umEN@Z4w!2=q_oe=;QttPCQy3Nm4F@x>@v4sz_jo{4m*0r%J(w1cSo;D_hQtJs7W z><$QrmG^+<$4{d2bgGo&3-FV}avg9zI|Rr(k{wTyl3!M1q+a zD9W{pCd%il*j&Ft z5H$nENf>>k$;SONGW`qo6`&qKs*T z2^RS)pXk9b@(_Fw1bkb)-oqK|v}r$L!W&aXA>IpcdNZ_vWE#XO8X`#Yp1+?RshVcd zknG%rPd*4ECEI0wD#@d+3NbHKxl}n^Sgkx==Iu%}HvNliOqVBqG?P2va zQ;kRJ$J6j;+wP9cS za#m;#GUT!qAV%+rdWolk+)6kkz4@Yh5LXP+LSvo9_T+MmiaP-eq6_k;)i6_@WSJ zlT@wK$zqHu<83U2V*yJ|XJU4farT#pAA&@qu)(PO^8PxEmPD4;Txpio+2)#!9 z>&=i7*#tc0`?!==vk>s7V+PL#S1;PwSY?NIXN2=Gu89x(cToFm))7L;< z+bhAbVD*bD=}iU`+PU+SBobTQ%S!=VL!>q$rfWsaaV}Smz>lO9JXT#`CcH_mRCSf4%YQAw`$^yY z3Y*^Nzk_g$xn7a_NO(2Eb*I=^;4f!Ra#Oo~LLjlcjke*k*o$~U#0ZXOQ5@HQ&T46l z7504MUgZkz2gNP1QFN8Y?nSEnEai^Rgyvl}xZfMUV6QrJcXp;jKGqB=D*tj{8(_pV zqyB*DK$2lgYGejmJUW)*s_Cv65sFf&pb(Yz8oWgDtQ0~k^0-wdF|tj}MOXaN@ydF8 zNr={U?=;&Z?wr^VC+`)S2xl}QFagy;$mG=TUs7Vi2wws5zEke4hTa2)>O0U?$WYsZ z<8bN2bB_N4AWd%+kncgknZ&}bM~eDtj#C5uRkp21hWW5gxWvc6b*4+dn<{c?w9Rmf zIVZKsPl{W2vQAlYO3yh}-{Os=YBnL8?uN5(RqfQ=-1cOiUnJu>KcLA*tQK3FU`_bM zM^T28w;nAj5EdAXFi&Kk1Nnl2)D!M{@+D-}bIEe+Lc4{s;YJc-{F#``iS2uk;2!Zp zF9#myUmO!wCeJIoi^A+T^e~20c+c2C}XltaR!|U-HfDA=^xF97ev}$l6#oY z&-&T{egB)&aV$3_aVA51XGiU07$s9vubh_kQG?F$FycvS6|IO!6q zq^>9|3U^*!X_C~SxX&pqUkUjz%!j=VlXDo$!2VLH!rKj@61mDpSr~7B2yy{>X~_nc zRI+7g2V&k zd**H++P9dg!-AOs3;GM`(g<+GRV$+&DdMVpUxY9I1@uK28$az=6oaa+PutlO9?6#? zf-OsgT>^@8KK>ggkUQRPPgC7zjKFR5spqQb3ojCHzj^(UH~v+!y*`Smv)VpVoPwa6 zWG18WJaPKMi*F6Zdk*kU^`i~NNTfn3BkJniC`yN98L-Awd)Z&mY? zprBW$!qL-OL7h@O#kvYnLsfff@kDIegt~?{-*5A7JrA;#TmTe?jICJqhub-G@e??D zqiV#g{)M!kW1-4SDel7TO{;@*h2=_76g3NUD@|c*WO#>MfYq6_YVUP+&8e4|%4T`w zXzhmVNziAHazWO2qXcaOu@R1MrPP{t)`N)}-1&~mq=ZH=w=;-E$IOk=y$dOls{6sRR`I5>|X zpq~XYW4sd;J^6OwOf**J>a7u$S>WTFPRkjY;BfVgQst)u4aMLR1|6%)CB^18XCz+r ztkYQ}G43j~Q&1em(_EkMv0|WEiKu;z2zhb(L%$F&xWwzOmk;VLBYAZ8lOCziNoPw1 zv2BOyXA`A8z^WH!nXhKXM`t0;6D*-uGds3TYGrm8SPnJJOQ^fJU#}@aIy@MYWz**H zvkp?7I5PE{$$|~{-ZaFxr6ZolP^nL##mHOErB^AqJqn^hFA=)HWj!m3WDaHW$C)i^ z9@6G$SzB=>jbe>4kqr#sF7#K}W*Cg-5y6kun3u&0L7BpXF9=#7IN8FOjWrWwUBZiU zT_se3ih-GBKx+Uw0N|CwP3D@-C=5(9T#BH@M`F2!Goiqx+Js5xC92|Sy0%WWWp={$(am!#l~f^W_oz78HX<0X#7 zp)p1u~M*o9W@O8P{0Qkg@Wa# z2{Heb&oX^CQSZWSFBXKOfE|tsAm#^U-WkDnU;IowZ`Ok4!mwHwH=s|AqZ^YD4!5!@ zPxJj+Bd-q6w_YG`z_+r;S86zwXb+EO&qogOq8h-Ect5(M2+>(O7n7)^dP*ws_3U6v zVsh)sk^@*c>)3EML|0<-YROho{lz@Nd4;R9gL{9|64xVL`n!m$-Jjrx?-Bacp!=^5 z1^T^eB{_)Y<9)y{-4Rz@9_>;_7h;5D+@QcbF4Wv7hu)s0&==&6u)33 zHRj+&Woq-vDvjwJCYES@$C4{$?f$Ibi4G()UeN11rgjF+^;YE^5nYprYoJNoudNj= zm1pXSeG64dcWHObUetodRn1Fw|1nI$D9z}dVEYT0lQnsf_E1x2vBLql7NrHH!n&Sq z6lc*mvU=WS6=v9Lrl}&zRiu_6u;6g%_DU{9b+R z#YHqX7`m9eydf?KlKu6Sb%j$%_jmydig`B*TN`cZL-g!R)iE?+Q5oOqBFKhx z%MW>BC^(F_JuG(ayE(MT{S3eI{cKiwOtPwLc0XO*{*|(JOx;uQOfq@lp_^cZo=FZj z4#}@e@dJ>Bn%2`2_WPeSN7si^{U#H=7N4o%Dq3NdGybrZgEU$oSm$hC)uNDC_M9xc zGzwh5Sg?mpBIE8lT2XsqTt3j3?We8}3bzLBTQd639vyg^$0#1epq8snlDJP2(BF)K zSx30RM+{f+b$g{9usIL8H!hCO117Xgv}ttPJm9wVRjPk;ePH@zxv%j9k5`TzdXLeT zFgFX`V7cYIcBls5WN0Pf6SMBN+;CrQ(|EsFd*xtwr#$R{Z9FP`OWtyNsq#mCgZ7+P z^Yn$haBJ)r96{ZJd8vlMl?IBxrgh=fdq_NF!1{jARCVz>jNdC)H^wfy?R94#MPdUjcYX>#wEx+LB#P-#4S-%YH>t-j+w zOFTI8gX$ard6fAh&g=u&56%3^-6E2tpk*wx3HSCQ+t7+*iOs zPk5ysqE}i*cQocFvA68xHfL|iX(C4h*67@3|5Qwle(8wT&!&{8*{f%0(5gH+m>$tq zp;AqrP7?XTEooYG1Dzfxc>W%*CyL16q|fQ0_jp%%Bk^k!i#Nbi(N9&T>#M{gez_Ws zYK=l}adalV(nH}I_!hNeb;tQFk3BHX7N}}R8%pek^E`X}%ou=cx8InPU1EE0|Hen- zyw8MoJqB5=)Z%JXlrdTXAE)eqLAdVE-=>wGHrkRet}>3Yu^lt$Kzu%$3#(ioY}@Gu zjk3BZuQH&~7H+C*uX^4}F*|P89JX;Hg2U!pt>rDi(n(Qe-c}tzb0#6_ItoR0->LSt zR~UT<-|@TO%O`M+_e_J4wx7^)5_%%u+J=yF_S#2Xd?C;Ss3N7KY^#-vx+|;bJX&8r zD?|MetfhdC;^2WG`7MCgs>TKKN=^=!x&Q~BzmQio_^l~LboTNT=I zC5pme^P@ER``p$2md9>4!K#vV-Fc1an7pl>_|&>aqP}+zqR?+~Z;f2^`a+-!Te%V? z;H2SbF>jP^GE(R1@%C==XQ@J=G9lKX+Z<@5}PO(EYkJh=GCv#)Nj{DkWJM2}F&oAZ6xu8&g7pn1ps2U5srwQ7CAK zN&*~@t{`31lUf`O;2w^)M3B@o)_mbRu{-`PrfNpF!R^q>yTR&ETS7^-b2*{-tZAZz zw@q5x9B5V8Qd7dZ!Ai$9hk%Q!wqbE1F1c96&zwBBaRW}(^axoPpN^4Aw}&a5dMe+*Gomky_l^54*rzXro$ z>LL)U5Ry>~FJi=*{JDc)_**c)-&faPz`6v`YU3HQa}pLtb5K)u%K+BOqXP0)rj5Au$zB zW1?vr?mDv7Fsxtsr+S6ucp2l#(4dnr9sD*v+@*>g#M4b|U?~s93>Pg{{a5|rm2xfI z`>E}?9S@|IoUX{Q1zjm5YJT|3S>&09D}|2~BiMo=z4YEjXlWh)V&qs;*C{`UMxp$9 zX)QB?G$fPD6z5_pNs>Jeh{^&U^)Wbr?2D6-q?)`*1k@!UvwQgl8eG$r+)NnFoT)L6 zg7lEh+E6J17krfYJCSjWzm67hEth24pomhz71|Qodn#oAILN)*Vwu2qpJirG)4Wnv}9GWOFrQg%Je+gNrPl8mw7ykE8{ z=|B4+uwC&bpp%eFcRU6{mxRV32VeH8XxX>v$du<$(DfinaaWxP<+Y97Z#n#U~V zVEu-GoPD=9$}P;xv+S~Ob#mmi$JQmE;Iz4(){y*9pFyW-jjgdk#oG$fl4o9E8bo|L zWjo4l%n51@Kz-n%zeSCD`uB?T%FVk+KBI}=ve zvlcS#wt`U6wrJo}6I6Rwb=1GzZfwE=I&Ne@p7*pH84XShXYJRgvK)UjQL%R9Zbm(m zxzTQsLTON$WO7vM)*vl%Pc0JH7WhP;$z@j=y#avW4X8iqy6mEYr@-}PW?H)xfP6fQ z&tI$F{NNct4rRMSHhaelo<5kTYq+(?pY)Ieh8*sa83EQfMrFupMM@nfEV@EmdHUv9 z35uzIrIuo4#WnF^_jcpC@uNNaYTQ~uZWOE6P@LFT^1@$o&q+9Qr8YR+ObBkpP9=F+$s5+B!mX2~T zAuQ6RenX?O{IlLMl1%)OK{S7oL}X%;!XUxU~xJN8xk z`xywS*naF(J#?vOpB(K=o~lE;m$zhgPWDB@=p#dQIW>xe_p1OLoWInJRKbEuoncf; zmS1!u-ycc1qWnDg5Nk2D)BY%jmOwCLC+Ny>`f&UxFowIsHnOXfR^S;&F(KXd{ODlm z$6#1ccqt-HIH9)|@fHnrKudu!6B$_R{fbCIkSIb#aUN|3RM>zuO>dpMbROZ`^hvS@ z$FU-;e4W}!ubzKrU@R*dW*($tFZ>}dd*4_mv)#O>X{U@zSzQt*83l9mI zI$8O<5AIDx`wo0}f2fsPC_l>ONx_`E7kdXu{YIZbp1$(^oBAH({T~&oQ&1{X951QW zmhHUxd)t%GQ9#ak5fTjk-cahWC;>^Rg7(`TVlvy0W@Y!Jc%QL3Ozu# zDPIqBCy&T2PWBj+d-JA-pxZlM=9ja2ce|3B(^VCF+a*MMp`(rH>Rt6W1$;r{n1(VK zLs>UtkT43LR2G$AOYHVailiqk7naz2yZGLo*xQs!T9VN5Q>eE(w zw$4&)&6xIV$IO^>1N-jrEUg>O8G4^@y+-hQv6@OmF@gy^nL_n1P1-Rtyy$Bl;|VcV zF=p*&41-qI5gG9UhKmmnjs932!6hceXa#-qfK;3d*a{)BrwNFeKU|ge?N!;zk+kB! zMD_uHJR#%b54c2tr~uGPLTRLg$`fupo}cRJeTwK;~}A>(Acy4k-Xk&Aa1&eWYS1ULWUj@fhBiWY$pdfy+F z@G{OG{*v*mYtH3OdUjwEr6%_ZPZ3P{@rfbNPQG!BZ7lRyC^xlMpWH`@YRar`tr}d> z#wz87t?#2FsH-jM6m{U=gp6WPrZ%*w0bFm(T#7m#v^;f%Z!kCeB5oiF`W33W5Srdt zdU?YeOdPG@98H7NpI{(uN{FJdu14r(URPH^F6tOpXuhU7T9a{3G3_#Ldfx_nT(Hec zo<1dyhsVsTw;ZkVcJ_0-h-T3G1W@q)_Q30LNv)W?FbMH+XJ* zy=$@39Op|kZv`Rt>X`zg&at(?PO^I=X8d9&myFEx#S`dYTg1W+iE?vt#b47QwoHI9 zNP+|3WjtXo{u}VG(lLUaW0&@yD|O?4TS4dfJI`HC-^q;M(b3r2;7|FONXphw-%7~* z&;2!X17|05+kZOpQ3~3!Nb>O94b&ZSs%p)TK)n3m=4eiblVtSx@KNFgBY_xV6ts;NF;GcGxMP8OKV^h6LmSb2E#Qnw ze!6Mnz7>lE9u{AgQ~8u2zM8CYD5US8dMDX-5iMlgpE9m*s+Lh~A#P1er*rF}GHV3h z=`STo?kIXw8I<`W0^*@mB1$}pj60R{aJ7>C2m=oghKyxMbFNq#EVLgP0cH3q7H z%0?L93-z6|+jiN|@v>ix?tRBU(v-4RV`}cQH*fp|)vd3)8i9hJ3hkuh^8dz{F5-~_ zUUr1T3cP%cCaTooM8dj|4*M=e6flH0&8ve32Q)0dyisl))XkZ7Wg~N}6y`+Qi2l+e zUd#F!nJp{#KIjbQdI`%oZ`?h=5G^kZ_uN`<(`3;a!~EMsWV|j-o>c?x#;zR2ktiB! z);5rrHl?GPtr6-o!tYd|uK;Vbsp4P{v_4??=^a>>U4_aUXPWQ$FPLE4PK$T^3Gkf$ zHo&9$U&G`d(Os6xt1r?sg14n)G8HNyWa^q8#nf0lbr4A-Fi;q6t-`pAx1T*$eKM*$ z|CX|gDrk#&1}>5H+`EjV$9Bm)Njw&7-ZR{1!CJTaXuP!$Pcg69`{w5BRHysB$(tWUes@@6aM69kb|Lx$%BRY^-o6bjH#0!7b;5~{6J+jKxU!Kmi# zndh@+?}WKSRY2gZ?Q`{(Uj|kb1%VWmRryOH0T)f3cKtG4oIF=F7RaRnH0Rc_&372={_3lRNsr95%ZO{IX{p@YJ^EI%+gvvKes5cY+PE@unghjdY5#9A!G z70u6}?zmd?v+{`vCu-53_v5@z)X{oPC@P)iA3jK$`r zSA2a7&!^zmUiZ82R2=1cumBQwOJUPz5Ay`RLfY(EiwKkrx%@YN^^XuET;tE zmr-6~I7j!R!KrHu5CWGSChO6deaLWa*9LLJbcAJsFd%Dy>a!>J`N)Z&oiU4OEP-!Ti^_!p}O?7`}i7Lsf$-gBkuY*`Zb z7=!nTT;5z$_5$=J=Ko+Cp|Q0J=%oFr>hBgnL3!tvFoLNhf#D0O=X^h+x08iB;@8pXdRHxX}6R4k@i6%vmsQwu^5z zk1ip`#^N)^#Lg#HOW3sPI33xqFB4#bOPVnY%d6prwxf;Y-w9{ky4{O6&94Ra8VN@K zb-lY;&`HtxW@sF!doT5T$2&lIvJpbKGMuDAFM#!QPXW87>}=Q4J3JeXlwHys?!1^#37q_k?N@+u&Ns20pEoBeZC*np;i;M{2C0Z4_br2gsh6eL z#8`#sn41+$iD?^GL%5?cbRcaa-Nx0vE(D=*WY%rXy3B%gNz0l?#noGJGP728RMY#q z=2&aJf@DcR?QbMmN)ItUe+VM_U!ryqA@1VVt$^*xYt~-qvW!J4Tp<-3>jT=7Zow5M z8mSKp0v4b%a8bxFr>3MwZHSWD73D@+$5?nZAqGM#>H@`)mIeC#->B)P8T$zh-Pxnc z8)~Zx?TWF4(YfKuF3WN_ckpCe5;x4V4AA3(i$pm|78{%!q?|~*eH0f=?j6i)n~Hso zmTo>vqEtB)`%hP55INf7HM@taH)v`Fw40Ayc*R!T?O{ziUpYmP)AH`euTK!zg9*6Z z!>M=$3pd0!&TzU=hc_@@^Yd3eUQpX4-33}b{?~5t5lgW=ldJ@dUAH%`l5US1y_`40 zs(X`Qk}vvMDYYq+@Rm+~IyCX;iD~pMgq^KY)T*aBz@DYEB={PxA>)mI6tM*sx-DmGQHEaHwRrAmNjO!ZLHO4b;;5mf@zzlPhkP($JeZGE7 z?^XN}Gf_feGoG~BjUgVa*)O`>lX=$BSR2)uD<9 z>o^|nb1^oVDhQbfW>>!;8-7<}nL6L^V*4pB=>wwW+RXAeRvKED(n1;R`A6v$6gy0I(;Vf?!4;&sgn7F%LpM}6PQ?0%2Z@b{It<(G1CZ|>913E0nR2r^Pa*Bp z@tFGi*CQ~@Yc-?{cwu1 zsilf=k^+Qs>&WZG(3WDixisHpR>`+ihiRwkL(3T|=xsoNP*@XX3BU8hr57l3k;pni zI``=3Nl4xh4oDj<%>Q1zYXHr%Xg_xrK3Nq?vKX3|^Hb(Bj+lONTz>4yhU-UdXt2>j z<>S4NB&!iE+ao{0Tx^N*^|EZU;0kJkx@zh}S^P{ieQjGl468CbC`SWnwLRYYiStXm zOxt~Rb3D{dz=nHMcY)#r^kF8|q8KZHVb9FCX2m^X*(|L9FZg!5a7((!J8%MjT$#Fs)M1Pb zq6hBGp%O1A+&%2>l0mpaIzbo&jc^!oN^3zxap3V2dNj3x<=TwZ&0eKX5PIso9j1;e zwUg+C&}FJ`k(M|%%}p=6RPUq4sT3-Y;k-<68ciZ~_j|bt>&9ZLHNVrp#+pk}XvM{8 z`?k}o-!if>hVlCP9j%&WI2V`5SW)BCeR5>MQhF)po=p~AYN%cNa_BbV6EEh_kk^@a zD>4&>uCGCUmyA-c)%DIcF4R6!>?6T~Mj_m{Hpq`*(wj>foHL;;%;?(((YOxGt)Bhx zuS+K{{CUsaC++%}S6~CJ=|vr(iIs-je)e9uJEU8ZJAz)w166q)R^2XI?@E2vUQ!R% zn@dxS!JcOimXkWJBz8Y?2JKQr>`~SmE2F2SL38$SyR1^yqj8_mkBp)o$@+3BQ~Mid z9U$XVqxX3P=XCKj0*W>}L0~Em`(vG<>srF8+*kPrw z20{z(=^w+ybdGe~Oo_i|hYJ@kZl*(9sHw#Chi&OIc?w`nBODp?ia$uF%Hs(X>xm?j zqZQ`Ybf@g#wli`!-al~3GWiE$K+LCe=Ndi!#CVjzUZ z!sD2O*;d28zkl))m)YN7HDi^z5IuNo3^w(zy8 zszJG#mp#Cj)Q@E@r-=NP2FVxxEAeOI2e=|KshybNB6HgE^(r>HD{*}S}mO>LuRGJT{*tfTzw_#+er-0${}%YPe@CMJ1Ng#j#)i)SnY@ss3gL;g zg2D~#Kpdfu#G;q1qz_TwSz1VJT(b3zby$Vk&;Y#1(A)|xj`_?i5YQ;TR%jice5E;0 zYHg;`zS5{S*9xI6o^j>rE8Ua*XhIw{_-*&@(R|C(am8__>+Ws&Q^ymy*X4~hR2b5r zm^p3sw}yv=tdyncy_Ui7{BQS732et~Z_@{-IhHDXAV`(Wlay<#hb>%H%WDi+K$862nA@BDtM#UCKMu+kM`!JHyWSi?&)A7_ z3{cyNG%a~nnH_!+;g&JxEMAmh-Z}rC!o7>OVzW&PoMyTA_g{hqXG)SLraA^OP**<7 zjWbr7z!o2n3hnx7A=2O=WL;`@9N{vQIM@&|G-ljrPvIuJHYtss0Er0fT5cMXNUf1B z7FAwBDixt0X7C3S)mPe5g`YtME23wAnbU)+AtV}z+e8G;0BP=bI;?(#|Ep!vVfDbK zvx+|CKF>yt0hWQ3drchU#XBU+HiuG*V^snFAPUp-5<#R&BUAzoB!aZ+e*KIxa26V}s6?nBK(U-7REa573wg-jqCg>H8~>O{ z*C0JL-?X-k_y%hpUFL?I>0WV{oV`Nb)nZbJG01R~AG>flIJf)3O*oB2i8~;!P?Wo_ z0|QEB*fifiL6E6%>tlAYHm2cjTFE@*<);#>689Z6S#BySQ@VTMhf9vYQyLeDg1*F} zjq>i1*x>5|CGKN{l9br3kB0EHY|k4{%^t7-uhjd#NVipUZa=EUuE5kS1_~qYX?>hJ z$}!jc9$O$>J&wnu0SgfYods^z?J4X;X7c77Me0kS-dO_VUQ39T(Kv(Y#s}Qqz-0AH z^?WRL(4RzpkD+T5FG_0NyPq-a-B7A5LHOCqwObRJi&oRi(<;OuIN7SV5PeHU$<@Zh zPozEV`dYmu0Z&Tqd>t>8JVde9#Pt+l95iHe$4Xwfy1AhI zDM4XJ;bBTTvRFtW>E+GzkN)9k!hA5z;xUOL2 zq4}zn-DP{qc^i|Y%rvi|^5k-*8;JZ~9a;>-+q_EOX+p1Wz;>i7c}M6Nv`^NY&{J-> z`(mzDJDM}QPu5i44**2Qbo(XzZ-ZDu%6vm8w@DUarqXj41VqP~ zs&4Y8F^Waik3y1fQo`bVUH;b=!^QrWb)3Gl=QVKr+6sxc=ygauUG|cm?|X=;Q)kQ8 zM(xrICifa2p``I7>g2R~?a{hmw@{!NS5`VhH8+;cV(F>B94M*S;5#O`YzZH1Z%yD? zZ61w(M`#aS-*~Fj;x|J!KM|^o;MI#Xkh0ULJcA?o4u~f%Z^16ViA27FxU5GM*rKq( z7cS~MrZ=f>_OWx8j#-Q3%!aEU2hVuTu(7`TQk-Bi6*!<}0WQi;_FpO;fhpL4`DcWp zGOw9vx0N~6#}lz(r+dxIGZM3ah-8qrqMmeRh%{z@dbUD2w15*_4P?I~UZr^anP}DB zU9CCrNiy9I3~d#&!$DX9e?A});BjBtQ7oGAyoI$8YQrkLBIH@2;lt4E^)|d6Jwj}z z&2_E}Y;H#6I4<10d_&P0{4|EUacwFHauvrjAnAm6yeR#}f}Rk27CN)vhgRqEyPMMS7zvunj2?`f;%?alsJ+-K+IzjJx>h8 zu~m_y$!J5RWAh|C<6+uiCNsOKu)E72M3xKK(a9Okw3e_*O&}7llNV!=P87VM2DkAk zci!YXS2&=P0}Hx|wwSc9JP%m8dMJA*q&VFB0yMI@5vWoAGraygwn){R+Cj6B1a2Px z5)u(K5{+;z2n*_XD!+Auv#LJEM)(~Hx{$Yb^ldQmcYF2zNH1V30*)CN_|1$v2|`LnFUT$%-tO0Eg|c5$BB~yDfzS zcOXJ$wpzVK0MfTjBJ0b$r#_OvAJ3WRt+YOLlJPYMx~qp>^$$$h#bc|`g0pF-Ao43? z>*A+8lx>}L{p(Tni2Vvk)dtzg$hUKjSjXRagj)$h#8=KV>5s)J4vGtRn5kP|AXIz! zPgbbVxW{2o4s-UM;c#We8P&mPN|DW7_uLF!a|^0S=wr6Esx9Z$2|c1?GaupU6$tb| zY_KU`(_29O_%k(;>^|6*pZURH3`@%EuKS;Ns z1lujmf;r{qAN&Q0&m{wJSZ8MeE7RM5+Sq;ul_ z`+ADrd_Um+G37js6tKsArNB}n{p*zTUxQr>3@wA;{EUbjNjlNd6$Mx zg0|MyU)v`sa~tEY5$en7^PkC=S<2@!nEdG6L=h(vT__0F=S8Y&eM=hal#7eM(o^Lu z2?^;05&|CNliYrq6gUv;|i!(W{0N)LWd*@{2q*u)}u*> z7MQgk6t9OqqXMln?zoMAJcc zMKaof_Up})q#DzdF?w^%tTI7STI^@8=Wk#enR*)&%8yje>+tKvUYbW8UAPg55xb70 zEn5&Ba~NmOJlgI#iS8W3-@N%>V!#z-ZRwfPO1)dQdQkaHsiqG|~we2ALqG7Ruup(DqSOft2RFg_X%3w?6VqvV1uzX_@F(diNVp z4{I|}35=11u$;?|JFBEE*gb;T`dy+8gWJ9~pNsecrO`t#V9jW-6mnfO@ff9od}b(3s4>p0i30gbGIv~1@a^F2kl7YO;DxmF3? zWi-RoXhzRJV0&XE@ACc?+@6?)LQ2XNm4KfalMtsc%4!Fn0rl zpHTrHwR>t>7W?t!Yc{*-^xN%9P0cs0kr=`?bQ5T*oOo&VRRu+1chM!qj%2I!@+1XF z4GWJ=7ix9;Wa@xoZ0RP`NCWw0*8247Y4jIZ>GEW7zuoCFXl6xIvz$ezsWgKdVMBH> z{o!A7f;R-@eK9Vj7R40xx)T<2$?F2E<>Jy3F;;=Yt}WE59J!1WN367 zA^6pu_zLoZIf*x031CcwotS{L8bJE(<_F%j_KJ2P_IusaZXwN$&^t716W{M6X2r_~ zaiMwdISX7Y&Qi&Uh0upS3TyEIXNDICQlT5fHXC`aji-c{U(J@qh-mWl-uMN|T&435 z5)a1dvB|oe%b2mefc=Vpm0C%IUYYh7HI*;3UdgNIz}R##(#{(_>82|zB0L*1i4B5j-xi9O4x10rs_J6*gdRBX=@VJ+==sWb&_Qc6tSOowM{BX@(zawtjl zdU!F4OYw2@Tk1L^%~JCwb|e#3CC>srRHQ*(N%!7$Mu_sKh@|*XtR>)BmWw!;8-mq7 zBBnbjwx8Kyv|hd*`5}84flTHR1Y@@uqjG`UG+jN_YK&RYTt7DVwfEDXDW4U+iO{>K zw1hr{_XE*S*K9TzzUlJH2rh^hUm2v7_XjwTuYap|>zeEDY$HOq3X4Tz^X}E9z)x4F zs+T?Ed+Hj<#jY-`Va~fT2C$=qFT-5q$@p9~0{G&eeL~tiIAHXA!f6C(rAlS^)&k<- zXU|ZVs}XQ>s5iONo~t!XXZgtaP$Iau;JT%h)>}v54yut~pykaNye4axEK#5@?TSsQ zE;Jvf9I$GVb|S`7$pG)4vgo9NXsKr?u=F!GnA%VS2z$@Z(!MR9?EPcAqi5ft)Iz6sNl`%kj+_H-X`R<>BFrBW=fSlD|{`D%@Rcbu2?%>t7i34k?Ujb)2@J-`j#4 zLK<69qcUuniIan-$A1+fR=?@+thwDIXtF1Tks@Br-xY zfB+zblrR(ke`U;6U~-;p1Kg8Lh6v~LjW@9l2P6s+?$2!ZRPX`(ZkRGe7~q(4&gEi<$ch`5kQ?*1=GSqkeV z{SA1EaW_A!t{@^UY2D^YO0(H@+kFVzZaAh0_`A`f(}G~EP~?B|%gtxu&g%^x{EYSz zk+T;_c@d;+n@$<>V%P=nk36?L!}?*=vK4>nJSm+1%a}9UlmTJTrfX4{Lb7smNQn@T zw9p2%(Zjl^bWGo1;DuMHN(djsEm)P8mEC2sL@KyPjwD@d%QnZ$ zMJ3cnn!_!iP{MzWk%PI&D?m?C(y2d|2VChluN^yHya(b`h>~GkI1y;}O_E57zOs!{ zt2C@M$^PR2U#(dZmA-sNreB@z-yb0Bf7j*yONhZG=onhx>t4)RB`r6&TP$n zgmN*)eCqvgriBO-abHQ8ECN0bw?z5Bxpx z=jF@?zFdVn?@gD5egM4o$m`}lV(CWrOKKq(sv*`mNcHcvw&Xryfw<{ch{O&qc#WCTXX6=#{MV@q#iHYba!OUY+MGeNTjP%Fj!WgM&`&RlI^=AWTOqy-o zHo9YFt!gQ*p7{Fl86>#-JLZo(b^O`LdFK~OsZBRR@6P?ad^Ujbqm_j^XycM4ZHFyg ziUbIFW#2tj`65~#2V!4z7DM8Z;fG0|APaQ{a2VNYpNotB7eZ5kp+tPDz&Lqs0j%Y4tA*URpcfi z_M(FD=fRGdqf430j}1z`O0I=;tLu81bwJXdYiN7_&a-?ly|-j*+=--XGvCq#32Gh(=|qj5F?kmihk{%M&$}udW5)DHK zF_>}5R8&&API}o0osZJRL3n~>76nUZ&L&iy^s>PMnNcYZ|9*1$v-bzbT3rpWsJ+y{ zPrg>5Zlery96Um?lc6L|)}&{992{_$J&=4%nRp9BAC6!IB=A&=tF>r8S*O-=!G(_( zwXbX_rGZgeiK*&n5E;f=k{ktyA1(;x_kiMEt0*gpp_4&(twlS2e5C?NoD{n>X2AT# zY@Zp?#!b1zNq96MQqeO*M1MMBin5v#RH52&Xd~DO6-BZLnA6xO1$sou(YJ1Dlc{WF zVa%2DyYm`V#81jP@70IJ;DX@y*iUt$MLm)ByAD$eUuji|5{ptFYq(q)mE(5bOpxjM z^Q`AHWq44SG3`_LxC9fwR)XRVIp=B%<(-lOC3jI#bb@dK(*vjom!=t|#<@dZql%>O z15y^{4tQoeW9Lu%G&V$90x6F)xN6y_oIn;!Q zs)8jT$;&;u%Y>=T3hg34A-+Y*na=|glcStr5D;&5*t5*DmD~x;zQAV5{}Ya`?RRGa zT*t9@$a~!co;pD^!J5bo?lDOWFx%)Y=-fJ+PDGc0>;=q=s?P4aHForSB+)v0WY2JH z?*`O;RHum6j%#LG)Vu#ciO#+jRC3!>T(9fr+XE7T2B7Z|0nR5jw@WG)kDDzTJ=o4~ zUpeyt7}_nd`t}j9BKqryOha{34erm)RmST)_9Aw)@ zHbiyg5n&E{_CQR@h<}34d7WM{s{%5wdty1l+KX8*?+-YkNK2Be*6&jc>@{Fd;Ps|| z26LqdI3#9le?;}risDq$K5G3yoqK}C^@-8z^wj%tdgw-6@F#Ju{Sg7+y)L?)U$ez> zoOaP$UFZ?y5BiFycir*pnaAaY+|%1%8&|(@VB)zweR%?IidwJyK5J!STzw&2RFx zZV@qeaCB01Hu#U9|1#=Msc8Pgz5P*4Lrp!Q+~(G!OiNR{qa7|r^H?FC6gVhkk3y7=uW#Sh;&>78bZ}aK*C#NH$9rX@M3f{nckYI+5QG?Aj1DM)@~z_ zw!UAD@gedTlePB*%4+55naJ8ak_;))#S;4ji!LOqY5VRI){GMwHR~}6t4g>5C_#U# ztYC!tjKjrKvRy=GAsJVK++~$|+s!w9z3H4G^mACv=EErXNSmH7qN}%PKcN|8%9=i)qS5+$L zu&ya~HW%RMVJi4T^pv?>mw*Gf<)-7gf#Qj|e#w2|v4#t!%Jk{&xlf;$_?jW*n!Pyx zkG$<18kiLOAUPuFfyu-EfWX%4jYnjBYc~~*9JEz6oa)_R|8wjZA|RNrAp%}14L7fW zi7A5Wym*K+V8pkqqO-X#3ft{0qs?KVt^)?kS>AicmeO&q+~J~ zp0YJ_P~_a8j= zsAs~G=8F=M{4GZL{|B__UorX@MRNQLn?*_gym4aW(~+i13knnk1P=khoC-ViMZk+x zLW(l}oAg1H`dU+Fv**;qw|ANDSRs>cGqL!Yw^`; zv;{E&8CNJcc)GHzTYM}f&NPw<6j{C3gaeelU#y!M)w-utYEHOCCJo|Vgp7K6C_$14 zqIrLUB0bsgz^D%V%fbo2f9#yb#CntTX?55Xy|Kps&Xek*4_r=KDZ z+`TQuv|$l}MWLzA5Ay6Cvsa^7xvwXpy?`w(6vx4XJ zWuf1bVSb#U8{xlY4+wlZ$9jjPk)X_;NFMqdgq>m&W=!KtP+6NL57`AMljW+es zzqjUjgz;V*kktJI?!NOg^s_)ph45>4UDA!Vo0hn>KZ+h-3=?Y3*R=#!fOX zP$Y~+14$f66ix?UWB_6r#fMcC^~X4R-<&OD1CSDNuX~y^YwJ>sW0j`T<2+3F9>cLo z#!j57$ll2K9(%$4>eA7(>FJX5e)pR5&EZK!IMQzOfik#FU*o*LGz~7u(8}XzIQRy- z!U7AlMTIe|DgQFmc%cHy_9^{o`eD%ja_L>ckU6$O4*U**o5uR7`FzqkU8k4gxtI=o z^P^oGFPm5jwZMI{;nH}$?p@uV8FT4r=|#GziKXK07bHJLtK}X%I0TON$uj(iJ`SY^ zc$b2CoxCQ>7LH@nxcdW&_C#fMYBtTxcg46dL{vf%EFCZ~eErMvZq&Z%Lhumnkn^4A zsx$ay(FnN7kYah}tZ@0?-0Niroa~13`?hVi6`ndno`G+E8;$<6^gsE-K3)TxyoJ4M zb6pj5=I8^FD5H@`^V#Qb2^0cx7wUz&cruA5g>6>qR5)O^t1(-qqP&1g=qvY#s&{bx zq8Hc%LsbK1*%n|Y=FfojpE;w~)G0-X4i*K3{o|J7`krhIOd*c*$y{WIKz2n2*EXEH zT{oml3Th5k*vkswuFXdGDlcLj15Nec5pFfZ*0?XHaF_lVuiB%Pv&p7z)%38}%$Gup zVTa~C8=cw%6BKn_|4E?bPNW4PT7}jZQLhDJhvf4z;~L)506IE0 zX!tWXX(QOQPRj-p80QG79t8T2^az4Zp2hOHziQlvT!|H)jv{Ixodabzv6lBj)6WRB z{)Kg@$~~(7$-az?lw$4@L%I&DI0Lo)PEJJziWP33a3azb?jyXt1v0N>2kxwA6b%l> zZqRpAo)Npi&loWbjFWtEV)783BbeIAhqyuc+~>i7aQ8shIXt)bjCWT6$~ro^>99G} z2XfmT0(|l!)XJb^E!#3z4oEGIsL(xd; zYX1`1I(cG|u#4R4T&C|m*9KB1`UzKvho5R@1eYtUL9B72{i(ir&ls8g!pD ztR|25xGaF!4z5M+U@@lQf(12?xGy`!|3E}7pI$k`jOIFjiDr{tqf0va&3pOn6Pu)% z@xtG2zjYuJXrV)DUrIF*y<1O1<$#54kZ#2;=X51J^F#0nZ0(;S$OZDt_U2bx{RZ=Q zMMdd$fH|!s{ zXq#l;{`xfV`gp&C>A`WrQU?d{!Ey5(1u*VLJt>i27aZ-^&2IIk=zP5p+{$q(K?2(b z8?9h)kvj9SF!Dr zoyF}?V|9;6abHxWk2cEvGs$-}Pg}D+ZzgkaN&$Snp%;5m%zh1E#?Wac-}x?BYlGN#U#Mek*}kek#I9XaHt?mz3*fDrRTQ#&#~xyeqJk1QJ~E$7qsw6 z?sV;|?*=-{M<1+hXoj?@-$y+(^BJ1H~wQ9G8C0#^aEAyhDduNX@haoa=PuPp zYsGv8UBfQaRHgBgLjmP^eh>fLMeh{8ic)?xz?#3kX-D#Z{;W#cd_`9OMFIaJg-=t`_3*!YDgtNQ2+QUEAJB9M{~AvT$H`E)IKmCR21H532+ata8_i_MR@ z2Xj<3w<`isF~Ah$W{|9;51ub*f4#9ziKrOR&jM{x7I_7()O@`F*5o$KtZ?fxU~g`t zUovNEVKYn$U~VX8eR)qb`7;D8pn*Pp$(otYTqL)5KH$lUS-jf}PGBjy$weoceAcPp z&5ZYB$r&P$MN{0H0AxCe4Qmd3T%M*5d4i%#!nmBCN-WU-4m4Tjxn-%j3HagwTxCZ9 z)j5vO-C7%s%D!&UfO>bi2oXiCw<-w{vVTK^rVbv#W=WjdADJy8$khnU!`ZWCIU`># zyjc^1W~pcu>@lDZ{zr6gv%)2X4n27~Ve+cQqcND%0?IFSP4sH#yIaXXYAq^z3|cg` z`I3$m%jra>e2W-=DiD@84T!cb%||k)nPmEE09NC%@PS_OLhkrX*U!cgD*;;&gIaA(DyVT4QD+q_xu z>r`tg{hiGY&DvD-)B*h+YEd+Zn)WylQl}<4>(_NlsKXCRV;a)Rcw!wtelM2_rWX`j zTh5A|i6=2BA(iMCnj_fob@*eA;V?oa4Z1kRBGaU07O70fb6-qmA$Hg$ps@^ka1=RO zTbE_2#)1bndC3VuK@e!Sftxq4=Uux}fDxXE#Q5_x=E1h>T5`DPHz zbH<_OjWx$wy7=%0!mo*qH*7N4tySm+R0~(rbus`7;+wGh;C0O%x~fEMkt!eV>U$`i z5>Q(o z=t$gPjgGh0&I7KY#k50V7DJRX<%^X z>6+ebc9efB3@eE2Tr){;?_w`vhgF>`-GDY(YkR{9RH(MiCnyRtd!LxXJ75z+?2 zGi@m^+2hKJ5sB1@Xi@s_@p_Kwbc<*LQ_`mr^Y%j}(sV_$`J(?_FWP)4NW*BIL~sR>t6 zM;qTJZ~GoY36&{h-Pf}L#y2UtR}>ZaI%A6VkU>vG4~}9^i$5WP2Tj?Cc}5oQxe2=q z8BeLa$hwCg_psjZyC2+?yX4*hJ58Wu^w9}}7X*+i5Rjqu5^@GzXiw#SUir1G1`jY% zOL=GE_ENYxhcyUrEt9XlMNP6kx6h&%6^u3@zB8KUCAa18T(R2J`%JjWZ z!{7cXaEW+Qu*iJPu+m>QqW}Lo$4Z+!I)0JNzZ&_M%=|B1yejFRM04bGAvu{=lNPd+ zJRI^DRQ(?FcVUD+bgEcAi@o(msqys9RTCG#)TjI!9~3-dc`>gW;HSJuQvH~d`MQs86R$|SKXHh zqS9Qy)u;T`>>a!$LuaE2keJV%;8g)tr&Nnc;EkvA-RanHXsy)D@XN0a>h}z2j81R; zsUNJf&g&rKpuD0WD@=dDrPHdBoK42WoBU|nMo17o(5^;M|dB4?|FsAGVrSyWcI`+FVw^vTVC`y}f(BwJl zrw3Sp151^9=}B})6@H*i4-dIN_o^br+BkcLa^H56|^2XsT0dESw2 zMX>(KqNl=x2K5=zIKg}2JpGAZu{I_IO}0$EQ5P{4zol**PCt3F4`GX}2@vr8#Y)~J zKb)gJeHcFnR@4SSh%b;c%J`l=W*40UPjF#q{<}ywv-=vHRFmDjv)NtmC zQx9qm)d%0zH&qG7AFa3VAU1S^(n8VFTC~Hb+HjYMjX8r#&_0MzlNR*mnLH5hi}`@{ zK$8qiDDvS_(L9_2vHgzEQ${DYSE;DqB!g*jhJghE&=LTnbgl&Xepo<*uRtV{2wDHN z)l;Kg$TA>Y|K8Lc&LjWGj<+bp4Hiye_@BfU(y#nF{fpR&|Ltbye?e^j0}8JC4#xi% zv29ZR%8%hk=3ZDvO-@1u8KmQ@6p%E|dlHuy#H1&MiC<*$YdLkHmR#F3ae;bKd;@*i z2_VfELG=B}JMLCO-6UQy^>RDE%K4b>c%9ki`f~Z2Qu8hO7C#t%Aeg8E%+}6P7Twtg z-)dj(w}_zFK&86KR@q9MHicUAucLVshUdmz_2@32(V`y3`&Kf8Q2I)+!n0mR=rrDU zXvv^$ho;yh*kNqJ#r1}b0|i|xRUF6;lhx$M*uG3SNLUTC@|htC z-=fsw^F%$qqz4%QdjBrS+ov}Qv!z00E+JWas>p?z@=t!WWU3K*?Z(0meTuTOC7OTx zU|kFLE0bLZ+WGcL$u4E}5dB0g`h|uwv3=H6f+{5z9oLv-=Q45+n~V4WwgO=CabjM% zBAN+RjM65(-}>Q2V#i1Na@a0`08g&y;W#@sBiX6Tpy8r}*+{RnyGUT`?XeHSqo#|J z^ww~c;ou|iyzpErDtlVU=`8N7JSu>4M z_pr9=tX0edVn9B}YFO2y(88j#S{w%E8vVOpAboK*27a7e4Ekjt0)hIX99*1oE;vex z7#%jhY=bPijA=Ce@9rRO(Vl_vnd00!^TAc<+wVvRM9{;hP*rqEL_(RzfK$er_^SN; z)1a8vo8~Dr5?;0X0J62Cusw$A*c^Sx1)dom`-)Pl7hsW4i(r*^Mw`z5K>!2ixB_mu z*Ddqjh}zceRFdmuX1akM1$3>G=#~|y?eYv(e-`Qy?bRHIq=fMaN~fB zUa6I8Rt=)jnplP>yuS+P&PxeWpJ#1$F`iqRl|jF$WL_aZFZl@kLo&d$VJtu&w?Q0O zzuXK>6gmygq(yXJy0C1SL}T8AplK|AGNUOhzlGeK_oo|haD@)5PxF}rV+5`-w{Aag zus45t=FU*{LguJ11Sr-28EZkq;!mJO7AQGih1L4rEyUmp>B!%X0YemsrV3QFvlgt* z5kwlPzaiJ+kZ^PMd-RRbl(Y?F*m`4*UIhIuf#8q>H_M=fM*L_Op-<_r zBZagV=4B|EW+KTja?srADTZXCd3Yv%^Chfpi)cg{ED${SI>InNpRj5!euKv?=Xn92 zsS&FH(*w`qLIy$doc>RE&A5R?u zzkl1sxX|{*fLpXvIW>9d<$ePROttn3oc6R!sN{&Y+>Jr@yeQN$sFR z;w6A<2-0%UA?c8Qf;sX7>>uKRBv3Ni)E9pI{uVzX|6Bb0U)`lhLE3hK58ivfRs1}d zNjlGK0hdq0qjV@q1qI%ZFMLgcpWSY~mB^LK)4GZ^h_@H+3?dAe_a~k*;9P_d7%NEFP6+ zgV(oGr*?W(ql?6SQ~`lUsjLb%MbfC4V$)1E0Y_b|OIYxz4?O|!kRb?BGrgiH5+(>s zoqM}v*;OBfg-D1l`M6T6{K`LG+0dJ1)!??G5g(2*vlNkm%Q(MPABT$r13q?|+kL4- zf)Mi5r$sn;u41aK(K#!m+goyd$c!KPl~-&-({j#D4^7hQkV3W|&>l_b!}!z?4($OA z5IrkfuT#F&S1(`?modY&I40%gtroig{YMvF{K{>5u^I51k8RriGd${z)=5k2tG zM|&Bp5kDTfb#vfuTTd?)a=>bX=lokw^y9+2LS?kwHQIWI~pYgy7 zb?A-RKVm_vM5!9?C%qYdfRAw& zAU7`up~%g=p@}pg#b7E)BFYx3g%(J36Nw(Dij!b>cMl@CSNbrW!DBDbTD4OXk!G4x zi}JBKc8HBYx$J~31PXH+4^x|UxK~(<@I;^3pWN$E=sYma@JP|8YL`L(zI6Y#c%Q{6 z*APf`DU$S4pr#_!60BH$FGViP14iJmbrzSrOkR;f3YZa{#E7Wpd@^4E-zH8EgPc-# zKWFPvh%WbqU_%ZEt`=Q?odKHc7@SUmY{GK`?40VuL~o)bS|is$Hn=<=KGHOsEC5tB zFb|q}gGlL97NUf$G$>^1b^3E18PZ~Pm9kX%*ftnolljiEt@2#F2R5ah$zbXd%V_Ev zyDd{1o_uuoBga$fB@Fw!V5F3jIr=a-ykqrK?WWZ#a(bglI_-8pq74RK*KfQ z0~Dzus7_l;pMJYf>Bk`)`S8gF!To-BdMnVw5M-pyu+aCiC5dwNH|6fgRsIKZcF&)g zr}1|?VOp}I3)IR@m1&HX1~#wsS!4iYqES zK}4J{Ei>;e3>LB#Oly>EZkW14^@YmpbgxCDi#0RgdM${&wxR+LiX}B+iRioOB0(pDKpVEI;ND?wNx>%e|m{RsqR_{(nmQ z3ZS}@t!p4a(BKx_-CYwrcyJ5u1TO9bcXti$8sy>xcLKqKCc#~UOZYD{llKTSFEjJ~ zyNWt>tLU}*>^`TvPxtP%F`ZJQw@W0^>x;!^@?k_)9#bF$j0)S3;mH-IR5y82l|%=F z2lR8zhP?XNP-ucZZ6A+o$xOyF!w;RaLHGh57GZ|TCXhJqY~GCh)aXEV$1O&$c}La1 zjuJxkY9SM4av^Hb;i7efiYaMwI%jGy`3NdY)+mcJhF(3XEiSlU3c|jMBi|;m-c?~T z+x0_@;SxcoY=(6xNgO$bBt~Pj8`-<1S|;Bsjrzw3@zSjt^JC3X3*$HI79i~!$RmTz zsblZsLYs7L$|=1CB$8qS!tXrWs!F@BVuh?kN(PvE5Av-*r^iYu+L^j^m9JG^#=m>@ z=1soa)H*w6KzoR$B8mBCXoU;f5^bVuwQ3~2LKg!yxomG1#XPmn(?YH@E~_ED+W6mxs%x{%Z<$pW`~ON1~2XjP5v(0{C{+6Dm$00tsd3w=f=ZENy zOgb-=f}|Hb*LQ$YdWg<(u7x3`PKF)B7ZfZ6;1FrNM63 z?O6tE%EiU@6%rVuwIQjvGtOofZBGZT1Sh(xLIYt9c4VI8`!=UJd2BfLjdRI#SbVAX ziT(f*RI^T!IL5Ac>ql7uduF#nuCRJ1)2bdvAyMxp-5^Ww5p#X{rb5)(X|fEhDHHW{ zw(Lfc$g;+Q`B0AiPGtmK%*aWfQQ$d!*U<|-@n2HZvCWSiw^I>#vh+LyC;aaVWGbmkENr z&kl*8o^_FW$T?rDYLO1Pyi%>@&kJKQoH2E0F`HjcN}Zlnx1ddoDA>G4Xu_jyp6vuT zPvC}pT&Owx+qB`zUeR|4G;OH(<<^_bzkjln0k40t`PQxc$7h(T8Ya~X+9gDc8Z9{Z z&y0RAU}#_kQGrM;__MK9vwIwK^aoqFhk~dK!ARf1zJqHMxF2?7-8|~yoO@_~Ed;_wvT%Vs{9RK$6uUQ|&@#6vyBsFK9eZW1Ft#D2)VpQRwpR(;x^ zdoTgMqfF9iBl%{`QDv7B0~8{8`8k`C4@cbZAXBu00v#kYl!#_Wug{)2PwD5cNp?K^ z9+|d-4z|gZ!L{57>!Ogfbzchm>J1)Y%?NThxIS8frAw@z>Zb9v%3_3~F@<=LG%r*U zaTov}{{^z~SeX!qgSYow`_5)ij*QtGp4lvF`aIGQ>@3ZTkDmsl#@^5*NGjOuu82}o zzLF~Q9SW+mP=>88%eSA1W4_W7-Q>rdq^?t=m6}^tDPaBRGFLg%ak93W!kOp#EO{6& zP%}Iff5HZQ9VW$~+9r=|Quj#z*=YwcnssS~9|ub2>v|u1JXP47vZ1&L1O%Z1DsOrDfSIMHU{VT>&>H=9}G3i@2rP+rx@eU@uE8rJNec zij~#FmuEBj03F1~ct@C@$>y)zB+tVyjV3*n`mtAhIM0$58vM9jOQC}JJOem|EpwqeMuYPxu3sv}oMS?S#o6GGK@8PN59)m&K4Dc&X% z(;XL_kKeYkafzS3Wn5DD>Yiw{LACy_#jY4op(>9q>>-*9@C0M+=b#bknAWZ37^(Ij zq>H%<@>o4a#6NydoF{_M4i4zB_KG)#PSye9bk0Ou8h%1Dtl7Q_y#7*n%g)?m>xF~( zjqvOwC;*qvN_3(*a+w2|ao0D?@okOvg8JskUw(l7n`0fncglavwKd?~l_ryKJ^Ky! zKCHkIC-o7%fFvPa$)YNh022lakMar^dgL=t#@XLyNHHw!b?%WlM)R@^!)I!smZL@k zBi=6wE5)2v&!UNV(&)oOYW(6Qa!nUjDKKBf-~Da=#^HE4(@mWk)LPvhyN3i4goB$3K8iV7uh zsv+a?#c4&NWeK(3AH;ETrMOIFgu{_@%XRwCZ;L=^8Ts)hix4Pf3yJRQ<8xb^CkdmC z?c_gB)XmRsk`9ch#tx4*hO=#qS7={~Vb4*tTf<5P%*-XMfUUYkI9T1cEF;ObfxxI-yNuA=I$dCtz3ey znVkctYD*`fUuZ(57+^B*R=Q}~{1z#2!ca?)+YsRQb+lt^LmEvZt_`=j^wqig+wz@n@ z`LIMQJT3bxMzuKg8EGBU+Q-6cs5(@5W?N>JpZL{$9VF)veF`L5%DSYTNQEypW%6$u zm_~}T{HeHj1bAlKl8ii92l9~$dm=UM21kLemA&b$;^!wB7#IKWGnF$TVq!!lBlG4 z{?Rjz?P(uvid+|i$VH?`-C&Gcb3{(~Vpg`w+O);Wk1|Mrjxrht0GfRUnZqz2MhrXa zqgVC9nemD5)H$to=~hp)c=l9?#~Z_7i~=U-`FZxb-|TR9@YCxx;Zjo-WpMNOn2)z) zFPGGVl%3N$f`gp$gPnWC+f4(rmts%fidpo^BJx72zAd7|*Xi{2VXmbOm)1`w^tm9% znM=0Fg4bDxH5PxPEm{P3#A(mxqlM7SIARP?|2&+c7qmU8kP&iApzL|F>Dz)Ixp_`O zP%xrP1M6@oYhgo$ZWwrAsYLa4 z|I;DAvJxno9HkQrhLPQk-8}=De{9U3U%)dJ$955?_AOms!9gia%)0E$Mp}$+0er@< zq7J&_SzvShM?e%V?_zUu{niL@gt5UFOjFJUJ}L?$f%eU%jUSoujr{^O=?=^{19`ON zlRIy8Uo_nqcPa6@yyz`CM?pMJ^^SN^Fqtt`GQ8Q#W4kE7`V9^LT}j#pMChl!j#g#J zr-=CCaV%xyFeQ9SK+mG(cTwW*)xa(eK;_Z(jy)woZp~> zA(4}-&VH+TEeLzPTqw&FOoK(ZjD~m{KW05fiGLe@E3Z2`rLukIDahE*`u!ubU)9`o zn^-lyht#E#-dt~S>}4y$-mSbR8{T@}22cn^refuQ08NjLOv?JiEWjyOnzk<^R5%gO zhUH_B{oz~u#IYwVnUg8?3P*#DqD8#X;%q%HY**=I>>-S|!X*-!x1{^l#OnR56O>iD zc;i;KS+t$koh)E3)w0OjWJl_aW2;xF=9D9Kr>)(5}4FqUbk# zI#$N8o0w;IChL49m9CJTzoC!|u{Ljd%ECgBOf$}&jA^$(V#P#~)`&g`H8E{uv52pp zwto`xUL-L&WTAVREEm$0g_gYPL(^vHq(*t1WCH_6alhkeW&GCZ3hL)|{O-jiFOBrF z!EW=Jej|dqQitT6!B-7&io2K)WIm~Q)v@yq%U|VpV+I?{y0@Yd%n8~-NuuM*pM~KA z85YB};IS~M(c<}4Hxx>qRK0cdl&e?t253N%vefkgds>Ubn8X}j6Vpgs>a#nFq$osY z1ZRwLqFv=+BTb=i%D2Wv>_yE0z}+niZ4?rE|*a3d7^kndWGwnFqt+iZ(7+aln<}jzbAQ(#Z2SS}3S$%Bd}^ zc9ghB%O)Z_mTZMRC&H#)I#fiLuIkGa^`4e~9oM5zKPx?zjkC&Xy0~r{;S?FS%c7w< zWbMpzc(xSw?9tGxG~_l}Acq}zjt5ClaB7-!vzqnlrX;}$#+PyQ9oU)_DfePh2E1<7 ztok6g6K^k^DuHR*iJ?jw?bs_whk|bx`dxu^nC6#e{1*m~z1eq7m}Cf$*^Eua(oi_I zAL+3opNhJteu&mWQ@kQWPucmiP)4|nFG`b2tpC;h{-PI@`+h?9v=9mn|0R-n8#t=+Z*FD(c5 zjj79Jxkgck*DV=wpFgRZuwr%}KTm+dx?RT@aUHJdaX-ODh~gByS?WGx&czAkvkg;x zrf92l8$Or_zOwJVwh>5rB`Q5_5}ef6DjS*$x30nZbuO3dijS*wvNEqTY5p1_A0gWr znH<(Qvb!os14|R)n2Ost>jS2;d1zyLHu`Svm|&dZD+PpP{Bh>U&`Md;gRl64q;>{8MJJM$?UNUd`aC>BiLe>*{ zJY15->yW+<3rLgYeTruFDtk1ovU<$(_y7#HgUq>)r0{^}Xbth}V#6?%5jeFYt;SG^ z3qF)=uWRU;Jj)Q}cpY8-H+l_n$2$6{ZR?&*IGr{>ek!69ZH0ZoJ*Ji+ezzlJ^%qL3 zO5a`6gwFw(moEzqxh=yJ9M1FTn!eo&qD#y5AZXErHs%22?A+JmS&GIolml!)rZTnUDM3YgzYfT#;OXn)`PWv3Ta z!-i|-Wojv*k&bC}_JJDjiAK(Ba|YZgUI{f}TdEOFT2+}nPmttytw7j%@bQZDV1vvj z^rp{gRkCDmYJHGrE1~e~AE!-&6B6`7UxVQuvRrfdFkGX8H~SNP_X4EodVd;lXd^>eV1jN+Tt4}Rsn)R0LxBz0c=NXU|pUe!MQQFkGBWbR3&(jLm z%RSLc#p}5_dO{GD=DEFr=Fc% z85CBF>*t!6ugI?soX(*JNxBp+-DdZ4X0LldiK}+WWGvXV(C(Ht|!3$psR=&c*HIM=BmX;pRIpz@Ale{9dhGe(U2|Giv;# zOc|;?p67J=Q(kamB*aus=|XP|m{jN^6@V*Bpm?ye56Njh#vyJqE=DweC;?Rv7faX~ zde03n^I~0B2vUmr;w^X37tVxUK?4}ifsSH5_kpKZIzpYu0;Kv}SBGfI2AKNp+VN#z`nI{UNDRbo-wqa4NEls zICRJpu)??cj^*WcZ^MAv+;bDbh~gpN$1Cor<{Y2oyIDws^JsfW^5AL$azE(T0p&pP z1Mv~6Q44R&RHoH95&OuGx2srIr<@zYJTOMKiVs;Bx3py89I87LOb@%mr`0)#;7_~Z zzcZj8?w=)>%5@HoCHE_&hnu(n_yQ-L(~VjpjjkbT7e)Dk5??fApg(d>vwLRJ-x{um z*Nt?DqTSxh_MIyogY!vf1mU1`Gld-&L)*43f6dilz`Q@HEz;+>MDDYv9u!s;WXeao zUq=TaL$P*IFgJzrGc>j1dDOd zed+=ZBo?w4mr$2)Ya}?vedDopomhW1`#P<%YOJ_j=WwClX0xJH-f@s?^tmzs_j7t!k zK@j^zS0Q|mM4tVP5Ram$VbS6|YDY&y?Q1r1joe9dj08#CM{RSMTU}(RCh`hp_Rkl- zGd|Cv~G@F{DLhCizAm9AN!^{rNs8hu!G@8RpnGx7e`-+K$ffN<0qjR zGq^$dj_Tv!n*?zOSyk5skI7JVKJ)3jysnjIu-@VSzQiP8r6MzudCU=~?v-U8yzo^7 zGf~SUTvEp+S*!X9uX!sq=o}lH;r{pzk~M*VA(uyQ`3C8!{C;)&6)95fv(cK!%Cuz$ z_Zal57H6kPN>25KNiI6z6F)jzEkh#%OqU#-__Xzy)KyH};81#N6OfX$$IXWzOn`Q& z4f$Z1t>)8&8PcYfEwY5UadU1yg+U*(1m2ZlHoC-!2?gB!!fLhmTl))D@dhvkx#+Yj z1O=LV{(T%{^IeCuFK>%QR!VZ4GnO5tK8a+thWE zg4VytZrwcS?7^ zuZfhYnB8dwd%VLO?DK7pV5Wi<(`~DYqOXn8#jUIL^)12*Dbhk4GmL_E2`WX&iT16o zk(t|hok(Y|v-wzn?4x34T)|+SfZP>fiq!><*%vnxGN~ypST-FtC+@TPv*vYv@iU!_ z@2gf|PrgQ?Ktf*9^CnJ(x*CtZVB8!OBfg0%!wL;Z8(tYYre0vcnPGlyCc$V(Ipl*P z_(J!a=o@vp^%Efme!K74(Ke7A>Y}|sxV+JL^aYa{~m%5#$$+R1? zGaQhZTTX!#s#=Xtpegqero$RNt&`4xn3g$)=y*;=N=Qai)}~`xtxI_N*#MMCIq#HFifT zz(-*m;pVH&+4bixL&Bbg)W5FN^bH87pAHp)zPkWNMfTFqS=l~AC$3FX3kQUSh_C?-ZftyClgM)o_D7cX$RGlEYblux0jv5 zTr|i-I3@ZPCGheCl~BGhImF)K4!9@?pC(gi3ozX=a!|r1)LFxy_8c&wY0<^{2cm|P zv6Y`QktY*;I)IUd5y3ne1CqpVanlY45z8hf4&$EUBnucDj16pDa4&GI&TArYhf*xh zdj>*%APH8(h~c>o@l#%T>R$e>rwVx_WUB|~V`p^JHsg*y12lzj&zF}w6W09HwB2yb z%Q~`es&(;7#*DUC_w-Dmt7|$*?TA_m;zB+-u{2;Bg{O}nV7G_@7~<)Bv8fH^G$XG8$(&{A zwXJK5LRK%M34(t$&NI~MHT{UQ9qN-V_yn|%PqC81EIiSzmMM=2zb`mIwiP_b)x+2M z7Gd`83h79j#SItpQ}luuf2uOU`my_rY5T{6P#BNlb%h%<#MZb=m@y5aW;#o1^2Z)SWo+b`y0gV^iRcZtz5!-05vF z7wNo=hc6h4hc&s@uL^jqRvD6thVYtbErDK9k!;+a0xoE0WL7zLixjn5;$fXvT=O3I zT6jI&^A7k6R{&5#lVjz#8%_RiAa2{di{`kx79K+j72$H(!ass|B%@l%KeeKchYLe_ z>!(JC2fxsv>XVen+Y42GeYPxMWqm`6F$(E<6^s|g(slNk!lL*6v^W2>f6hh^mE$s= z3D$)}{V5(Qm&A6bp%2Q}*GZ5Qrf}n7*Hr51?bJOyA-?B4vg6y_EX<*-e20h{=0Mxs zbuQGZ$fLyO5v$nQ&^kuH+mNq9O#MWSfThtH|0q1i!NrWj^S}_P;Q1OkYLW6U^?_7G zx2wg?CULj7))QU(n{$0JE%1t2dWrMi2g-Os{v|8^wK{@qlj%+1b^?NI z$}l2tjp0g>K3O+p%yK<9!XqmQ?E9>z&(|^Pi~aSRwI5x$jaA62GFz9%fmO3t3a>cq zK8Xbv=5Ps~4mKN5+Eqw12(!PEyedFXv~VLxMB~HwT1Vfo51pQ#D8e$e4pFZ{&RC2P z5gTIzl{3!&(tor^BwZfR8j4k{7Rq#`riKXP2O-Bh66#WWK2w=z;iD9GLl+3 zpHIaI4#lQ&S-xBK8PiQ%dwOh?%BO~DCo06pN7<^dnZCN@NzY{_Z1>rrB0U|nC&+!2 z2y!oBcTd2;@lzyk(B=TkyZ)zy0deK05*Q0zk+o$@nun`VI1Er7pjq>8V zNmlW{p7S^Btgb(TA}jL(uR>`0w8gHP^T~Sh5Tkip^spk4SBAhC{TZU}_Z)UJw-}zm zPq{KBm!k)?P{`-(9?LFt&YN4s%SIZ-9lJ!Ws~B%exHOeVFk3~}HewnnH(d)qkLQ_d z6h>O)pEE{vbOVw}E+jdYC^wM+AAhaI(YAibUc@B#_mDss0Ji&BK{WG`4 zOk>vSNq(Bq2IB@s>>Rxm6Wv?h;ZXkpb1l8u|+_qXWdC*jjcPCixq;!%BVPSp#hP zqo`%cNf&YoQXHC$D=D45RiT|5ngPlh?0T~?lUf*O)){K@*Kbh?3RW1j9-T?%lDk@y z4+~?wKI%Y!-=O|_IuKz|=)F;V7ps=5@g)RrE;;tvM$gUhG>jHcw2Hr@fS+k^Zr~>G z^JvPrZc}_&d_kEsqAEMTMJw!!CBw)u&ZVzmq+ZworuaE&TT>$pYsd9|g9O^0orAe8 z221?Va!l1|Y5X1Y?{G7rt1sX#qFA^?RLG^VjoxPf63;AS=_mVDfGJKg73L zsGdnTUD40y(>S##2l|W2Cy!H(@@5KBa(#gs`vlz}Y~$ot5VsqPQ{{YtjYFvIumZzt zA{CcxZLJR|4#{j7k~Tu*jkwz8QA|5G1$Cl895R`Zyp;irp1{KN){kB30O8P1W5;@bG znvX74roeMmQlUi=v9Y%(wl$ZC#9tKNFpvi3!C}f1m6Ct|l2g%psc{TJp)@yu)*e2> z((p0Fg*8gJ!|3WZke9;Z{8}&NRkv7iP=#_y-F}x^y?2m%-D_aj^)f04%mneyjo_;) z6qc_Zu$q37d~X``*eP~Q>I2gg%rrV8v=kDfpp$=%Vj}hF)^dsSWygoN(A$g*E=Do6FX?&(@F#7pbiJ`;c0c@Ul zDqW_90Wm#5f2L<(Lf3)3TeXtI7nhYwRm(F;*r_G6K@OPW4H(Y3O5SjUzBC}u3d|eQ8*8d@?;zUPE+i#QNMn=r(ap?2SH@vo*m z3HJ%XuG_S6;QbWy-l%qU;8x;>z>4pMW7>R}J%QLf%@1BY(4f_1iixd-6GlO7Vp*yU zp{VU^3?s?90i=!#>H`lxT!q8rk>W_$2~kbpz7eV{3wR|8E=8**5?qn8#n`*(bt1xRQrdGxyx2y%B$qmw#>ZV$c7%cO#%JM1lY$Y0q?Yuo> ze9KdJoiM)RH*SB%^;TAdX-zEjA7@%y=!0=Zg%iWK7jVI9b&Dk}0$Af&08KHo+ zOwDhFvA(E|ER%a^cdh@^wLUlmIv6?_3=BvX8jKk92L=Y}7Jf5OGMfh` zBdR1wFCi-i5@`9km{isRb0O%TX+f~)KNaEz{rXQa89`YIF;EN&gN)cigu6mNh>?Cm zAO&Im2flv6D{jwm+y<%WsPe4!89n~KN|7}Cb{Z;XweER73r}Qp2 zz}WP4j}U0&(uD&9yGy6`!+_v-S(yG*iytsTR#x_Rc>=6u^vnRDnf1gP{#2>`ffrAC% zTZ5WQ@hAK;P;>kX{D)mIXe4%a5p=LO1xXH@8T?mz7Q@d)$3pL{{B!2{-v70L*o1AO+|n5beiw~ zk@(>m?T3{2k2c;NWc^`4@P&Z?BjxXJ@;x1qhn)9Mn*IFdt_J-dIqx5#d`NfyfX~m( zIS~5)MfZ2Uy?_4W`47i}u0ZgPh<{D|w_d#;D}Q&U$Q-G}xM1A@1f{#%A$jh6Qp&0hQ<0bPOM z-{1Wm&p%%#eb_?x7i;bol EfAhh=DF6Tf diff --git a/spring-boot2/.mvn/wrapper/maven-wrapper.properties b/spring-boot2/.mvn/wrapper/maven-wrapper.properties deleted file mode 100644 index 5d43cd33..00000000 --- a/spring-boot2/.mvn/wrapper/maven-wrapper.properties +++ /dev/null @@ -1,2 +0,0 @@ -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.6/apache-maven-3.8.6-bin.zip -wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar diff --git a/spring-boot2/.openapi-generator-ignore b/spring-boot2/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/spring-boot2/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/spring-boot2/.openapi-generator/FILES b/spring-boot2/.openapi-generator/FILES deleted file mode 100644 index a80c0915..00000000 --- a/spring-boot2/.openapi-generator/FILES +++ /dev/null @@ -1,95 +0,0 @@ -.openapi-generator-ignore -README.md -pom.xml -src/main/java/com/apollo/openapi/server/OpenApiGeneratorApplication.java -src/main/java/com/apollo/openapi/server/RFC3339DateFormat.java -src/main/java/com/apollo/openapi/server/api/AccessKeyManagementApi.java -src/main/java/com/apollo/openapi/server/api/AccessKeyManagementApiController.java -src/main/java/com/apollo/openapi/server/api/AccessKeyManagementApiDelegate.java -src/main/java/com/apollo/openapi/server/api/ApiUtil.java -src/main/java/com/apollo/openapi/server/api/AppManagementApi.java -src/main/java/com/apollo/openapi/server/api/AppManagementApiController.java -src/main/java/com/apollo/openapi/server/api/AppManagementApiDelegate.java -src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApi.java -src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApiController.java -src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApiDelegate.java -src/main/java/com/apollo/openapi/server/api/ClusterManagementApi.java -src/main/java/com/apollo/openapi/server/api/ClusterManagementApiController.java -src/main/java/com/apollo/openapi/server/api/ClusterManagementApiDelegate.java -src/main/java/com/apollo/openapi/server/api/EnvironmentManagementApi.java -src/main/java/com/apollo/openapi/server/api/EnvironmentManagementApiController.java -src/main/java/com/apollo/openapi/server/api/EnvironmentManagementApiDelegate.java -src/main/java/com/apollo/openapi/server/api/InstanceManagementApi.java -src/main/java/com/apollo/openapi/server/api/InstanceManagementApiController.java -src/main/java/com/apollo/openapi/server/api/InstanceManagementApiDelegate.java -src/main/java/com/apollo/openapi/server/api/ItemManagementApi.java -src/main/java/com/apollo/openapi/server/api/ItemManagementApiController.java -src/main/java/com/apollo/openapi/server/api/ItemManagementApiDelegate.java -src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApi.java -src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiController.java -src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiDelegate.java -src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApi.java -src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApiController.java -src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApiDelegate.java -src/main/java/com/apollo/openapi/server/api/NamespaceManagementApi.java -src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiController.java -src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiDelegate.java -src/main/java/com/apollo/openapi/server/api/OrganizationManagementApi.java -src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiController.java -src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiDelegate.java -src/main/java/com/apollo/openapi/server/api/PermissionManagementApi.java -src/main/java/com/apollo/openapi/server/api/PermissionManagementApiController.java -src/main/java/com/apollo/openapi/server/api/PermissionManagementApiDelegate.java -src/main/java/com/apollo/openapi/server/api/PortalManagementApi.java -src/main/java/com/apollo/openapi/server/api/PortalManagementApiController.java -src/main/java/com/apollo/openapi/server/api/PortalManagementApiDelegate.java -src/main/java/com/apollo/openapi/server/api/ReleaseManagementApi.java -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/api/UserManagementApi.java -src/main/java/com/apollo/openapi/server/api/UserManagementApiController.java -src/main/java/com/apollo/openapi/server/api/UserManagementApiDelegate.java -src/main/java/com/apollo/openapi/server/config/HomeController.java -src/main/java/com/apollo/openapi/server/config/SpringDocConfiguration.java -src/main/java/com/apollo/openapi/server/model/ExceptionResponse.java -src/main/java/com/apollo/openapi/server/model/NamespaceGrayDelReleaseDTO.java -src/main/java/com/apollo/openapi/server/model/NamespaceReleaseDTO.java -src/main/java/com/apollo/openapi/server/model/OpenAccessKeyDTO.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/OpenAppRoleUserDTO.java -src/main/java/com/apollo/openapi/server/model/OpenClusterDTO.java -src/main/java/com/apollo/openapi/server/model/OpenClusterNamespaceRoleUserDTO.java -src/main/java/com/apollo/openapi/server/model/OpenCreateAppDTO.java -src/main/java/com/apollo/openapi/server/model/OpenCreateNamespaceDTO.java -src/main/java/com/apollo/openapi/server/model/OpenEnvClusterDTO.java -src/main/java/com/apollo/openapi/server/model/OpenEnvClusterInfo.java -src/main/java/com/apollo/openapi/server/model/OpenEnvNamespaceRoleUserDTO.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/OpenInstancePageDTO.java -src/main/java/com/apollo/openapi/server/model/OpenItemDTO.java -src/main/java/com/apollo/openapi/server/model/OpenItemDiffDTO.java -src/main/java/com/apollo/openapi/server/model/OpenItemExtendDTO.java -src/main/java/com/apollo/openapi/server/model/OpenItemPageDTO.java -src/main/java/com/apollo/openapi/server/model/OpenMissEnvDTO.java -src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java -src/main/java/com/apollo/openapi/server/model/OpenNamespaceExtendDTO.java -src/main/java/com/apollo/openapi/server/model/OpenNamespaceIdentifier.java -src/main/java/com/apollo/openapi/server/model/OpenNamespaceLockDTO.java -src/main/java/com/apollo/openapi/server/model/OpenNamespaceRoleUserDTO.java -src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncDTO.java -src/main/java/com/apollo/openapi/server/model/OpenNamespaceTextModel.java -src/main/java/com/apollo/openapi/server/model/OpenNamespaceUsageDTO.java -src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.java -src/main/java/com/apollo/openapi/server/model/OpenPermissionConditionDTO.java -src/main/java/com/apollo/openapi/server/model/OpenReleaseChangeDTO.java -src/main/java/com/apollo/openapi/server/model/OpenReleaseDTO.java -src/main/java/com/apollo/openapi/server/model/OpenReleaseDiffDTO.java -src/main/java/com/apollo/openapi/server/model/OpenUserDTO.java -src/main/java/com/apollo/openapi/server/model/OpenUserInfoDTO.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 deleted file mode 100644 index 826f5ce0..00000000 --- a/spring-boot2/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 diff --git a/spring-boot2/README.md b/spring-boot2/README.md deleted file mode 100644 index d43a1de3..00000000 --- a/spring-boot2/README.md +++ /dev/null @@ -1,27 +0,0 @@ - -# OpenAPI generated API stub - -Spring Framework stub - - -## 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. - -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 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 { - -} -``` diff --git a/spring-boot2/mvnw b/spring-boot2/mvnw deleted file mode 100755 index 41c0f0c2..00000000 --- a/spring-boot2/mvnw +++ /dev/null @@ -1,310 +0,0 @@ -#!/bin/sh -# ---------------------------------------------------------------------------- -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# ---------------------------------------------------------------------------- - -# ---------------------------------------------------------------------------- -# Maven Start Up Batch script -# -# Required ENV vars: -# ------------------ -# JAVA_HOME - location of a JDK home dir -# -# Optional ENV vars -# ----------------- -# M2_HOME - location of maven2's installed home dir -# MAVEN_OPTS - parameters passed to the Java VM when running Maven -# e.g. to debug Maven itself, use -# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -# MAVEN_SKIP_RC - flag to disable loading of mavenrc files -# ---------------------------------------------------------------------------- - -if [ -z "$MAVEN_SKIP_RC" ] ; then - - if [ -f /etc/mavenrc ] ; then - . /etc/mavenrc - fi - - if [ -f "$HOME/.mavenrc" ] ; then - . "$HOME/.mavenrc" - fi - -fi - -# OS specific support. $var _must_ be set to either true or false. -cygwin=false; -darwin=false; -mingw=false -case "`uname`" in - CYGWIN*) cygwin=true ;; - MINGW*) mingw=true;; - Darwin*) darwin=true - # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home - # See https://developer.apple.com/library/mac/qa/qa1170/_index.html - if [ -z "$JAVA_HOME" ]; then - if [ -x "/usr/libexec/java_home" ]; then - export JAVA_HOME="`/usr/libexec/java_home`" - else - export JAVA_HOME="/Library/Java/Home" - fi - fi - ;; -esac - -if [ -z "$JAVA_HOME" ] ; then - if [ -r /etc/gentoo-release ] ; then - JAVA_HOME=`java-config --jre-home` - fi -fi - -if [ -z "$M2_HOME" ] ; then - ## resolve links - $0 may be a link to maven's home - PRG="$0" - - # need this for relative symlinks - while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG="`dirname "$PRG"`/$link" - fi - done - - saveddir=`pwd` - - M2_HOME=`dirname "$PRG"`/.. - - # make it fully qualified - M2_HOME=`cd "$M2_HOME" && pwd` - - cd "$saveddir" - # echo Using m2 at $M2_HOME -fi - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --unix "$M2_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --unix "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --unix "$CLASSPATH"` -fi - -# For Mingw, ensure paths are in UNIX format before anything is touched -if $mingw ; then - [ -n "$M2_HOME" ] && - M2_HOME="`(cd "$M2_HOME"; pwd)`" - [ -n "$JAVA_HOME" ] && - JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`" -fi - -if [ -z "$JAVA_HOME" ]; then - javaExecutable="`which javac`" - if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then - # readlink(1) is not available as standard on Solaris 10. - readLink=`which readlink` - if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then - if $darwin ; then - javaHome="`dirname \"$javaExecutable\"`" - javaExecutable="`cd \"$javaHome\" && pwd -P`/javac" - else - javaExecutable="`readlink -f \"$javaExecutable\"`" - fi - javaHome="`dirname \"$javaExecutable\"`" - javaHome=`expr "$javaHome" : '\(.*\)/bin'` - JAVA_HOME="$javaHome" - export JAVA_HOME - fi - fi -fi - -if [ -z "$JAVACMD" ] ; then - 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 - else - JAVACMD="`which java`" - fi -fi - -if [ ! -x "$JAVACMD" ] ; then - echo "Error: JAVA_HOME is not defined correctly." >&2 - echo " We cannot execute $JAVACMD" >&2 - exit 1 -fi - -if [ -z "$JAVA_HOME" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." -fi - -CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher - -# traverses directory structure from process work directory to filesystem root -# first directory with .mvn subdirectory is considered project base directory -find_maven_basedir() { - - if [ -z "$1" ] - then - echo "Path not specified to find_maven_basedir" - return 1 - fi - - basedir="$1" - wdir="$1" - while [ "$wdir" != '/' ] ; do - if [ -d "$wdir"/.mvn ] ; then - basedir=$wdir - break - fi - # workaround for JBEAP-8937 (on Solaris 10/Sparc) - if [ -d "${wdir}" ]; then - wdir=`cd "$wdir/.."; pwd` - fi - # end of workaround - done - echo "${basedir}" -} - -# concatenates all lines of a file -concat_lines() { - if [ -f "$1" ]; then - echo "$(tr -s '\n' ' ' < "$1")" - fi -} - -BASE_DIR=`find_maven_basedir "$(pwd)"` -if [ -z "$BASE_DIR" ]; then - exit 1; -fi - -########################################################################################## -# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -# This allows using the maven wrapper in projects that prohibit checking in binary data. -########################################################################################## -if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found .mvn/wrapper/maven-wrapper.jar" - fi -else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..." - fi - if [ -n "$MVNW_REPOURL" ]; then - jarUrl="$MVNW_REPOURL/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - else - jarUrl="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - fi - while IFS="=" read key value; do - case "$key" in (wrapperUrl) jarUrl="$value"; break ;; - esac - done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties" - if [ "$MVNW_VERBOSE" = true ]; then - echo "Downloading from: $jarUrl" - fi - wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" - if $cygwin; then - wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"` - fi - - if command -v wget > /dev/null; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found wget ... using wget" - fi - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - wget "$jarUrl" -O "$wrapperJarPath" - else - wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" - fi - elif command -v curl > /dev/null; then - if [ "$MVNW_VERBOSE" = true ]; then - echo "Found curl ... using curl" - fi - if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then - curl -o "$wrapperJarPath" "$jarUrl" -f - else - curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f - fi - - else - if [ "$MVNW_VERBOSE" = true ]; then - echo "Falling back to using Java to download" - fi - javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java" - # For Cygwin, switch paths to Windows format before running javac - if $cygwin; then - javaClass=`cygpath --path --windows "$javaClass"` - fi - if [ -e "$javaClass" ]; then - if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Compiling MavenWrapperDownloader.java ..." - fi - # Compiling the Java class - ("$JAVA_HOME/bin/javac" "$javaClass") - fi - if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then - # Running the downloader - if [ "$MVNW_VERBOSE" = true ]; then - echo " - Running MavenWrapperDownloader.java ..." - fi - ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR") - fi - fi - fi -fi -########################################################################################## -# End of extension -########################################################################################## - -export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"} -if [ "$MVNW_VERBOSE" = true ]; then - echo $MAVEN_PROJECTBASEDIR -fi -MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" - -# For Cygwin, switch paths to Windows format before running java -if $cygwin; then - [ -n "$M2_HOME" ] && - M2_HOME=`cygpath --path --windows "$M2_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` - [ -n "$CLASSPATH" ] && - CLASSPATH=`cygpath --path --windows "$CLASSPATH"` - [ -n "$MAVEN_PROJECTBASEDIR" ] && - MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"` -fi - -# Provide a "standardized" way to retrieve the CLI args that will -# work with both Windows and non-Windows executions. -MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@" -export MAVEN_CMD_LINE_ARGS - -WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -exec "$JAVACMD" \ - $MAVEN_OPTS \ - -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ - "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ - ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/spring-boot2/mvnw.cmd b/spring-boot2/mvnw.cmd deleted file mode 100644 index 86115719..00000000 --- a/spring-boot2/mvnw.cmd +++ /dev/null @@ -1,182 +0,0 @@ -@REM ---------------------------------------------------------------------------- -@REM Licensed to the Apache Software Foundation (ASF) under one -@REM or more contributor license agreements. See the NOTICE file -@REM distributed with this work for additional information -@REM regarding copyright ownership. The ASF licenses this file -@REM to you under the Apache License, Version 2.0 (the -@REM "License"); you may not use this file except in compliance -@REM with the License. You may obtain a copy of the License at -@REM -@REM http://www.apache.org/licenses/LICENSE-2.0 -@REM -@REM Unless required by applicable law or agreed to in writing, -@REM software distributed under the License is distributed on an -@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -@REM KIND, either express or implied. See the License for the -@REM specific language governing permissions and limitations -@REM under the License. -@REM ---------------------------------------------------------------------------- - -@REM ---------------------------------------------------------------------------- -@REM Maven Start Up Batch script -@REM -@REM Required ENV vars: -@REM JAVA_HOME - location of a JDK home dir -@REM -@REM Optional ENV vars -@REM M2_HOME - location of maven2's installed home dir -@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands -@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending -@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven -@REM e.g. to debug Maven itself, use -@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files -@REM ---------------------------------------------------------------------------- - -@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' -@echo off -@REM set title of command window -title %0 -@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' -@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% - -@REM set %HOME% to equivalent of $HOME -if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") - -@REM Execute a user defined script before this one -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre -@REM check for pre script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat" -if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd" -:skipRcPre - -@setlocal - -set ERROR_CODE=0 - -@REM To isolate internal variables from possible post scripts, we use another setlocal -@setlocal - -@REM ==== START VALIDATION ==== -if not "%JAVA_HOME%" == "" goto OkJHome - -echo. -echo Error: JAVA_HOME not found in your environment. >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -:OkJHome -if exist "%JAVA_HOME%\bin\java.exe" goto init - -echo. -echo Error: JAVA_HOME is set to an invalid directory. >&2 -echo JAVA_HOME = "%JAVA_HOME%" >&2 -echo Please set the JAVA_HOME variable in your environment to match the >&2 -echo location of your Java installation. >&2 -echo. -goto error - -@REM ==== END VALIDATION ==== - -:init - -@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". -@REM Fallback to current working directory if not found. - -set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% -IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir - -set EXEC_DIR=%CD% -set WDIR=%EXEC_DIR% -:findBaseDir -IF EXIST "%WDIR%"\.mvn goto baseDirFound -cd .. -IF "%WDIR%"=="%CD%" goto baseDirNotFound -set WDIR=%CD% -goto findBaseDir - -:baseDirFound -set MAVEN_PROJECTBASEDIR=%WDIR% -cd "%EXEC_DIR%" -goto endDetectBaseDir - -:baseDirNotFound -set MAVEN_PROJECTBASEDIR=%EXEC_DIR% -cd "%EXEC_DIR%" - -:endDetectBaseDir - -IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig - -@setlocal EnableExtensions EnableDelayedExpansion -for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a -@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% - -:endReadAdditionalConfig - -SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" -set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" -set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain - -set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - -FOR /F "tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( - IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B -) - -@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central -@REM This allows using the maven wrapper in projects that prohibit checking in binary data. -if exist %WRAPPER_JAR% ( - if "%MVNW_VERBOSE%" == "true" ( - echo Found %WRAPPER_JAR% - ) -) else ( - if not "%MVNW_REPOURL%" == "" ( - SET DOWNLOAD_URL="%MVNW_REPOURL%/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar" - ) - if "%MVNW_VERBOSE%" == "true" ( - echo Couldn't find %WRAPPER_JAR%, downloading it ... - echo Downloading from: %DOWNLOAD_URL% - ) - - powershell -Command "&{"^ - "$webclient = new-object System.Net.WebClient;"^ - "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ - "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ - "}"^ - "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^ - "}" - if "%MVNW_VERBOSE%" == "true" ( - echo Finished downloading %WRAPPER_JAR% - ) -) -@REM End of extension - -@REM Provide a "standardized" way to retrieve the CLI args that will -@REM work with both Windows and non-Windows executions. -set MAVEN_CMD_LINE_ARGS=%* - -%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* -if ERRORLEVEL 1 goto error -goto end - -:error -set ERROR_CODE=1 - -:end -@endlocal & set ERROR_CODE=%ERROR_CODE% - -if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost -@REM check for post script, once with legacy .bat ending and once with .cmd ending -if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat" -if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd" -:skipRcPost - -@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' -if "%MAVEN_BATCH_PAUSE%" == "on" pause - -if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE% - -exit /B %ERROR_CODE% diff --git a/spring-boot2/pom.xml b/spring-boot2/pom.xml deleted file mode 100644 index 729c5c35..00000000 --- a/spring-boot2/pom.xml +++ /dev/null @@ -1,74 +0,0 @@ - - 4.0.0 - com.apollo - apollo-openapi-server - jar - apollo-openapi-server - 0.3.8 - - 1.8 - ${java.version} - ${java.version} - UTF-8 - 1.6.14 - 4.15.5 - - - org.springframework.boot - spring-boot-starter-parent - 2.7.6 - - - - src/main/java - - - - org.springframework.boot - spring-boot-starter-web - - - org.springframework.data - spring-data-commons - - - - org.springdoc - springdoc-openapi-ui - ${springdoc.version} - - - - com.google.code.findbugs - jsr305 - 3.0.2 - - - com.fasterxml.jackson.dataformat - jackson-dataformat-yaml - - - com.fasterxml.jackson.datatype - jackson-datatype-jsr310 - - - org.openapitools - jackson-databind-nullable - 0.2.6 - - - - org.springframework.boot - spring-boot-starter-validation - - - com.fasterxml.jackson.core - jackson-databind - - - org.springframework.boot - spring-boot-starter-test - test - - - 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 deleted file mode 100644 index 644633a0..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/OpenApiGeneratorApplication.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.apollo.openapi.server; - -import com.fasterxml.jackson.databind.Module; -import org.openapitools.jackson.nullable.JsonNullableModule; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.FilterType; -import org.springframework.context.annotation.FullyQualifiedAnnotationBeanNameGenerator; - -@SpringBootApplication( - nameGenerator = FullyQualifiedAnnotationBeanNameGenerator.class -) -@ComponentScan( - basePackages = {"com.apollo.openapi.server", "com.apollo.openapi.server.api" , "com.apollo.openapi.server.config"}, - nameGenerator = FullyQualifiedAnnotationBeanNameGenerator.class -) -public class OpenApiGeneratorApplication { - - public static void main(String[] args) { - SpringApplication.run(OpenApiGeneratorApplication.class, args); - } - - @Bean(name = "com.apollo.openapi.server.OpenApiGeneratorApplication.jsonNullableModule") - public Module jsonNullableModule() { - return new JsonNullableModule(); - } - -} 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 deleted file mode 100644 index 53fb8010..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/RFC3339DateFormat.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.apollo.openapi.server; - -import com.fasterxml.jackson.databind.util.StdDateFormat; - -import java.text.DateFormat; -import java.text.FieldPosition; -import java.text.ParsePosition; -import java.util.Date; -import java.util.GregorianCalendar; -import java.util.TimeZone; - -public class RFC3339DateFormat extends DateFormat { - private static final long serialVersionUID = 1L; - private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC"); - - private final StdDateFormat fmt = new StdDateFormat() - .withTimeZone(TIMEZONE_Z) - .withColonInTimeZone(true); - - public RFC3339DateFormat() { - this.calendar = new GregorianCalendar(); - } - - @Override - public Date parse(String source, ParsePosition pos) { - return fmt.parse(source, pos); - } - - @Override - public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) { - return fmt.format(date, toAppendTo, fieldPosition); - } - - @Override - public Object clone() { - return this; - } -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AccessKeyManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AccessKeyManagementApi.java deleted file mode 100644 index 72d3b091..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AccessKeyManagementApi.java +++ /dev/null @@ -1,221 +0,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.OpenAccessKeyDTO; -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Parameters; -import io.swagger.v3.oas.annotations.media.ArraySchema; -import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.security.SecurityRequirement; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.enums.ParameterIn; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.Valid; -import javax.validation.constraints.*; -import java.util.List; -import java.util.Map; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Validated -@Tag(name = "AccessKey Management", description = "AccessKey管理相关接口,包括AccessKey的创建、查询、删除、启用、禁用等操作") -public interface AccessKeyManagementApi { - - default AccessKeyManagementApiDelegate getDelegate() { - return new AccessKeyManagementApiDelegate() {}; - } - - /** - * POST /openapi/v1/apps/{appId}/envs/{env}/accesskeys : 创建AccessKey - * - * - * @param appId (required) - * @param env (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - */ - @Operation( - operationId = "createAccessKey", - summary = "创建AccessKey", - description = "", - tags = { "AccessKey Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAccessKeyDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/apps/{appId}/envs/{env}/accesskeys", - produces = { "application/json" } - ) - default ResponseEntity createAccessKey( - @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 = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().createAccessKey(appId, env, operator); - } - - - /** - * DELETE /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId} : 删除AccessKey - * - * - * @param appId (required) - * @param env (required) - * @param accessKeyId (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - */ - @Operation( - operationId = "deleteAccessKey", - summary = "删除AccessKey", - description = "", - tags = { "AccessKey Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.DELETE, - value = "/openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}" - ) - default ResponseEntity deleteAccessKey( - @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 = "accessKeyId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("accessKeyId") Long accessKeyId, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().deleteAccessKey(appId, env, accessKeyId, operator); - } - - - /** - * PUT /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/deactivation : 禁用AccessKey - * - * - * @param appId (required) - * @param env (required) - * @param accessKeyId (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - */ - @Operation( - operationId = "disableAccessKey", - summary = "禁用AccessKey", - description = "", - tags = { "AccessKey Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.PUT, - value = "/openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/deactivation" - ) - default ResponseEntity disableAccessKey( - @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 = "accessKeyId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("accessKeyId") Long accessKeyId, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().disableAccessKey(appId, env, accessKeyId, operator); - } - - - /** - * PUT /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/activation : 启用AccessKey - * - * - * @param appId (required) - * @param env (required) - * @param accessKeyId (required) - * @param mode (optional, default to 0) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - */ - @Operation( - operationId = "enableAccessKey", - summary = "启用AccessKey", - description = "", - tags = { "AccessKey Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.PUT, - value = "/openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/activation" - ) - default ResponseEntity enableAccessKey( - @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 = "accessKeyId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("accessKeyId") Long accessKeyId, - @Parameter(name = "mode", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "mode", required = false, defaultValue = "0") Integer mode, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().enableAccessKey(appId, env, accessKeyId, mode, operator); - } - - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/accesskeys : 查找AccessKey - * - * - * @param appId (required) - * @param env (required) - * @return (status code 200) - */ - @Operation( - operationId = "findAccessKeys", - summary = "查找AccessKey", - description = "", - tags = { "AccessKey Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenAccessKeyDTO.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/envs/{env}/accesskeys", - produces = { "application/json" } - ) - default ResponseEntity> findAccessKeys( - @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 - ) { - return getDelegate().findAccessKeys(appId, env); - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AccessKeyManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AccessKeyManagementApiController.java deleted file mode 100644 index ed156be8..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AccessKeyManagementApiController.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.OpenAccessKeyDTO; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.CookieValue; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Controller -@RequestMapping("${openapi.apolloOpen.base-path:}") -public class AccessKeyManagementApiController implements AccessKeyManagementApi { - - private final AccessKeyManagementApiDelegate delegate; - - public AccessKeyManagementApiController(@Autowired(required = false) AccessKeyManagementApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new AccessKeyManagementApiDelegate() {}); - } - - @Override - public AccessKeyManagementApiDelegate getDelegate() { - return delegate; - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AccessKeyManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AccessKeyManagementApiDelegate.java deleted file mode 100644 index 8e64b5ea..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AccessKeyManagementApiDelegate.java +++ /dev/null @@ -1,135 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.OpenAccessKeyDTO; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.context.request.NativeWebRequest; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -/** - * A delegate to be called by the {@link AccessKeyManagementApiController}}. - * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. - */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public interface AccessKeyManagementApiDelegate { - - default Optional getRequest() { - return Optional.empty(); - } - - /** - * POST /openapi/v1/apps/{appId}/envs/{env}/accesskeys : 创建AccessKey - * - * - * @param appId (required) - * @param env (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - * @see AccessKeyManagementApi#createAccessKey - */ - default ResponseEntity createAccessKey(String appId, - String env, - String operator) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"mode\" : 6, \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"id\" : 0, \"secret\" : \"secret\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"enabled\" : true }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * DELETE /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId} : 删除AccessKey - * - * - * @param appId (required) - * @param env (required) - * @param accessKeyId (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - * @see AccessKeyManagementApi#deleteAccessKey - */ - default ResponseEntity deleteAccessKey(String appId, - String env, - Long accessKeyId, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * PUT /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/deactivation : 禁用AccessKey - * - * - * @param appId (required) - * @param env (required) - * @param accessKeyId (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - * @see AccessKeyManagementApi#disableAccessKey - */ - default ResponseEntity disableAccessKey(String appId, - String env, - Long accessKeyId, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * PUT /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/activation : 启用AccessKey - * - * - * @param appId (required) - * @param env (required) - * @param accessKeyId (required) - * @param mode (optional, default to 0) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - * @see AccessKeyManagementApi#enableAccessKey - */ - default ResponseEntity enableAccessKey(String appId, - String env, - Long accessKeyId, - Integer mode, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/accesskeys : 查找AccessKey - * - * - * @param appId (required) - * @param env (required) - * @return (status code 200) - * @see AccessKeyManagementApi#findAccessKeys - */ - default ResponseEntity> findAccessKeys(String appId, - String env) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"mode\" : 6, \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"id\" : 0, \"secret\" : \"secret\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"enabled\" : true }, { \"mode\" : 6, \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"dataChangeCreatedTime\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"id\" : 0, \"secret\" : \"secret\", \"dataChangeLastModifiedTime\" : \"dataChangeLastModifiedTime\", \"enabled\" : true } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ApiUtil.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ApiUtil.java deleted file mode 100644 index d76ec63b..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ApiUtil.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.apollo.openapi.server.api; - -import org.springframework.web.context.request.NativeWebRequest; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; - -public class ApiUtil { - public static void setExampleResponse(NativeWebRequest req, String contentType, String example) { - try { - HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class); - res.setCharacterEncoding("UTF-8"); - res.addHeader("Content-Type", contentType); - res.getWriter().print(example); - } catch (IOException e) { - throw new RuntimeException(e); - } - } -} 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 deleted file mode 100644 index 0ac4d2c1..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApi.java +++ /dev/null @@ -1,469 +0,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.ExceptionResponse; -import com.apollo.openapi.server.model.OpenAppDTO; -import com.apollo.openapi.server.model.OpenCreateAppDTO; -import com.apollo.openapi.server.model.OpenEnvClusterDTO; -import com.apollo.openapi.server.model.OpenEnvClusterInfo; -import com.apollo.openapi.server.model.OpenMissEnvDTO; -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Parameters; -import io.swagger.v3.oas.annotations.media.ArraySchema; -import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.security.SecurityRequirement; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.enums.ParameterIn; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.Valid; -import javax.validation.constraints.*; -import java.util.List; -import java.util.Map; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Validated -@Tag(name = "App Management", description = "应用管理相关接口,包括应用的创建、查询、更新、删除等操作") -public interface AppManagementApi { - - default AppManagementApiDelegate getDelegate() { - return new AppManagementApiDelegate() {}; - } - - /** - * POST /openapi/v1/apps : 创建应用 (original openapi) - * POST /openapi/v1/apps - * - * @param openCreateAppDTO (required) - * @return 应用创建成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - */ - @Operation( - operationId = "createApp", - summary = "创建应用 (original openapi)", - description = "POST /openapi/v1/apps", - tags = { "App Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "应用创建成功"), - @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/apps", - produces = { "application/json" }, - consumes = { "application/json" } - ) - default ResponseEntity createApp( - @Parameter(name = "OpenCreateAppDTO", description = "", required = true) @Valid @RequestBody OpenCreateAppDTO openCreateAppDTO - ) { - return getDelegate().createApp(openCreateAppDTO); - } - - - /** - * POST /openapi/v1/apps/envs/{env} : 在指定环境创建应用(new added) - * POST /openapi/v1/apps/envs/{env} - * - * @param env 环境标识,例如 DEV、FAT、UAT、PROD (required) - * @param openAppDTO (required) - * @param operator 操作人用户名 (optional) - * @return 应用在指定环境创建成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - */ - @Operation( - operationId = "createAppInEnv", - summary = "在指定环境创建应用(new added)", - description = "POST /openapi/v1/apps/envs/{env}", - tags = { "App Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "应用在指定环境创建成功"), - @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/apps/envs/{env}", - produces = { "application/json" }, - consumes = { "application/json" } - ) - default ResponseEntity createAppInEnv( - @Parameter(name = "env", description = "环境标识,例如 DEV、FAT、UAT、PROD", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "OpenAppDTO", description = "", required = true) @Valid @RequestBody OpenAppDTO openAppDTO, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().createAppInEnv(env, openAppDTO, operator); - } - - - /** - * DELETE /openapi/v1/apps/{appId} : 删除应用(new added) - * DELETE /openapi/v1/apps/{appId} - * - * @param appId 应用ID (required) - * @param operator 操作人用户名 (optional) - * @return 应用删除成功 (status code 200) - * or 权限不足,需要超级管理员权限 (status code 403) - * or 应用不存在 (status code 404) - */ - @Operation( - operationId = "deleteApp", - summary = "删除应用(new added)", - description = "DELETE /openapi/v1/apps/{appId}", - tags = { "App Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "应用删除成功"), - @ApiResponse(responseCode = "403", description = "权限不足,需要超级管理员权限", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "404", description = "应用不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.DELETE, - value = "/openapi/v1/apps/{appId}", - produces = { "application/json" } - ) - default ResponseEntity deleteApp( - @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().deleteApp(appId, operator); - } - - - /** - * GET /openapi/v1/apps : 查找应用 (original openapi) - * POST /openapi/v1/apps - * - * @param appIds 查找应用 (optional) - * @return 成功获取应用列表 (status code 200) - * or 未授权访问 (status code 401) - */ - @Operation( - operationId = "findApps", - summary = "查找应用 (original openapi)", - description = "POST /openapi/v1/apps", - tags = { "App Management" }, - responses = { - @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 = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps", - produces = { "application/json" } - ) - default ResponseEntity> findApps( - @Parameter(name = "appIds", description = "查找应用", in = ParameterIn.QUERY) @Valid @RequestParam(value = "appIds", required = false) String appIds - ) { - return getDelegate().findApps(appIds); - } - - - /** - * GET /openapi/v1/apps/authorized : 获取当前Consumer授权的应用列表 (original openapi) - * GET /openapi/v1/apps/authorized - * - * @return 成功获取授权应用列表 (status code 200) - * or 未授权访问 (status code 401) - */ - @Operation( - 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", array = @ArraySchema(schema = @Schema(implementation = OpenAppDTO.class))) - }), - @ApiResponse(responseCode = "401", description = "未授权访问", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/authorized", - produces = { "application/json" } - ) - default ResponseEntity> findAppsAuthorized( - - ) { - return getDelegate().findAppsAuthorized(); - } - - - /** - * GET /openapi/v1/apps/{appId}/miss-envs : 查找缺失的环境(new added) - * GET /openapi/v1/apps/{appId}/miss-envs - * - * @param appId 应用ID (required) - * @return 成功获取应用缺失的环境列表 (status code 200) - * or 应用不存在 (status code 404) - */ - @Operation( - 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 = OpenMissEnvDTO.class))) - }), - @ApiResponse(responseCode = "404", description = "应用不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/miss-envs", - produces = { "application/json" } - ) - default ResponseEntity> findMissEnvs( - @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId - ) { - return getDelegate().findMissEnvs(appId); - } - - - /** - * GET /openapi/v1/apps/{appId} : 获取单个应用信息(new added) - * GET /openapi/v1/apps/{appId} - * - * @param appId (required) - * @return 成功获取应用信息 (status code 200) - * or 应用不存在 (status code 404) - */ - @Operation( - operationId = "getApp", - summary = "获取单个应用信息(new added)", - description = "GET /openapi/v1/apps/{appId}", - tags = { "App Management" }, - responses = { - @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 = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}", - produces = { "application/json" } - ) - default ResponseEntity getApp( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId - ) { - return getDelegate().getApp(appId); - } - - - /** - * GET /openapi/v1/apps/by-self : 获取当前Consumer/User的应用列表(分页)(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 = "getAppsBySelf", - summary = "获取当前Consumer/User的应用列表(分页)(new added)", - description = "GET /openapi/v1/apps/by-self", - tags = { "App Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取Consumer的应用列表", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenAppDTO.class))) - }), - @ApiResponse(responseCode = "401", description = "未授权访问", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/by-self", - produces = { "application/json" } - ) - default ResponseEntity> getAppsBySelf( - @NotNull @Min(0) @Parameter(name = "page", description = "页数", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = true) Integer page, - @NotNull @Min(0) @Parameter(name = "size", description = "页大小", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = true) Integer size - ) { - return getDelegate().getAppsBySelf(page, size); - } - - - /** - * GET /openapi/v1/apps/{appId}/env-cluster-info : 获取应用环境集群详情(new added) - * /openapi/v1/apps/{appId}/env-cluster-info - * - * @param appId 应用ID (required) - * @return 成功获取应用环境集群详情 (status code 200) - */ - @Operation( - operationId = "getEnvClusterInfo", - summary = "获取应用环境集群详情(new added)", - description = "/openapi/v1/apps/{appId}/env-cluster-info", - tags = { "App Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取应用环境集群详情", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenEnvClusterInfo.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/env-cluster-info", - produces = { "application/json" } - ) - default ResponseEntity> getEnvClusterInfo( - @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId - ) { - return getDelegate().getEnvClusterInfo(appId); - } - - - /** - * GET /openapi/v1/apps/{appId}/envclusters : 获取应用的环境集群信息 (original openapi) - * GET /openapi/v1/apps/{appId}/envclusters - * - * @param appId 应用ID (required) - * @return 成功获取应用环境集群信息 (status code 200) - * or 应用不存在 (status code 404) - */ - @Operation( - operationId = "getEnvClusters", - 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 = OpenEnvClusterDTO.class))) - }), - @ApiResponse(responseCode = "404", description = "应用不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/envclusters", - produces = { "application/json" } - ) - default ResponseEntity> getEnvClusters( - @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId - ) { - return getDelegate().getEnvClusters(appId); - } - - - /** - * PUT /openapi/v1/apps/{appId} : 更新应用(new added) - * PUT /openapi/v1/apps/{appId} - * - * @param appId 应用ID (required) - * @param openAppDTO (required) - * @param operator 操作人用户名 (optional) - * @return 应用更新成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - */ - @Operation( - operationId = "updateApp", - summary = "更新应用(new added)", - description = "PUT /openapi/v1/apps/{appId}", - tags = { "App Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "应用更新成功"), - @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.PUT, - value = "/openapi/v1/apps/{appId}", - produces = { "application/json" }, - consumes = { "application/json" } - ) - default ResponseEntity updateApp( - @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "OpenAppDTO", description = "", required = true) @Valid @RequestBody OpenAppDTO openAppDTO, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().updateApp(appId, openAppDTO, operator); - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiController.java deleted file mode 100644 index cd7ba6b4..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiController.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.ExceptionResponse; -import com.apollo.openapi.server.model.OpenAppDTO; -import com.apollo.openapi.server.model.OpenCreateAppDTO; -import com.apollo.openapi.server.model.OpenEnvClusterDTO; -import com.apollo.openapi.server.model.OpenEnvClusterInfo; -import com.apollo.openapi.server.model.OpenMissEnvDTO; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.CookieValue; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Controller -@RequestMapping("${openapi.apolloOpen.base-path:}") -public class AppManagementApiController implements AppManagementApi { - - private final AppManagementApiDelegate delegate; - - public AppManagementApiController(@Autowired(required = false) AppManagementApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new AppManagementApiDelegate() {}); - } - - @Override - public AppManagementApiDelegate getDelegate() { - return delegate; - } - -} 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 deleted file mode 100644 index c189ccf7..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppManagementApiDelegate.java +++ /dev/null @@ -1,262 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.ExceptionResponse; -import com.apollo.openapi.server.model.OpenAppDTO; -import com.apollo.openapi.server.model.OpenCreateAppDTO; -import com.apollo.openapi.server.model.OpenEnvClusterDTO; -import com.apollo.openapi.server.model.OpenEnvClusterInfo; -import com.apollo.openapi.server.model.OpenMissEnvDTO; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.context.request.NativeWebRequest; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -/** - * A delegate to be called by the {@link AppManagementApiController}}. - * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. - */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public interface AppManagementApiDelegate { - - default Optional getRequest() { - return Optional.empty(); - } - - /** - * POST /openapi/v1/apps : 创建应用 (original openapi) - * POST /openapi/v1/apps - * - * @param openCreateAppDTO (required) - * @return 应用创建成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see AppManagementApi#createApp - */ - default ResponseEntity createApp(OpenCreateAppDTO openCreateAppDTO) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/apps/envs/{env} : 在指定环境创建应用(new added) - * POST /openapi/v1/apps/envs/{env} - * - * @param env 环境标识,例如 DEV、FAT、UAT、PROD (required) - * @param openAppDTO (required) - * @param operator 操作人用户名 (optional) - * @return 应用在指定环境创建成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see AppManagementApi#createAppInEnv - */ - default ResponseEntity createAppInEnv(String env, - OpenAppDTO openAppDTO, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * DELETE /openapi/v1/apps/{appId} : 删除应用(new added) - * DELETE /openapi/v1/apps/{appId} - * - * @param appId 应用ID (required) - * @param operator 操作人用户名 (optional) - * @return 应用删除成功 (status code 200) - * or 权限不足,需要超级管理员权限 (status code 403) - * or 应用不存在 (status code 404) - * @see AppManagementApi#deleteApp - */ - default ResponseEntity deleteApp(String appId, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps : 查找应用 (original openapi) - * POST /openapi/v1/apps - * - * @param appIds 查找应用 (optional) - * @return 成功获取应用列表 (status code 200) - * or 未授权访问 (status code 401) - * @see AppManagementApi#findApps - */ - default ResponseEntity> findApps(String appIds) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"orgName\" : \"orgName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"ownerDisplayName\" : \"ownerDisplayName\", \"appId\" : \"appId\", \"name\" : \"name\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"orgName\" : \"orgName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"ownerDisplayName\" : \"ownerDisplayName\", \"appId\" : \"appId\", \"name\" : \"name\" } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/authorized : 获取当前Consumer授权的应用列表 (original openapi) - * GET /openapi/v1/apps/authorized - * - * @return 成功获取授权应用列表 (status code 200) - * or 未授权访问 (status code 401) - * @see AppManagementApi#findAppsAuthorized - */ - default ResponseEntity> findAppsAuthorized() { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"orgName\" : \"orgName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"ownerDisplayName\" : \"ownerDisplayName\", \"appId\" : \"appId\", \"name\" : \"name\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"orgName\" : \"orgName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"ownerDisplayName\" : \"ownerDisplayName\", \"appId\" : \"appId\", \"name\" : \"name\" } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/miss-envs : 查找缺失的环境(new added) - * GET /openapi/v1/apps/{appId}/miss-envs - * - * @param appId 应用ID (required) - * @return 成功获取应用缺失的环境列表 (status code 200) - * or 应用不存在 (status code 404) - * @see AppManagementApi#findMissEnvs - */ - default ResponseEntity> findMissEnvs(String appId) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"code\" : 0, \"message\" : \"message\" }, { \"code\" : 0, \"message\" : \"message\" } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId} : 获取单个应用信息(new added) - * GET /openapi/v1/apps/{appId} - * - * @param appId (required) - * @return 成功获取应用信息 (status code 200) - * or 应用不存在 (status code 404) - * @see AppManagementApi#getApp - */ - default ResponseEntity getApp(String appId) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"orgName\" : \"orgName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"ownerDisplayName\" : \"ownerDisplayName\", \"appId\" : \"appId\", \"name\" : \"name\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/by-self : 获取当前Consumer/User的应用列表(分页)(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#getAppsBySelf - */ - 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 = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"orgName\" : \"orgName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"ownerDisplayName\" : \"ownerDisplayName\", \"appId\" : \"appId\", \"name\" : \"name\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"orgName\" : \"orgName\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"orgId\" : \"orgId\", \"ownerEmail\" : \"ownerEmail\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"ownerName\" : \"ownerName\", \"ownerDisplayName\" : \"ownerDisplayName\", \"appId\" : \"appId\", \"name\" : \"name\" } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/env-cluster-info : 获取应用环境集群详情(new added) - * /openapi/v1/apps/{appId}/env-cluster-info - * - * @param appId 应用ID (required) - * @return 成功获取应用环境集群详情 (status code 200) - * @see AppManagementApi#getEnvClusterInfo - */ - 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 = "[ { \"code\" : 0, \"message\" : \"message\", \"env\" : \"env\", \"clusters\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 1, \"comment\" : \"comment\", \"id\" : 6, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 1, \"comment\" : \"comment\", \"id\" : 6, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ] }, { \"code\" : 0, \"message\" : \"message\", \"env\" : \"env\", \"clusters\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 1, \"comment\" : \"comment\", \"id\" : 6, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 1, \"comment\" : \"comment\", \"id\" : 6, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ] } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/envclusters : 获取应用的环境集群信息 (original openapi) - * GET /openapi/v1/apps/{appId}/envclusters - * - * @param appId 应用ID (required) - * @return 成功获取应用环境集群信息 (status code 200) - * or 应用不存在 (status code 404) - * @see AppManagementApi#getEnvClusters - */ - default ResponseEntity> getEnvClusters(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\" : [ \"clusters\", \"clusters\" ] }, { \"env\" : \"env\", \"clusters\" : [ \"clusters\", \"clusters\" ] } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * PUT /openapi/v1/apps/{appId} : 更新应用(new added) - * PUT /openapi/v1/apps/{appId} - * - * @param appId 应用ID (required) - * @param openAppDTO (required) - * @param operator 操作人用户名 (optional) - * @return 应用更新成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see AppManagementApi#updateApp - */ - default ResponseEntity updateApp(String appId, - OpenAppDTO openAppDTO, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApi.java deleted file mode 100644 index d26ad663..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApi.java +++ /dev/null @@ -1,298 +0,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.ExceptionResponse; -import com.apollo.openapi.server.model.OpenAppNamespaceDTO; -import com.apollo.openapi.server.model.OpenNamespaceDTO; -import com.apollo.openapi.server.model.OpenNamespaceUsageDTO; -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Parameters; -import io.swagger.v3.oas.annotations.media.ArraySchema; -import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.security.SecurityRequirement; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.enums.ParameterIn; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.Valid; -import javax.validation.constraints.*; -import java.util.List; -import java.util.Map; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Validated -@Tag(name = "AppNamespace Management", description = "AppNamespace管理相关接口,包括创建、查询、删除等操作") -public interface AppNamespaceManagementApi { - - default AppNamespaceManagementApiDelegate getDelegate() { - return new AppNamespaceManagementApiDelegate() {}; - } - - /** - * POST /openapi/v1/apps/{appId}/appnamespaces : 创建AppNamespace (original openapi) - * POST /openapi/v1/apps/{appId}/appnamespaces - * - * @param appId (required) - * @param openAppNamespaceDTO (required) - * @param operator 操作人用户名 (optional) - * @return AppNamespace创建成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - */ - @Operation( - operationId = "createAppNamespace", - summary = "创建AppNamespace (original openapi)", - description = "POST /openapi/v1/apps/{appId}/appnamespaces", - tags = { "AppNamespace Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "AppNamespace创建成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAppNamespaceDTO.class)) - }), - @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/apps/{appId}/appnamespaces", - produces = { "application/json" }, - consumes = { "application/json" } - ) - default ResponseEntity createAppNamespace( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "OpenAppNamespaceDTO", description = "", required = true) @Valid @RequestBody OpenAppNamespaceDTO openAppNamespaceDTO, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().createAppNamespace(appId, openAppNamespaceDTO, operator); - } - - - /** - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 删除AppNamespace (new added) - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * - * @param appId 应用ID (required) - * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (optional) - * @return AppNamespace删除成功 (status code 200) - */ - @Operation( - operationId = "deleteAppNamespace", - summary = "删除AppNamespace (new added)", - description = "DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}", - tags = { "AppNamespace Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "AppNamespace删除成功") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.DELETE, - value = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" - ) - default ResponseEntity deleteAppNamespace( - @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().deleteAppNamespace(appId, namespaceName, operator); - } - - - /** - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 获取指定的AppNamespace (new added) - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * - * @param appId 应用ID (required) - * @param namespaceName 命名空间名称 (required) - * @param extendInfo (optional, default to false) - * @return 成功获取AppNamespace (status code 200) - */ - @Operation( - operationId = "findAppNamespace", - summary = "获取指定的AppNamespace (new added)", - description = "GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}", - tags = { "AppNamespace Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取AppNamespace", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAppNamespaceDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}", - produces = { "application/json" } - ) - default ResponseEntity findAppNamespace( - @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "extendInfo", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "extendInfo", required = false, defaultValue = "false") Boolean extendInfo - ) { - return getDelegate().findAppNamespace(appId, namespaceName, extendInfo); - } - - - /** - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage : 查询appnamespace使用情况(new added) - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage - * - * @param appId 应用ID (required) - * @param namespaceName 命名空间名称 (required) - * @return AppNamespaceUsage查询成功 (status code 200) - */ - @Operation( - operationId = "findAppNamespaceUsage", - summary = "查询appnamespace使用情况(new added)", - description = "GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage", - tags = { "AppNamespace Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "AppNamespaceUsage查询成功", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenNamespaceUsageDTO.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage", - produces = { "application/json" } - ) - default ResponseEntity> findAppNamespaceUsage( - @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName - ) { - return getDelegate().findAppNamespaceUsage(appId, namespaceName); - } - - - /** - * GET /openapi/v1/appnamespaces : 获取所有公共AppNamespace (new added) - * GET /openapi/v1/appnamespaces/public - * - * @return (status code 200) - */ - @Operation( - operationId = "getAppNamespaces", - summary = "获取所有公共AppNamespace (new added)", - description = "GET /openapi/v1/appnamespaces/public", - tags = { "AppNamespace Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenAppNamespaceDTO.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/appnamespaces", - produces = { "application/json" } - ) - default ResponseEntity> getAppNamespaces( - - ) { - return getDelegate().getAppNamespaces(); - } - - - /** - * GET /openapi/v1/apps/{appId}/appnamespaces : 获取指定应用的AppNamespace (new added) - * GET /openapi/v1/apps/{appId}/appnamespaces - * - * @param appId (required) - * @return (status code 200) - */ - @Operation( - operationId = "getAppNamespacesByAppId", - summary = "获取指定应用的AppNamespace (new added)", - description = "GET /openapi/v1/apps/{appId}/appnamespaces", - tags = { "AppNamespace Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenAppNamespaceDTO.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/appnamespaces", - produces = { "application/json" } - ) - default ResponseEntity> getAppNamespacesByAppId( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId - ) { - return getDelegate().getAppNamespacesByAppId(appId); - } - - - /** - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances : 获取公共AppNamespace的所有实例 (new added) - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * - * @param env 环境标识 (required) - * @param publicNamespaceName 公共命名空间名称 (required) - * @param page 页码,从0开始 (required) - * @param size 每页数量 (required) - * @return 成功获取实例列表 (status code 200) - */ - @Operation( - operationId = "getPublicAppNamespaceInstances", - summary = "获取公共AppNamespace的所有实例 (new added)", - description = "GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances", - tags = { "AppNamespace Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取实例列表", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenNamespaceDTO.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances", - produces = { "application/json" } - ) - default ResponseEntity> getPublicAppNamespaceInstances( - @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "publicNamespaceName", description = "公共命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("publicNamespaceName") String publicNamespaceName, - @NotNull @Parameter(name = "page", description = "页码,从0开始", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = true) Integer page, - @NotNull @Parameter(name = "size", description = "每页数量", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = true) Integer size - ) { - return getDelegate().getPublicAppNamespaceInstances(env, publicNamespaceName, page, size); - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApiController.java deleted file mode 100644 index 2668187b..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApiController.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.ExceptionResponse; -import com.apollo.openapi.server.model.OpenAppNamespaceDTO; -import com.apollo.openapi.server.model.OpenNamespaceDTO; -import com.apollo.openapi.server.model.OpenNamespaceUsageDTO; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.CookieValue; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Controller -@RequestMapping("${openapi.apolloOpen.base-path:}") -public class AppNamespaceManagementApiController implements AppNamespaceManagementApi { - - private final AppNamespaceManagementApiDelegate delegate; - - public AppNamespaceManagementApiController(@Autowired(required = false) AppNamespaceManagementApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new AppNamespaceManagementApiDelegate() {}); - } - - @Override - public AppNamespaceManagementApiDelegate getDelegate() { - return delegate; - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApiDelegate.java deleted file mode 100644 index e464e544..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/AppNamespaceManagementApiDelegate.java +++ /dev/null @@ -1,195 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.ExceptionResponse; -import com.apollo.openapi.server.model.OpenAppNamespaceDTO; -import com.apollo.openapi.server.model.OpenNamespaceDTO; -import com.apollo.openapi.server.model.OpenNamespaceUsageDTO; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.context.request.NativeWebRequest; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -/** - * A delegate to be called by the {@link AppNamespaceManagementApiController}}. - * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. - */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public interface AppNamespaceManagementApiDelegate { - - default Optional getRequest() { - return Optional.empty(); - } - - /** - * POST /openapi/v1/apps/{appId}/appnamespaces : 创建AppNamespace (original openapi) - * POST /openapi/v1/apps/{appId}/appnamespaces - * - * @param appId (required) - * @param openAppNamespaceDTO (required) - * @param operator 操作人用户名 (optional) - * @return AppNamespace创建成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see AppNamespaceManagementApi#createAppNamespace - */ - default ResponseEntity createAppNamespace(String appId, - OpenAppNamespaceDTO openAppNamespaceDTO, - String operator) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 删除AppNamespace (new added) - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * - * @param appId 应用ID (required) - * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (optional) - * @return AppNamespace删除成功 (status code 200) - * @see AppNamespaceManagementApi#deleteAppNamespace - */ - default ResponseEntity deleteAppNamespace(String appId, - String namespaceName, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} : 获取指定的AppNamespace (new added) - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * - * @param appId 应用ID (required) - * @param namespaceName 命名空间名称 (required) - * @param extendInfo (optional, default to false) - * @return 成功获取AppNamespace (status code 200) - * @see AppNamespaceManagementApi#findAppNamespace - */ - default ResponseEntity findAppNamespace(String appId, - String namespaceName, - Boolean extendInfo) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage : 查询appnamespace使用情况(new added) - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage - * - * @param appId 应用ID (required) - * @param namespaceName 命名空间名称 (required) - * @return AppNamespaceUsage查询成功 (status code 200) - * @see AppNamespaceManagementApi#findAppNamespaceUsage - */ - default ResponseEntity> findAppNamespaceUsage(String appId, - String namespaceName) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"branchInstanceCount\" : 6, \"envName\" : \"envName\", \"instanceCount\" : 0, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"linkedNamespaceCount\" : 1, \"namespaceName\" : \"namespaceName\" }, { \"branchInstanceCount\" : 6, \"envName\" : \"envName\", \"instanceCount\" : 0, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"linkedNamespaceCount\" : 1, \"namespaceName\" : \"namespaceName\" } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/appnamespaces : 获取所有公共AppNamespace (new added) - * GET /openapi/v1/appnamespaces/public - * - * @return (status code 200) - * @see AppNamespaceManagementApi#getAppNamespaces - */ - default ResponseEntity> getAppNamespaces() { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"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\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/appnamespaces : 获取指定应用的AppNamespace (new added) - * GET /openapi/v1/apps/{appId}/appnamespaces - * - * @param appId (required) - * @return (status code 200) - * @see AppNamespaceManagementApi#getAppNamespacesByAppId - */ - default ResponseEntity> getAppNamespacesByAppId(String appId) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"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\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appendNamespacePrefix\" : true, \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"format\" : \"format\", \"isPublic\" : true, \"comment\" : \"comment\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances : 获取公共AppNamespace的所有实例 (new added) - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * - * @param env 环境标识 (required) - * @param publicNamespaceName 公共命名空间名称 (required) - * @param page 页码,从0开始 (required) - * @param size 每页数量 (required) - * @return 成功获取实例列表 (status code 200) - * @see AppNamespaceManagementApi#getPublicAppNamespaceInstances - */ - default ResponseEntity> getPublicAppNamespaceInstances(String env, - String publicNamespaceName, - Integer page, - Integer size) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"extendInfo\" : { \"parentAppId\" : \"parentAppId\", \"isConfigHidden\" : true, \"itemModifiedCnt\" : 0 }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"namespaceName\" : \"namespaceName\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"extendInfo\" : { \"parentAppId\" : \"parentAppId\", \"isConfigHidden\" : true, \"itemModifiedCnt\" : 0 }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"namespaceName\" : \"namespaceName\" } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApi.java deleted file mode 100644 index e341a38c..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApi.java +++ /dev/null @@ -1,176 +0,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.ExceptionResponse; -import com.apollo.openapi.server.model.OpenClusterDTO; -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Parameters; -import io.swagger.v3.oas.annotations.media.ArraySchema; -import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.security.SecurityRequirement; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.enums.ParameterIn; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.Valid; -import javax.validation.constraints.*; -import java.util.List; -import java.util.Map; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Validated -@Tag(name = "Cluster Management", description = "集群管理相关接口,包括集群的创建、查询、删除等操作") -public interface ClusterManagementApi { - - default ClusterManagementApiDelegate getDelegate() { - return new ClusterManagementApiDelegate() {}; - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters : 创建集群 (original openapi) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters - * - * @param appId 应用ID (required) - * @param env (required) - * @param openClusterDTO (required) - * @return 集群创建成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - */ - @Operation( - operationId = "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 = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters", - produces = { "application/json" }, - consumes = { "application/json" } - ) - 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().createCluster(appId, env, openClusterDTO); - } - - - /** - * 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 操作人用户名,openapi外部调用时需传入 (optional) - * @return 集群删除成功 (status code 200) - * or 删除失败,集群可能包含配置 (status code 400) - * or 权限不足 (status code 403) - * or 集群不存在 (status code 404) - */ - @Operation( - operationId = "deleteCluster", - summary = "删除集群 (new added)", - description = "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}", - tags = { "Cluster Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "集群删除成功"), - @ApiResponse(responseCode = "400", description = "删除失败,集群可能包含配置", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "404", description = "集群不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.DELETE, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}", - produces = { "application/json" } - ) - 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, - @Parameter(name = "operator", description = "操作人用户名,openapi外部调用时需传入", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().deleteCluster(env, appId, clusterName, operator); - } - - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} : 获取指定集群信息 (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - * - * @param appId (required) - * @param clusterName (required) - * @param env (required) - * @return 成功获取集群信息 (status code 200) - * or 集群不存在 (status code 404) - */ - @Operation( - 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 = OpenClusterDTO.class)) - }), - @ApiResponse(responseCode = "404", description = "集群不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}", - produces = { "application/json" } - ) - default ResponseEntity getCluster( - @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 = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env - ) { - 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 deleted file mode 100644 index ceb349b9..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiController.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.ExceptionResponse; -import com.apollo.openapi.server.model.OpenClusterDTO; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.CookieValue; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Controller -@RequestMapping("${openapi.apolloOpen.base-path:}") -public class ClusterManagementApiController implements ClusterManagementApi { - - private final ClusterManagementApiDelegate delegate; - - public ClusterManagementApiController(@Autowired(required = false) ClusterManagementApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new ClusterManagementApiDelegate() {}); - } - - @Override - public ClusterManagementApiDelegate getDelegate() { - return delegate; - } - -} 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 deleted file mode 100644 index 6675d450..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ClusterManagementApiDelegate.java +++ /dev/null @@ -1,104 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.ExceptionResponse; -import com.apollo.openapi.server.model.OpenClusterDTO; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.context.request.NativeWebRequest; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -/** - * A delegate to be called by the {@link ClusterManagementApiController}}. - * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. - */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public interface ClusterManagementApiDelegate { - - default Optional getRequest() { - return Optional.empty(); - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters : 创建集群 (original openapi) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters - * - * @param appId 应用ID (required) - * @param env (required) - * @param openClusterDTO (required) - * @return 集群创建成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see ClusterManagementApi#createCluster - */ - 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 = "{ \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 1, \"comment\" : \"comment\", \"id\" : 6, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * 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 操作人用户名,openapi外部调用时需传入 (optional) - * @return 集群删除成功 (status code 200) - * or 删除失败,集群可能包含配置 (status code 400) - * or 权限不足 (status code 403) - * or 集群不存在 (status code 404) - * @see ClusterManagementApi#deleteCluster - */ - default ResponseEntity deleteCluster(String env, - String appId, - String clusterName, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} : 获取指定集群信息 (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - * - * @param appId (required) - * @param clusterName (required) - * @param env (required) - * @return 成功获取集群信息 (status code 200) - * or 集群不存在 (status code 404) - * @see ClusterManagementApi#getCluster - */ - default ResponseEntity getCluster(String appId, - String clusterName, - String env) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"name\" : \"name\", \"parentClusterId\" : 1, \"comment\" : \"comment\", \"id\" : 6, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/EnvironmentManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/EnvironmentManagementApi.java deleted file mode 100644 index d1192014..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/EnvironmentManagementApi.java +++ /dev/null @@ -1,70 +0,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 io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Parameters; -import io.swagger.v3.oas.annotations.media.ArraySchema; -import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.security.SecurityRequirement; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.enums.ParameterIn; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.Valid; -import javax.validation.constraints.*; -import java.util.List; -import java.util.Map; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Validated -@Tag(name = "Environment Management", description = "环境管理相关接口,包括环境查询等功能") -public interface EnvironmentManagementApi { - - default EnvironmentManagementApiDelegate getDelegate() { - return new EnvironmentManagementApiDelegate() {}; - } - - /** - * GET /openapi/v1/envs : 获取所有环境 - * GET /openapi/v1/envs - * - * @return 成功获取环境列表 (status code 200) - */ - @Operation( - operationId = "getEnvs", - summary = "获取所有环境", - description = "GET /openapi/v1/envs", - tags = { "Environment Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取环境列表", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = String.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs", - produces = { "application/json" } - ) - default ResponseEntity> getEnvs( - - ) { - return getDelegate().getEnvs(); - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/EnvironmentManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/EnvironmentManagementApiController.java deleted file mode 100644 index 30623c1f..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/EnvironmentManagementApiController.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.apollo.openapi.server.api; - - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.CookieValue; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Controller -@RequestMapping("${openapi.apolloOpen.base-path:}") -public class EnvironmentManagementApiController implements EnvironmentManagementApi { - - private final EnvironmentManagementApiDelegate delegate; - - public EnvironmentManagementApiController(@Autowired(required = false) EnvironmentManagementApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new EnvironmentManagementApiDelegate() {}); - } - - @Override - public EnvironmentManagementApiDelegate getDelegate() { - return delegate; - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/EnvironmentManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/EnvironmentManagementApiDelegate.java deleted file mode 100644 index 15d71730..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/EnvironmentManagementApiDelegate.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.apollo.openapi.server.api; - -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.context.request.NativeWebRequest; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -/** - * A delegate to be called by the {@link EnvironmentManagementApiController}}. - * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. - */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public interface EnvironmentManagementApiDelegate { - - default Optional getRequest() { - return Optional.empty(); - } - - /** - * GET /openapi/v1/envs : 获取所有环境 - * GET /openapi/v1/envs - * - * @return 成功获取环境列表 (status code 200) - * @see EnvironmentManagementApi#getEnvs - */ - default ResponseEntity> getEnvs() { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ \"\", \"\" ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - -} 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 deleted file mode 100644 index b897620f..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApi.java +++ /dev/null @@ -1,200 +0,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.OpenInstanceDTO; -import com.apollo.openapi.server.model.OpenInstancePageDTO; -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Parameters; -import io.swagger.v3.oas.annotations.media.ArraySchema; -import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.security.SecurityRequirement; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.enums.ParameterIn; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.Valid; -import javax.validation.constraints.*; -import java.util.List; -import java.util.Map; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Validated -@Tag(name = "Instance Management", description = "实例管理相关接口,包括实例查询、配置生效状态等功能") -public interface InstanceManagementApi { - - default InstanceManagementApiDelegate getDelegate() { - return new InstanceManagementApiDelegate() {}; - } - - /** - * GET /openapi/v1/envs/{env}/instances/by-namespace : 根据namespaceName查询实例(new added) - * - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param page 页数 (required) - * @param size 页大小 (required) - * @param instanceAppId Instance表中的AppID (optional) - * @return (status code 200) - */ - @Operation( - operationId = "getByNamespace", - summary = "根据namespaceName查询实例(new added)", - tags = { "Instance Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenInstancePageDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/instances/by-namespace", - produces = { "application/json" } - ) - default ResponseEntity getByNamespace( - @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @NotNull @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "appId", required = true) String appId, - @NotNull @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "clusterName", required = true) String clusterName, - @NotNull @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "namespaceName", required = true) String namespaceName, - @NotNull @Min(0) @Parameter(name = "page", description = "页数", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = true, defaultValue = "0") Integer page, - @NotNull @Min(0) @Parameter(name = "size", description = "页大小", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = true, defaultValue = "0") Integer size, - @Parameter(name = "instanceAppId", description = "Instance表中的AppID", in = ParameterIn.QUERY) @Valid @RequestParam(value = "instanceAppId", required = false) String instanceAppId - ) { - return getDelegate().getByNamespace(env, appId, clusterName, namespaceName, page, size, instanceAppId); - } - - - /** - * GET /openapi/v1/envs/{env}/instances/by-release : 根据发布版本查询实例(支持分页) (new added) - * GET /openapi/v1/envs/{env}/instances/by-release - * - * @param env (required) - * @param releaseId (required) - * @param page (required) - * @param size (required) - * @return (status code 200) - */ - @Operation( - operationId = "getByRelease", - summary = "根据发布版本查询实例(支持分页) (new added)", - description = "GET /openapi/v1/envs/{env}/instances/by-release", - tags = { "Instance Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenInstancePageDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/instances/by-release", - produces = { "application/json" } - ) - default ResponseEntity getByRelease( - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @NotNull @Parameter(name = "releaseId", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "releaseId", required = true) Long releaseId, - @NotNull @Parameter(name = "page", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = true) Integer page, - @NotNull @Parameter(name = "size", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = true) Integer size - ) { - return getDelegate().getByRelease(env, releaseId, page, size); - } - - - /** - * GET /openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in : 查询不在指定发布版本中的实例 (new added) - * - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param releaseIds 排除的发布ID列表,用逗号分隔 (required) - * @return (status code 200) - */ - @Operation( - operationId = "getByReleasesAndNamespaceNotIn", - summary = "查询不在指定发布版本中的实例 (new added)", - tags = { "Instance Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenInstanceDTO.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in", - produces = { "application/json" } - ) - default ResponseEntity> getByReleasesAndNamespaceNotIn( - @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @NotNull @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "appId", required = true) String appId, - @NotNull @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "clusterName", required = true) String clusterName, - @NotNull @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "namespaceName", required = true) String namespaceName, - @NotNull @Parameter(name = "releaseIds", description = "排除的发布ID列表,用逗号分隔", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "releaseIds", required = true) String releaseIds - ) { - return getDelegate().getByReleasesAndNamespaceNotIn(env, appId, clusterName, namespaceName, releaseIds); - } - - - /** - * 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 appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @return 成功返回实例数量 (status code 200) - */ - @Operation( - 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 = Integer.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances", - produces = { "application/json" } - ) - 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().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 deleted file mode 100644 index 92141e06..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiController.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.OpenInstanceDTO; -import com.apollo.openapi.server.model.OpenInstancePageDTO; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.CookieValue; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Controller -@RequestMapping("${openapi.apolloOpen.base-path:}") -public class InstanceManagementApiController implements InstanceManagementApi { - - private final InstanceManagementApiDelegate delegate; - - public InstanceManagementApiController(@Autowired(required = false) InstanceManagementApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new InstanceManagementApiDelegate() {}); - } - - @Override - public InstanceManagementApiDelegate getDelegate() { - return delegate; - } - -} 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 deleted file mode 100644 index 39dc1430..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/InstanceManagementApiDelegate.java +++ /dev/null @@ -1,136 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.OpenInstanceDTO; -import com.apollo.openapi.server.model.OpenInstancePageDTO; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.context.request.NativeWebRequest; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -/** - * A delegate to be called by the {@link InstanceManagementApiController}}. - * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. - */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public interface InstanceManagementApiDelegate { - - default Optional getRequest() { - return Optional.empty(); - } - - /** - * GET /openapi/v1/envs/{env}/instances/by-namespace : 根据namespaceName查询实例(new added) - * - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param page 页数 (required) - * @param size 页大小 (required) - * @param instanceAppId Instance表中的AppID (optional) - * @return (status code 200) - * @see InstanceManagementApi#getByNamespace - */ - default ResponseEntity getByNamespace(String env, - String appId, - String clusterName, - String namespaceName, - Integer page, - Integer size, - String instanceAppId) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"total\" : 1, \"size\" : 6, \"instances\" : [ { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"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\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 } ], \"page\" : 0 }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/envs/{env}/instances/by-release : 根据发布版本查询实例(支持分页) (new added) - * GET /openapi/v1/envs/{env}/instances/by-release - * - * @param env (required) - * @param releaseId (required) - * @param page (required) - * @param size (required) - * @return (status code 200) - * @see InstanceManagementApi#getByRelease - */ - default ResponseEntity getByRelease(String env, - Long releaseId, - Integer page, - Integer size) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"total\" : 1, \"size\" : 6, \"instances\" : [ { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"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\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataCenter\" : \"dataCenter\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"ip\" : \"ip\", \"id\" : 5 } ], \"page\" : 0 }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in : 查询不在指定发布版本中的实例 (new added) - * - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param releaseIds 排除的发布ID列表,用逗号分隔 (required) - * @return (status code 200) - * @see InstanceManagementApi#getByReleasesAndNamespaceNotIn - */ - default ResponseEntity> getByReleasesAndNamespaceNotIn(String env, - String appId, - String clusterName, - String namespaceName, - String releaseIds) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"configs\" : [ { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"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\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"namespaceName\" : \"namespaceName\" }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"releaseDeliveryTime\" : \"2025-09-29T12:34:56Z\", \"release\" : { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"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 : 获取命名空间下的实例数量 (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 成功返回实例数量 (status code 200) - * @see InstanceManagementApi#getInstanceCountByNamespace - */ - 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 deleted file mode 100644 index 0521fc21..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApi.java +++ /dev/null @@ -1,703 +0,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.ExceptionResponse; -import com.apollo.openapi.server.model.OpenItemDTO; -import com.apollo.openapi.server.model.OpenItemDiffDTO; -import com.apollo.openapi.server.model.OpenItemPageDTO; -import com.apollo.openapi.server.model.OpenNamespaceSyncDTO; -import com.apollo.openapi.server.model.OpenNamespaceTextModel; -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Parameters; -import io.swagger.v3.oas.annotations.media.ArraySchema; -import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.security.SecurityRequirement; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.enums.ParameterIn; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.Valid; -import javax.validation.constraints.*; -import java.util.List; -import java.util.Map; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Validated -@Tag(name = "Item Management", description = "配置项管理相关接口,包括配置的增删改查、批量操作、同步等功能") -public interface ItemManagementApi { - - default ItemManagementApiDelegate getDelegate() { - return new ItemManagementApiDelegate() {}; - } - - /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 通过文本批量修改配置项 (new added) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceTextModel (required) - * @param operator 操作人用户名 (optional) - * @return 批量更新配置项成功 (status code 200) - * or 权限不足 (status code 403) - */ - @Operation( - operationId = "batchUpdateItemsByText", - summary = "通过文本批量修改配置项 (new added)", - description = "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:", - tags = { "Item Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "批量更新配置项成功"), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.PUT, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items", - produces = { "application/json" }, - consumes = { "application/json" } - ) - 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 = "OpenNamespaceTextModel", description = "", required = true) @Valid @RequestBody OpenNamespaceTextModel openNamespaceTextModel, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().batchUpdateItemsByText(appId, env, clusterName, namespaceName, openNamespaceTextModel, operator); - } - - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff : 对比命名空间配置差异 (new added) - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff - * - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param openNamespaceSyncDTO (required) - * @return 成功对比命名空间配置差异 (status code 200) - */ - @Operation( - operationId = "compareItems", - summary = "对比命名空间配置差异 (new added)", - description = "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff", - tags = { "Item Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功对比命名空间配置差异", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenItemDiffDTO.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff", - produces = { "application/json" }, - consumes = { "application/json" } - ) - 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 = "OpenNamespaceSyncDTO", description = "", required = true) @Valid @RequestBody OpenNamespaceSyncDTO openNamespaceSyncDTO - ) { - return getDelegate().compareItems(appId, env, clusterName, namespaceName, openNamespaceSyncDTO); - } - - - /** - * 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 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param openItemDTO (required) - * @param operator 操作人用户名 (optional) - * @return 配置项创建成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - */ - @Operation( - 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 = "配置项创建成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenItemDTO.class)) - }), - @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items", - produces = { "application/json" }, - consumes = { "application/json" } - ) - 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, - @Parameter(name = "OpenItemDTO", description = "", required = true) @Valid @RequestBody OpenItemDTO openItemDTO, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().createItem(appId, env, clusterName, namespaceName, openItemDTO, operator); - } - - - /** - * 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 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param key 配置项键名 (required) - * @param operator 操作人用户名 (optional) - * @return 配置项删除成功 (status code 200) - */ - @Operation( - 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 = "配置项删除成功") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.DELETE, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" - ) - 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, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().deleteItem(appId, env, clusterName, namespaceName, key, operator); - } - - - /** - * 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 key (required) - * @param operator (required) - * @return (status code 200) - */ - @Operation( - 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 = "") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.DELETE, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" - ) - 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 = "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().deleteItemByEncodedKey(appId, env, clusterName, namespaceName, key, operator); - } - - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items : 获取分支下的配置项 (new added) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: - * - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @return 成功获取分支下的配置项列表 (status code 200) - * or 分支不存在 (status code 404) - */ - @Operation( - operationId = "findBranchItems", - summary = "获取分支下的配置项 (new added)", - description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items:", - tags = { "Item Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取分支下的配置项列表", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenItemDTO.class))) - }), - @ApiResponse(responseCode = "404", description = "分支不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items", - produces = { "application/json" } - ) - default ResponseEntity> findBranchItems( - @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "branchName", description = "分支名称", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName - ) { - return getDelegate().findBranchItems(appId, env, clusterName, namespaceName, branchName); - } - - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 获取命名空间下的配置项列表 (original openapi) - * 获取指定命名空间的配置项列表,支持分页 - * - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param page 页码,从0开始 (required) - * @param size 每页数量 (required) - * @return 成功获取配置项列表 (status code 200) - * or 命名空间不存在 (status code 404) - */ - @Operation( - operationId = "findItemsByNamespace", - summary = "获取命名空间下的配置项列表 (original openapi)", - description = "获取指定命名空间的配置项列表,支持分页", - tags = { "Item Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取配置项列表", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenItemPageDTO.class)) - }), - @ApiResponse(responseCode = "404", description = "命名空间不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items", - produces = { "application/json" } - ) - 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().findItemsByNamespace(appId, env, clusterName, namespaceName, page, size); - } - - - /** - * 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 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param key 配置项键名 (required) - * @return 成功获取配置项 (status code 200) - * or 配置项不存在 (status code 404) - */ - @Operation( - 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 = ExceptionResponse.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 = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}", - produces = { "application/json" } - ) - 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 = "配置项键名(需要URL编码)", required = true, in = ParameterIn.PATH) @PathVariable("key") String key - ) { - return getDelegate().getItemByEncodedKey(appId, env, clusterName, namespaceName, key); - } - - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation : 撤销配置项更改 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param operator 操作人用户名 (optional) - * @return 配置项更改撤销成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - */ - @Operation( - operationId = "revertItems", - summary = "撤销配置项更改 (new added)", - description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation", - tags = { "Item Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "配置项更改撤销成功"), - @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation", - produces = { "application/json" } - ) - 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 = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().revertItems(appId, env, clusterName, namespaceName, operator); - } - - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize : 同步配置项到多个命名空间 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: - * - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceSyncDTO (required) - * @param operator 操作人用户名 (optional) - * @return 配置项同步成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - */ - @Operation( - operationId = "syncItems", - summary = "同步配置项到多个命名空间 (new added)", - description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize:", - tags = { "Item Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "配置项同步成功"), - @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize", - produces = { "application/json" }, - consumes = { "application/json" } - ) - 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 = "OpenNamespaceSyncDTO", description = "", required = true) @Valid @RequestBody OpenNamespaceSyncDTO openNamespaceSyncDTO, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().syncItems(appId, env, clusterName, namespaceName, openNamespaceSyncDTO, operator); - } - - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation : 验证配置文本语法 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceTextModel (required) - * @return 配置文本语法验证通过 (status code 200) - * or 配置文本语法错误 (status code 400) - */ - @Operation( - operationId = "syntaxCheck", - summary = "验证配置文本语法 (new added)", - description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation", - tags = { "Item Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "配置文本语法验证通过"), - @ApiResponse(responseCode = "400", description = "配置文本语法错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation", - produces = { "application/json" }, - consumes = { "application/json" } - ) - default ResponseEntity syntaxCheck( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "OpenNamespaceTextModel", description = "", required = true) @Valid @RequestBody OpenNamespaceTextModel openNamespaceTextModel - ) { - return getDelegate().syntaxCheck(appId, env, clusterName, namespaceName, openNamespaceTextModel); - } - - - /** - * 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 key (required) - * @param createIfNotExists (required) - * @param openItemDTO (required) - * @param operator 操作人用户名 (optional) - * @return 配置项更新成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - * or 配置项不存在 (status code 404) - */ - @Operation( - 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 = "配置项更新成功"), - @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "404", description = "配置项不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.PUT, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}", - produces = { "application/json" }, - consumes = { "application/json" } - ) - default ResponseEntity updateItem( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "key", description = "", required = true, in = ParameterIn.PATH) @PathVariable("key") String key, - @NotNull @Parameter(name = "createIfNotExists", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "createIfNotExists", required = true, defaultValue = "false") Boolean createIfNotExists, - @Parameter(name = "OpenItemDTO", description = "", required = true) @Valid @RequestBody OpenItemDTO openItemDTO, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().updateItem(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator); - } - - - /** - * 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) - * @param operator 操作人用户名 (optional) - * @return 配置项更新成功(编码key) (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - * or 配置项不存在 (status code 404) - */ - @Operation( - 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 = "配置项更新成功(编码key)"), - @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "404", description = "配置项不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.PUT, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}", - produces = { "application/json" }, - consumes = { "application/json" } - ) - 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, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().updateItemByEncodedKey(appId, env, clusterName, namespaceName, key, createIfNotExists, openItemDTO, operator); - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiController.java deleted file mode 100644 index e301a709..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiController.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.ExceptionResponse; -import com.apollo.openapi.server.model.OpenItemDTO; -import com.apollo.openapi.server.model.OpenItemDiffDTO; -import com.apollo.openapi.server.model.OpenItemPageDTO; -import com.apollo.openapi.server.model.OpenNamespaceSyncDTO; -import com.apollo.openapi.server.model.OpenNamespaceTextModel; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.CookieValue; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Controller -@RequestMapping("${openapi.apolloOpen.base-path:}") -public class ItemManagementApiController implements ItemManagementApi { - - private final ItemManagementApiDelegate delegate; - - public ItemManagementApiController(@Autowired(required = false) ItemManagementApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new ItemManagementApiDelegate() {}); - } - - @Override - public ItemManagementApiDelegate getDelegate() { - return delegate; - } - -} 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 deleted file mode 100644 index 44fc2159..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ItemManagementApiDelegate.java +++ /dev/null @@ -1,421 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.ExceptionResponse; -import com.apollo.openapi.server.model.OpenItemDTO; -import com.apollo.openapi.server.model.OpenItemDiffDTO; -import com.apollo.openapi.server.model.OpenItemPageDTO; -import com.apollo.openapi.server.model.OpenNamespaceSyncDTO; -import com.apollo.openapi.server.model.OpenNamespaceTextModel; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.context.request.NativeWebRequest; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -/** - * A delegate to be called by the {@link ItemManagementApiController}}. - * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. - */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public interface ItemManagementApiDelegate { - - default Optional getRequest() { - return Optional.empty(); - } - - /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 通过文本批量修改配置项 (new added) - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceTextModel (required) - * @param operator 操作人用户名 (optional) - * @return 批量更新配置项成功 (status code 200) - * or 权限不足 (status code 403) - * @see ItemManagementApi#batchUpdateItemsByText - */ - default ResponseEntity batchUpdateItemsByText(String appId, - String env, - String clusterName, - String namespaceName, - OpenNamespaceTextModel openNamespaceTextModel, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff : 对比命名空间配置差异 (new added) - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff - * - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param openNamespaceSyncDTO (required) - * @return 成功对比命名空间配置差异 (status code 200) - * @see ItemManagementApi#compareItems - */ - default ResponseEntity> compareItems(String appId, - String env, - String clusterName, - String namespaceName, - OpenNamespaceSyncDTO openNamespaceSyncDTO) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"code\" : 0, \"namespace\" : { \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"env\" : \"env\", \"namespaceName\" : \"namespaceName\" }, \"deleteItems\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"createItems\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"message\" : \"message\", \"updateItems\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ] }, { \"code\" : 0, \"namespace\" : { \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"env\" : \"env\", \"namespaceName\" : \"namespaceName\" }, \"deleteItems\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"createItems\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"message\" : \"message\", \"updateItems\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ] } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items : 创建新的配置项 (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 openItemDTO (required) - * @param operator 操作人用户名 (optional) - * @return 配置项创建成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see ItemManagementApi#createItem - */ - default ResponseEntity createItem(String appId, - String env, - String clusterName, - String namespaceName, - OpenItemDTO openItemDTO, - String operator) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * 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 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param key 配置项键名 (required) - * @param operator 操作人用户名 (optional) - * @return 配置项删除成功 (status code 200) - * @see ItemManagementApi#deleteItem - */ - default ResponseEntity deleteItem(String appId, - String env, - String clusterName, - String namespaceName, - String key, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * 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 key (required) - * @param operator (required) - * @return (status code 200) - * @see ItemManagementApi#deleteItemByEncodedKey - */ - default ResponseEntity deleteItemByEncodedKey(String appId, - String env, - String clusterName, - String namespaceName, - String key, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items : 获取分支下的配置项 (new added) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: - * - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @return 成功获取分支下的配置项列表 (status code 200) - * or 分支不存在 (status code 404) - * @see ItemManagementApi#findBranchItems - */ - default ResponseEntity> findBranchItems(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 = "[ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ]"; - 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 : 获取命名空间下的配置项列表 (original openapi) - * 获取指定命名空间的配置项列表,支持分页 - * - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param page 页码,从0开始 (required) - * @param size 每页数量 (required) - * @return 成功获取配置项列表 (status code 200) - * or 命名空间不存在 (status code 404) - * @see ItemManagementApi#findItemsByNamespace - */ - default ResponseEntity findItemsByNamespace(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 = "{ \"total\" : 1, \"size\" : 6, \"page\" : 0, \"content\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ] }"; - 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} : 获取单个配置项 (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 成功获取配置项 (status code 200) - * or 配置项不存在 (status code 404) - * @see ItemManagementApi#getItem - */ - default ResponseEntity getItem(String appId, - String env, - String clusterName, - String namespaceName, - String key) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * 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) - * @see ItemManagementApi#getItemByEncodedKey - */ - default ResponseEntity getItemByEncodedKey(String appId, - String env, - String clusterName, - String namespaceName, - String key) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation : 撤销配置项更改 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param operator 操作人用户名 (optional) - * @return 配置项更改撤销成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see ItemManagementApi#revertItems - */ - default ResponseEntity revertItems(String appId, - String env, - String clusterName, - String namespaceName, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize : 同步配置项到多个命名空间 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: - * - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceSyncDTO (required) - * @param operator 操作人用户名 (optional) - * @return 配置项同步成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see ItemManagementApi#syncItems - */ - default ResponseEntity syncItems(String appId, - String env, - String clusterName, - String namespaceName, - OpenNamespaceSyncDTO openNamespaceSyncDTO, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation : 验证配置文本语法 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param openNamespaceTextModel (required) - * @return 配置文本语法验证通过 (status code 200) - * or 配置文本语法错误 (status code 400) - * @see ItemManagementApi#syntaxCheck - */ - default ResponseEntity syntaxCheck(String appId, - String env, - String clusterName, - String namespaceName, - OpenNamespaceTextModel openNamespaceTextModel) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * 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 key (required) - * @param createIfNotExists (required) - * @param openItemDTO (required) - * @param operator 操作人用户名 (optional) - * @return 配置项更新成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - * or 配置项不存在 (status code 404) - * @see ItemManagementApi#updateItem - */ - default ResponseEntity updateItem(String appId, - String env, - String clusterName, - String namespaceName, - String key, - Boolean createIfNotExists, - OpenItemDTO openItemDTO, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * 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) - * @param operator 操作人用户名 (optional) - * @return 配置项更新成功(编码key) (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - * or 配置项不存在 (status code 404) - * @see ItemManagementApi#updateItemByEncodedKey - */ - default ResponseEntity updateItemByEncodedKey(String appId, - String env, - String clusterName, - String namespaceName, - String key, - Boolean createIfNotExists, - OpenItemDTO openItemDTO, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApi.java deleted file mode 100644 index f8bccd05..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApi.java +++ /dev/null @@ -1,355 +0,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.ExceptionResponse; -import com.apollo.openapi.server.model.NamespaceReleaseDTO; -import com.apollo.openapi.server.model.OpenGrayReleaseRuleDTO; -import com.apollo.openapi.server.model.OpenNamespaceDTO; -import com.apollo.openapi.server.model.OpenReleaseDTO; -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Parameters; -import io.swagger.v3.oas.annotations.media.ArraySchema; -import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.security.SecurityRequirement; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.enums.ParameterIn; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.Valid; -import javax.validation.constraints.*; -import java.util.List; -import java.util.Map; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Validated -@Tag(name = "Namespace Branch Management", description = "命名空间分支管理相关接口,包括分支创建、合并、灰度发布等功能") -public interface NamespaceBranchManagementApi { - - default NamespaceBranchManagementApiDelegate getDelegate() { - return new NamespaceBranchManagementApiDelegate() {}; - } - - /** - * 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 app标识 (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (optional) - * @return 命名空间分支创建成功 (status code 200) - */ - @Operation( - 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 = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches", - produces = { "application/json" } - ) - 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, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().createBranch(appId, env, clusterName, namespaceName, operator); - } - - - /** - * 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 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param operator 操作人用户名 (optional) - * @return 分支删除成功 (status code 200) - */ - @Operation( - 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 = "分支删除成功") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.DELETE, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}" - ) - 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, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().deleteBranch(env, appId, clusterName, namespaceName, branchName, operator); - } - - - /** - * 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 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param extendInfo (optional, default to false) - * @return 成功获取分支信息 (status code 200) - * or 分支不存在 (status code 404) - */ - @Operation( - 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", schema = @Schema(implementation = OpenNamespaceDTO.class)) - }), - @ApiResponse(responseCode = "404", description = "分支不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches", - produces = { "application/json" } - ) - default ResponseEntity findBranch( - @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "extendInfo", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "extendInfo", required = false, defaultValue = "false") Boolean extendInfo - ) { - return getDelegate().findBranch(appId, env, clusterName, namespaceName, extendInfo); - } - - - /** - * 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 app标识 (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @return 成功获取灰度发布规则 (status code 200) - */ - @Operation( - 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 = OpenGrayReleaseRuleDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules", - produces = { "application/json" } - ) - 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().getBranchGrayRules(appId, env, clusterName, namespaceName, branchName); - } - - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge : 合并分支 (original openapi) - * 合并灰度分支并可选择删除分支 - * - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param deleteBranch 合并后是否删除分支(true/false) (required) - * @param namespaceReleaseDTO (required) - * @return 分支合并成功 (status code 200) - * or 合并参数错误 (status code 400) - * or 权限不足 (status code 403) - */ - @Operation( - operationId = "merge", - summary = "合并分支 (original openapi)", - description = "合并灰度分支并可选择删除分支", - tags = { "Namespace Branch Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "分支合并成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) - }), - @ApiResponse(responseCode = "400", description = "合并参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge", - produces = { "application/json" }, - consumes = { "application/json" } - ) - default ResponseEntity merge( - @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "branchName", description = "分支名称", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, - @NotNull @Parameter(name = "deleteBranch", description = "合并后是否删除分支(true/false)", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "deleteBranch", required = true) Boolean deleteBranch, - @Parameter(name = "NamespaceReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceReleaseDTO namespaceReleaseDTO - ) { - return getDelegate().merge(appId, env, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO); - } - - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} : 合并分支到主分支 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param deleteBranch 合并后是否删除分支(true/false) (required) - * @param namespaceReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @return 分支合并成功 (status code 200) - */ - @Operation( - operationId = "mergeBranch", - summary = "合并分支到主分支 (new added)", - description = "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}", - tags = { "Namespace Branch Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "分支合并成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}", - produces = { "application/json" }, - consumes = { "application/json" } - ) - 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, - @Parameter(name = "NamespaceReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceReleaseDTO namespaceReleaseDTO, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().mergeBranch(env, appId, clusterName, namespaceName, branchName, deleteBranch, namespaceReleaseDTO, operator); - } - - - /** - * 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 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param openGrayReleaseRuleDTO (required) - * @param operator 操作人用户名 (optional) - * @return 灰度规则更新成功 (status code 200) - */ - @Operation( - operationId = "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 = "灰度规则更新成功") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.PUT, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules", - consumes = { "application/json" } - ) - 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, - @Parameter(name = "OpenGrayReleaseRuleDTO", description = "", required = true) @Valid @RequestBody OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().updateBranchRules(appId, env, clusterName, namespaceName, branchName, openGrayReleaseRuleDTO, operator); - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiController.java deleted file mode 100644 index 59061e52..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiController.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.ExceptionResponse; -import com.apollo.openapi.server.model.NamespaceReleaseDTO; -import com.apollo.openapi.server.model.OpenGrayReleaseRuleDTO; -import com.apollo.openapi.server.model.OpenNamespaceDTO; -import com.apollo.openapi.server.model.OpenReleaseDTO; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.CookieValue; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Controller -@RequestMapping("${openapi.apolloOpen.base-path:}") -public class NamespaceBranchManagementApiController implements NamespaceBranchManagementApi { - - private final NamespaceBranchManagementApiDelegate delegate; - - public NamespaceBranchManagementApiController(@Autowired(required = false) NamespaceBranchManagementApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new NamespaceBranchManagementApiDelegate() {}); - } - - @Override - public NamespaceBranchManagementApiDelegate getDelegate() { - return delegate; - } - -} 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 deleted file mode 100644 index 0ed927e1..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceBranchManagementApiDelegate.java +++ /dev/null @@ -1,241 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.ExceptionResponse; -import com.apollo.openapi.server.model.NamespaceReleaseDTO; -import com.apollo.openapi.server.model.OpenGrayReleaseRuleDTO; -import com.apollo.openapi.server.model.OpenNamespaceDTO; -import com.apollo.openapi.server.model.OpenReleaseDTO; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.context.request.NativeWebRequest; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -/** - * A delegate to be called by the {@link NamespaceBranchManagementApiController}}. - * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. - */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public interface NamespaceBranchManagementApiDelegate { - - default Optional getRequest() { - return Optional.empty(); - } - - /** - * 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 app标识 (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (optional) - * @return 命名空间分支创建成功 (status code 200) - * @see NamespaceBranchManagementApi#createBranch - */ - default ResponseEntity createBranch(String appId, - String env, - String clusterName, - String namespaceName, - String operator) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"extendInfo\" : { \"parentAppId\" : \"parentAppId\", \"isConfigHidden\" : true, \"itemModifiedCnt\" : 0 }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"namespaceName\" : \"namespaceName\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * 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 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param operator 操作人用户名 (optional) - * @return 分支删除成功 (status code 200) - * @see NamespaceBranchManagementApi#deleteBranch - */ - default ResponseEntity deleteBranch(String env, - String appId, - String clusterName, - String namespaceName, - String branchName, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * 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 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param extendInfo (optional, default to false) - * @return 成功获取分支信息 (status code 200) - * or 分支不存在 (status code 404) - * @see NamespaceBranchManagementApi#findBranch - */ - default ResponseEntity findBranch(String appId, - String env, - String clusterName, - String namespaceName, - Boolean extendInfo) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"extendInfo\" : { \"parentAppId\" : \"parentAppId\", \"isConfigHidden\" : true, \"itemModifiedCnt\" : 0 }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"namespaceName\" : \"namespaceName\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/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 app标识 (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @return 成功获取灰度发布规则 (status code 200) - * @see NamespaceBranchManagementApi#getBranchGrayRules - */ - default ResponseEntity getBranchGrayRules(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 = "{ \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"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; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge : 合并分支 (original openapi) - * 合并灰度分支并可选择删除分支 - * - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param deleteBranch 合并后是否删除分支(true/false) (required) - * @param namespaceReleaseDTO (required) - * @return 分支合并成功 (status code 200) - * or 合并参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see NamespaceBranchManagementApi#merge - */ - default ResponseEntity merge(String appId, - String env, - String clusterName, - String namespaceName, - String branchName, - Boolean deleteBranch, - NamespaceReleaseDTO namespaceReleaseDTO) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"namespaceName\" : \"namespaceName\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} : 合并分支到主分支 (new added) - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param deleteBranch 合并后是否删除分支(true/false) (required) - * @param namespaceReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @return 分支合并成功 (status code 200) - * @see NamespaceBranchManagementApi#mergeBranch - */ - default ResponseEntity mergeBranch(String env, - String appId, - String clusterName, - String namespaceName, - String branchName, - Boolean deleteBranch, - NamespaceReleaseDTO namespaceReleaseDTO, - String operator) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"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}/rules : 更新分支灰度发布规则 (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 openGrayReleaseRuleDTO (required) - * @param operator 操作人用户名 (optional) - * @return 灰度规则更新成功 (status code 200) - * @see NamespaceBranchManagementApi#updateBranchRules - */ - default ResponseEntity updateBranchRules(String appId, - String env, - String clusterName, - String namespaceName, - String branchName, - OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApi.java deleted file mode 100644 index fbeb1296..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApi.java +++ /dev/null @@ -1,78 +0,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.OpenNamespaceLockDTO; -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Parameters; -import io.swagger.v3.oas.annotations.media.ArraySchema; -import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.security.SecurityRequirement; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.enums.ParameterIn; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.Valid; -import javax.validation.constraints.*; -import java.util.List; -import java.util.Map; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Validated -@Tag(name = "Namespace Lock Management", description = "命名空间锁管理相关接口") -public interface NamespaceLockManagementApi { - - default NamespaceLockManagementApiDelegate getDelegate() { - return new NamespaceLockManagementApiDelegate() {}; - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock : 获取Namespace的锁状态 (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return (status code 200) - */ - @Operation( - operationId = "getNamespaceLock", - summary = "获取Namespace的锁状态 (original openapi)", - description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock", - tags = { "Namespace Lock Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceLockDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock", - produces = { "application/json" } - ) - default ResponseEntity getNamespaceLock( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName - ) { - return getDelegate().getNamespaceLock(appId, env, clusterName, namespaceName); - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApiController.java deleted file mode 100644 index 3cac1a48..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApiController.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.OpenNamespaceLockDTO; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.CookieValue; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Controller -@RequestMapping("${openapi.apolloOpen.base-path:}") -public class NamespaceLockManagementApiController implements NamespaceLockManagementApi { - - private final NamespaceLockManagementApiDelegate delegate; - - public NamespaceLockManagementApiController(@Autowired(required = false) NamespaceLockManagementApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new NamespaceLockManagementApiDelegate() {}); - } - - @Override - public NamespaceLockManagementApiDelegate getDelegate() { - return delegate; - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApiDelegate.java deleted file mode 100644 index 3749feca..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceLockManagementApiDelegate.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.OpenNamespaceLockDTO; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.context.request.NativeWebRequest; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -/** - * A delegate to be called by the {@link NamespaceLockManagementApiController}}. - * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. - */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public interface NamespaceLockManagementApiDelegate { - - default Optional getRequest() { - return Optional.empty(); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock : 获取Namespace的锁状态 (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return (status code 200) - * @see NamespaceLockManagementApi#getNamespaceLock - */ - default ResponseEntity getNamespaceLock(String appId, - String env, - String clusterName, - String namespaceName) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"lockedBy\" : \"lockedBy\", \"isLocked\" : true, \"namespaceName\" : \"namespaceName\", \"isEmergencyPublishAllowed\" : true }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApi.java deleted file mode 100644 index 50bd619e..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApi.java +++ /dev/null @@ -1,381 +0,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.List; -import com.apollo.openapi.server.model.OpenCreateNamespaceDTO; -import com.apollo.openapi.server.model.OpenNamespaceDTO; -import com.apollo.openapi.server.model.OpenNamespaceUsageDTO; -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Parameters; -import io.swagger.v3.oas.annotations.media.ArraySchema; -import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.security.SecurityRequirement; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.enums.ParameterIn; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.Valid; -import javax.validation.constraints.*; -import java.util.List; -import java.util.Map; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Validated -@Tag(name = "Namespace Management", description = "命名空间管理相关接口,包括命名空间的创建、查询、配置等操作") -public interface NamespaceManagementApi { - - default NamespaceManagementApiDelegate getDelegate() { - return new NamespaceManagementApiDelegate() {}; - } - - /** - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces : 创建缺失的Namespace (new added) - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces - * - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param operator 操作人用户名 (optional) - * @return 缺失的命名空间创建成功 (status code 200) - */ - @Operation( - operationId = "createMissingNamespaces", - summary = "创建缺失的Namespace (new added)", - description = "POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces", - tags = { "Namespace Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "缺失的命名空间创建成功") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces" - ) - default ResponseEntity createMissingNamespaces( - @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().createMissingNamespaces(appId, env, clusterName, operator); - } - - - /** - * POST /openapi/v1/namespaces : 创建Namespace (new added) - * POST /openapi/v1/apps/{appId}/namespaces - * - * @param openCreateNamespaceDTO (required) - * @param operator 操作人用户名 (optional) - * @return Namespace创建成功 (status code 200) - */ - @Operation( - operationId = "createNamespaces", - summary = "创建Namespace (new added)", - description = "POST /openapi/v1/apps/{appId}/namespaces", - tags = { "Namespace Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "Namespace创建成功") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/namespaces", - consumes = { "application/json" } - ) - default ResponseEntity createNamespaces( - @Parameter(name = "OpenCreateNamespaceDTO", description = "", required = true) @Valid @RequestBody List openCreateNamespaceDTO, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().createNamespaces(openCreateNamespaceDTO, operator); - } - - - /** - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} : 删除指定的Namespace (new added) - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} - * - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (optional) - * @return 解除关联成功 (status code 200) - */ - @Operation( - operationId = "deleteNamespace", - summary = "删除指定的Namespace (new added)", - description = "DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}", - tags = { "Namespace Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "解除关联成功") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.DELETE, - value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}" - ) - default ResponseEntity deleteNamespace( - @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().deleteNamespace(appId, env, clusterName, namespaceName, operator); - } - - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces : 查找缺失的Namespace (new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces - * - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @return 缺失的命名空间名称列表 (status code 200) - */ - @Operation( - operationId = "findMissingNamespaces", - summary = "查找缺失的Namespace (new added)", - description = "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces", - tags = { "Namespace Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "缺失的命名空间名称列表", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = String.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces", - produces = { "application/json" } - ) - default ResponseEntity> findMissingNamespaces( - @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName - ) { - return getDelegate().findMissingNamespaces(appId, env, clusterName); - } - - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} : 获取指定的Namespace (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param fillItemDetail (required) - * @param extendInfo (optional, default to false) - * @return (status code 200) - */ - @Operation( - operationId = "findNamespace", - summary = "获取指定的Namespace (original openapi)", - description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}", - tags = { "Namespace Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}", - produces = { "application/json" } - ) - default ResponseEntity findNamespace( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @NotNull @Parameter(name = "fillItemDetail", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "fillItemDetail", required = true, defaultValue = "true") Boolean fillItemDetail, - @Parameter(name = "extendInfo", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "extendInfo", required = false, defaultValue = "false") Boolean extendInfo - ) { - return getDelegate().findNamespace(appId, env, clusterName, namespaceName, fillItemDetail, extendInfo); - } - - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage : 查询namespace使用情况(new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage - * - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @return NamespaceUsage查询成功 (status code 200) - */ - @Operation( - operationId = "findNamespaceUsage", - summary = "查询namespace使用情况(new added)", - description = "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage", - tags = { "Namespace Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "NamespaceUsage查询成功", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenNamespaceUsageDTO.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage", - produces = { "application/json" } - ) - default ResponseEntity> findNamespaceUsage( - @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "命名空间名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName - ) { - return getDelegate().findNamespaceUsage(appId, env, clusterName, namespaceName); - } - - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces : 获取指定集群下的所有Namespace (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param fillItemDetail (required) - * @param extendInfo (optional, default to false) - * @return (status code 200) - */ - @Operation( - operationId = "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 = OpenNamespaceDTO.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces", - produces = { "application/json" } - ) - default ResponseEntity> findNamespaces( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "clusterName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @NotNull @Parameter(name = "fillItemDetail", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "fillItemDetail", required = true, defaultValue = "true") Boolean fillItemDetail, - @Parameter(name = "extendInfo", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "extendInfo", required = false, defaultValue = "false") Boolean extendInfo - ) { - return getDelegate().findNamespaces(appId, env, clusterName, fillItemDetail, extendInfo); - } - - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace : 查询关联Namespace对应的公共Namespace详情 (new added) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace - * - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 关联Namespace名称 (required) - * @param extendInfo (optional, default to false) - * @return 成功获取关联的公共Namespace详情 (status code 200) - */ - @Operation( - operationId = "findPublicNamespaceForAssociatedNamespace", - summary = "查询关联Namespace对应的公共Namespace详情 (new added)", - description = "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace", - tags = { "Namespace Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取关联的公共Namespace详情", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace", - produces = { "application/json" } - ) - default ResponseEntity findPublicNamespaceForAssociatedNamespace( - @Parameter(name = "env", description = "环境标识", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "appId", description = "应用ID", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "clusterName", description = "集群名称", required = true, in = ParameterIn.PATH) @PathVariable("clusterName") String clusterName, - @Parameter(name = "namespaceName", description = "关联Namespace名称", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "extendInfo", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "extendInfo", required = false, defaultValue = "false") Boolean extendInfo - ) { - return getDelegate().findPublicNamespaceForAssociatedNamespace(env, appId, clusterName, namespaceName, extendInfo); - } - - - /** - * 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); - } - -} 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 deleted file mode 100644 index c0bb4be4..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiController.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.apollo.openapi.server.api; - -import java.util.List; -import com.apollo.openapi.server.model.OpenCreateNamespaceDTO; -import com.apollo.openapi.server.model.OpenNamespaceDTO; -import com.apollo.openapi.server.model.OpenNamespaceUsageDTO; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.CookieValue; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Controller -@RequestMapping("${openapi.apolloOpen.base-path:}") -public class NamespaceManagementApiController implements NamespaceManagementApi { - - private final NamespaceManagementApiDelegate delegate; - - public NamespaceManagementApiController(@Autowired(required = false) NamespaceManagementApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new NamespaceManagementApiDelegate() {}); - } - - @Override - public NamespaceManagementApiDelegate getDelegate() { - return delegate; - } - -} 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 deleted file mode 100644 index 23eb3134..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/NamespaceManagementApiDelegate.java +++ /dev/null @@ -1,252 +0,0 @@ -package com.apollo.openapi.server.api; - -import java.util.List; -import com.apollo.openapi.server.model.OpenCreateNamespaceDTO; -import com.apollo.openapi.server.model.OpenNamespaceDTO; -import com.apollo.openapi.server.model.OpenNamespaceUsageDTO; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.context.request.NativeWebRequest; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -/** - * A delegate to be called by the {@link NamespaceManagementApiController}}. - * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. - */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public interface NamespaceManagementApiDelegate { - - default Optional getRequest() { - return Optional.empty(); - } - - /** - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces : 创建缺失的Namespace (new added) - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces - * - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param operator 操作人用户名 (optional) - * @return 缺失的命名空间创建成功 (status code 200) - * @see NamespaceManagementApi#createMissingNamespaces - */ - default ResponseEntity createMissingNamespaces(String appId, - String env, - String clusterName, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/namespaces : 创建Namespace (new added) - * POST /openapi/v1/apps/{appId}/namespaces - * - * @param openCreateNamespaceDTO (required) - * @param operator 操作人用户名 (optional) - * @return Namespace创建成功 (status code 200) - * @see NamespaceManagementApi#createNamespaces - */ - default ResponseEntity createNamespaces(List openCreateNamespaceDTO, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} : 删除指定的Namespace (new added) - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} - * - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param operator 操作人用户名 (optional) - * @return 解除关联成功 (status code 200) - * @see NamespaceManagementApi#deleteNamespace - */ - default ResponseEntity deleteNamespace(String appId, - String env, - String clusterName, - String namespaceName, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces : 查找缺失的Namespace (new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces - * - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @return 缺失的命名空间名称列表 (status code 200) - * @see NamespaceManagementApi#findMissingNamespaces - */ - default ResponseEntity> findMissingNamespaces(String appId, - String env, - String clusterName) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ \"\", \"\" ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} : 获取指定的Namespace (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param fillItemDetail (required) - * @param extendInfo (optional, default to false) - * @return (status code 200) - * @see NamespaceManagementApi#findNamespace - */ - default ResponseEntity findNamespace(String appId, - String env, - String clusterName, - String namespaceName, - Boolean fillItemDetail, - Boolean extendInfo) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"extendInfo\" : { \"parentAppId\" : \"parentAppId\", \"isConfigHidden\" : true, \"itemModifiedCnt\" : 0 }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"namespaceName\" : \"namespaceName\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage : 查询namespace使用情况(new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage - * - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @return NamespaceUsage查询成功 (status code 200) - * @see NamespaceManagementApi#findNamespaceUsage - */ - default ResponseEntity> findNamespaceUsage(String appId, - String env, - String clusterName, - String namespaceName) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"branchInstanceCount\" : 6, \"envName\" : \"envName\", \"instanceCount\" : 0, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"linkedNamespaceCount\" : 1, \"namespaceName\" : \"namespaceName\" }, { \"branchInstanceCount\" : 6, \"envName\" : \"envName\", \"instanceCount\" : 0, \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"linkedNamespaceCount\" : 1, \"namespaceName\" : \"namespaceName\" } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces : 获取指定集群下的所有Namespace (original openapi) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param fillItemDetail (required) - * @param extendInfo (optional, default to false) - * @return (status code 200) - * @see NamespaceManagementApi#findNamespaces - */ - default ResponseEntity> findNamespaces(String appId, - String env, - String clusterName, - Boolean fillItemDetail, - Boolean extendInfo) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"extendInfo\" : { \"parentAppId\" : \"parentAppId\", \"isConfigHidden\" : true, \"itemModifiedCnt\" : 0 }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"namespaceName\" : \"namespaceName\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"extendInfo\" : { \"parentAppId\" : \"parentAppId\", \"isConfigHidden\" : true, \"itemModifiedCnt\" : 0 }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"namespaceName\" : \"namespaceName\" } ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace : 查询关联Namespace对应的公共Namespace详情 (new added) - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace - * - * @param env 环境标识 (required) - * @param appId 应用ID (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 关联Namespace名称 (required) - * @param extendInfo (optional, default to false) - * @return 成功获取关联的公共Namespace详情 (status code 200) - * @see NamespaceManagementApi#findPublicNamespaceForAssociatedNamespace - */ - default ResponseEntity findPublicNamespaceForAssociatedNamespace(String env, - String appId, - String clusterName, - String namespaceName, - Boolean extendInfo) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"format\" : \"format\", \"extendInfo\" : { \"parentAppId\" : \"parentAppId\", \"isConfigHidden\" : true, \"itemModifiedCnt\" : 0 }, \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"isPublic\" : true, \"comment\" : \"comment\", \"items\" : [ { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" }, { \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"lineNum\" : 6, \"comment\" : \"comment\", \"type\" : 0, \"extendInfo\" : { \"newValue\" : \"newValue\", \"isModified\" : true, \"isDeleted\" : true, \"namespaceId\" : 1, \"oldValue\" : \"oldValue\", \"isNewlyAdded\" : true }, \"value\" : \"value\", \"key\" : \"key\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\" } ], \"namespaceName\" : \"namespaceName\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/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); - - } - -} 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 deleted file mode 100644 index 8aba9a30..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApi.java +++ /dev/null @@ -1,76 +0,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.ExceptionResponse; -import com.apollo.openapi.server.model.OpenOrganizationDto; -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Parameters; -import io.swagger.v3.oas.annotations.media.ArraySchema; -import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.security.SecurityRequirement; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.enums.ParameterIn; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.Valid; -import javax.validation.constraints.*; -import java.util.List; -import java.util.Map; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Validated -@Tag(name = "Organization Management", description = "组织管理相关接口,包括组织信息查询等功能") -public interface OrganizationManagementApi { - - default OrganizationManagementApiDelegate getDelegate() { - return new OrganizationManagementApiDelegate() {}; - } - - /** - * GET /openapi/v1/organizations : 获取所有组织信息 (original openapi) - * GET /openapi/v1/organizations - * - * @return 成功获取组织列表 (status code 200) - * or 未授权访问 (status code 401) - */ - @Operation( - operationId = "getOrganization", - summary = "获取所有组织信息 (original openapi)", - description = "GET /openapi/v1/organizations", - tags = { "Organization Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取组织列表", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenOrganizationDto.class))) - }), - @ApiResponse(responseCode = "401", description = "未授权访问", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/organizations", - produces = { "application/json" } - ) - default ResponseEntity> getOrganization( - - ) { - 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 deleted file mode 100644 index 6095d47a..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiController.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.ExceptionResponse; -import com.apollo.openapi.server.model.OpenOrganizationDto; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.CookieValue; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Controller -@RequestMapping("${openapi.apolloOpen.base-path:}") -public class OrganizationManagementApiController implements OrganizationManagementApi { - - private final OrganizationManagementApiDelegate delegate; - - public OrganizationManagementApiController(@Autowired(required = false) OrganizationManagementApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new OrganizationManagementApiDelegate() {}); - } - - @Override - public OrganizationManagementApiDelegate getDelegate() { - return delegate; - } - -} 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 deleted file mode 100644 index c668b858..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/OrganizationManagementApiDelegate.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.ExceptionResponse; -import com.apollo.openapi.server.model.OpenOrganizationDto; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.context.request.NativeWebRequest; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -/** - * A delegate to be called by the {@link OrganizationManagementApiController}}. - * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. - */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public interface OrganizationManagementApiDelegate { - - default Optional getRequest() { - return Optional.empty(); - } - - /** - * GET /openapi/v1/organizations : 获取所有组织信息 (original openapi) - * GET /openapi/v1/organizations - * - * @return 成功获取组织列表 (status code 200) - * or 未授权访问 (status code 401) - * @see OrganizationManagementApi#getOrganization - */ - default ResponseEntity> getOrganization() { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"orgName\" : \"orgName\", \"orgId\" : \"orgId\" }, { \"orgName\" : \"orgName\", \"orgId\" : \"orgId\" } ]"; - 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/PermissionManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/PermissionManagementApi.java deleted file mode 100644 index f3b50e2a..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/PermissionManagementApi.java +++ /dev/null @@ -1,989 +0,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.List; -import java.util.Map; -import com.apollo.openapi.server.model.OpenAppRoleUserDTO; -import com.apollo.openapi.server.model.OpenClusterNamespaceRoleUserDTO; -import com.apollo.openapi.server.model.OpenEnvNamespaceRoleUserDTO; -import com.apollo.openapi.server.model.OpenNamespaceRoleUserDTO; -import com.apollo.openapi.server.model.OpenPermissionConditionDTO; -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Parameters; -import io.swagger.v3.oas.annotations.media.ArraySchema; -import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.security.SecurityRequirement; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.enums.ParameterIn; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.Valid; -import javax.validation.constraints.*; -import java.util.List; -import java.util.Map; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Validated -@Tag(name = "Permission Management", description = "权限管理相关接口,包括权限查询等功能") -public interface PermissionManagementApi { - - default PermissionManagementApiDelegate getDelegate() { - return new PermissionManagementApiDelegate() {}; - } - - /** - * POST /openapi/v1/system/roles/create-application : 分配建应用角色 (new added) - * - * - * @param operator 操作人用户名 (optional) - * @param requestBody (optional) - * @return (status code 200) - */ - @Operation( - operationId = "addCreateApplicationRoleToUsers", - summary = "分配建应用角色 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/system/roles/create-application", - consumes = { "application/json" } - ) - default ResponseEntity addCreateApplicationRoleToUsers( - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator, - @Parameter(name = "request_body", description = "") @Valid @RequestBody(required = false) List requestBody - ) { - return getDelegate().addCreateApplicationRoleToUsers(operator, requestBody); - } - - - /** - * POST /openapi/v1/apps/{appId}/roles/master : 分配AppMaster (new added) - * - * - * @param appId (required) - * @param userId the user which role assign to (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - */ - @Operation( - operationId = "addManageAppMasterRoleToUser", - summary = "分配AppMaster (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/apps/{appId}/roles/master" - ) - default ResponseEntity addManageAppMasterRoleToUser( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @NotNull @Parameter(name = "userId", description = "the user which role assign to", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "userId", required = true) String userId, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().addManageAppMasterRoleToUser(appId, userId, operator); - } - - - /** - * POST /openapi/v1/apps/{appId}/roles/{roleType} : 分配应用角色 (new added) - * - * - * @param appId (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @param body (optional) - * @return (status code 200) - */ - @Operation( - operationId = "assignAppRoleToUser", - summary = "分配应用角色 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/apps/{appId}/roles/{roleType}", - consumes = { "application/json" } - ) - default ResponseEntity assignAppRoleToUser( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "roleType", description = "", required = true, in = ParameterIn.PATH) @PathVariable("roleType") String roleType, - @NotNull @Parameter(name = "userId", description = "the user which role removed from", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "userId", required = true) String userId, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator, - @Parameter(name = "body", description = "") @Valid @RequestBody(required = false) String body - ) { - return getDelegate().assignAppRoleToUser(appId, roleType, userId, operator, body); - } - - - /** - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/roles/{roleType} : 分配集群Namespace角色 (new added) - * - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param roleType (required) - * @param userId the user which role assigned to (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - */ - @Operation( - operationId = "assignClusterNamespaceRoleToUser", - summary = "分配集群Namespace角色 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/roles/{roleType}" - ) - default ResponseEntity assignClusterNamespaceRoleToUser( - @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 = "roleType", description = "", required = true, in = ParameterIn.PATH) @PathVariable("roleType") String roleType, - @NotNull @Parameter(name = "userId", description = "the user which role assigned to", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "userId", required = true) String userId, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().assignClusterNamespaceRoleToUser(appId, env, clusterName, roleType, userId, operator); - } - - - /** - * POST /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType} : 分配环境Namespace角色 (new added) - * - * - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role assigned to (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - */ - @Operation( - operationId = "assignNamespaceEnvRoleToUser", - summary = "分配环境Namespace角色 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType}" - ) - default ResponseEntity assignNamespaceEnvRoleToUser( - @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 = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "roleType", description = "", required = true, in = ParameterIn.PATH) @PathVariable("roleType") String roleType, - @NotNull @Parameter(name = "userId", description = "the user which role assigned to", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "userId", required = true) String userId, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().assignNamespaceEnvRoleToUser(appId, env, namespaceName, roleType, userId, operator); - } - - - /** - * POST /openapi/v1/apps/{appId}/namespaces/{namespaceName}/roles/{roleType} : 分配Namespace角色 (new added) - * - * - * @param appId (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role assigned to (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - */ - @Operation( - operationId = "assignNamespaceRoleToUser", - summary = "分配Namespace角色 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/apps/{appId}/namespaces/{namespaceName}/roles/{roleType}" - ) - default ResponseEntity assignNamespaceRoleToUser( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "roleType", description = "", required = true, in = ParameterIn.PATH) @PathVariable("roleType") String roleType, - @NotNull @Parameter(name = "userId", description = "the user which role assigned to", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "userId", required = true) String userId, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().assignNamespaceRoleToUser(appId, namespaceName, roleType, userId, operator); - } - - - /** - * DELETE /openapi/v1/system/roles/create-application : 移除建应用角色 (new added) - * - * - * @param userId (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - */ - @Operation( - operationId = "deleteCreateApplicationRoleFromUser", - summary = "移除建应用角色 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.DELETE, - value = "/openapi/v1/system/roles/create-application" - ) - default ResponseEntity deleteCreateApplicationRoleFromUser( - @NotNull @Parameter(name = "userId", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "userId", required = true) String userId, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().deleteCreateApplicationRoleFromUser(userId, operator); - } - - - /** - * GET /openapi/v1/apps/{appId}/role-users : 获取应用角色用户 (new added) - * - * - * @param appId (required) - * @return (status code 200) - */ - @Operation( - operationId = "getAppRoles", - summary = "获取应用角色用户 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenAppRoleUserDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/role-users", - produces = { "application/json" } - ) - default ResponseEntity getAppRoles( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId - ) { - return getDelegate().getAppRoles(appId); - } - - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/role-users : 获取集群Namespace用户 (new added) - * - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @return (status code 200) - */ - @Operation( - operationId = "getClusterNamespaceRoles", - summary = "获取集群Namespace用户 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenClusterNamespaceRoleUserDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/role-users", - produces = { "application/json" } - ) - default ResponseEntity getClusterNamespaceRoles( - @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 - ) { - return getDelegate().getClusterNamespaceRoles(appId, env, clusterName); - } - - - /** - * GET /openapi/v1/system/roles/create-application/role-users : 获取建应用用户 (new added) - * - * - * @return (status code 200) - */ - @Operation( - operationId = "getCreateApplicationRoleUsers", - summary = "获取建应用用户 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = String.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/system/roles/create-application/role-users", - produces = { "application/json" } - ) - default ResponseEntity> getCreateApplicationRoleUsers( - - ) { - return getDelegate().getCreateApplicationRoleUsers(); - } - - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/role-users : 获取环境Namespace用户 (new added) - * - * - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @return (status code 200) - */ - @Operation( - operationId = "getNamespaceEnvRoleUsers", - summary = "获取环境Namespace用户 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenEnvNamespaceRoleUserDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/role-users", - produces = { "application/json" } - ) - default ResponseEntity getNamespaceEnvRoleUsers( - @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 = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName - ) { - return getDelegate().getNamespaceEnvRoleUsers(appId, env, namespaceName); - } - - - /** - * GET /openapi/v1/apps/{appId}/namespaces/{namespaceName}/role-users : 获取Namespace用户 (new added) - * - * - * @param appId (required) - * @param namespaceName (required) - * @return (status code 200) - */ - @Operation( - operationId = "getNamespaceRoles", - summary = "获取Namespace用户 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenNamespaceRoleUserDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/namespaces/{namespaceName}/role-users", - produces = { "application/json" } - ) - default ResponseEntity getNamespaceRoles( - @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 - ) { - return getDelegate().getNamespaceRoles(appId, namespaceName); - } - - - /** - * GET /openapi/v1/apps/{appId}/permissions/{permissionType} : 校验应用权限 (new added) - * - * - * @param appId (required) - * @param permissionType (required) - * @param userId (required) - * @return (status code 200) - */ - @Operation( - operationId = "hasAppPermission", - summary = "校验应用权限 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenPermissionConditionDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/permissions/{permissionType}", - produces = { "application/json" } - ) - default ResponseEntity hasAppPermission( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "permissionType", description = "", required = true, in = ParameterIn.PATH) @PathVariable("permissionType") String permissionType, - @NotNull @Parameter(name = "userId", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "userId", required = true) String userId - ) { - return getDelegate().hasAppPermission(appId, permissionType, userId); - } - - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permissions/{permissionType} : 校验集群Namespace权限 (new added) - * - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param permissionType (required) - * @param userId (required) - * @return (status code 200) - */ - @Operation( - operationId = "hasClusterNamespacePermission", - summary = "校验集群Namespace权限 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenPermissionConditionDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permissions/{permissionType}", - produces = { "application/json" } - ) - default ResponseEntity hasClusterNamespacePermission( - @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 = "permissionType", description = "", required = true, in = ParameterIn.PATH) @PathVariable("permissionType") String permissionType, - @NotNull @Parameter(name = "userId", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "userId", required = true) String userId - ) { - return getDelegate().hasClusterNamespacePermission(appId, env, clusterName, permissionType, userId); - } - - - /** - * GET /openapi/v1/system/roles/create-application : 校验建应用权限 (new added) - * - * - * @param userId (required) - * @return (status code 200) - */ - @Operation( - operationId = "hasCreateApplicationPermission", - summary = "校验建应用权限 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/system/roles/create-application", - produces = { "application/json" } - ) - default ResponseEntity> hasCreateApplicationPermission( - @NotNull @Parameter(name = "userId", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "userId", required = true) String userId - ) { - return getDelegate().hasCreateApplicationPermission(userId); - } - - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/permissions/{permissionType} : 校验环境Namespace权限 (new added) - * - * - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @param permissionType (required) - * @param userId (required) - * @return (status code 200) - */ - @Operation( - operationId = "hasEnvNamespacePermission", - summary = "校验环境Namespace权限 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenPermissionConditionDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/permissions/{permissionType}", - produces = { "application/json" } - ) - default ResponseEntity hasEnvNamespacePermission( - @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 = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "permissionType", description = "", required = true, in = ParameterIn.PATH) @PathVariable("permissionType") String permissionType, - @NotNull @Parameter(name = "userId", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "userId", required = true) String userId - ) { - return getDelegate().hasEnvNamespacePermission(appId, env, namespaceName, permissionType, userId); - } - - - /** - * GET /openapi/v1/apps/{appId}/namespaces/{namespaceName}/permissions/{permissionType} : 校验Namespace权限 (new added) - * - * - * @param appId (required) - * @param namespaceName (required) - * @param permissionType (required) - * @param userId (required) - * @return (status code 200) - */ - @Operation( - operationId = "hasNamespacePermission", - summary = "校验Namespace权限 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenPermissionConditionDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/namespaces/{namespaceName}/permissions/{permissionType}", - produces = { "application/json" } - ) - default ResponseEntity hasNamespacePermission( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "permissionType", description = "", required = true, in = ParameterIn.PATH) @PathVariable("permissionType") String permissionType, - @NotNull @Parameter(name = "userId", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "userId", required = true) String userId - ) { - return getDelegate().hasNamespacePermission(appId, namespaceName, permissionType, userId); - } - - - /** - * GET /openapi/v1/permissions/root : 校验Root权限 (new added) - * - * - * @param userId (required) - * @return (status code 200) - */ - @Operation( - operationId = "hasRootPermission", - summary = "校验Root权限 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenPermissionConditionDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/permissions/root", - produces = { "application/json" } - ) - default ResponseEntity hasRootPermission( - @NotNull @Parameter(name = "userId", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "userId", required = true) String userId - ) { - return getDelegate().hasRootPermission(userId); - } - - - /** - * POST /openapi/v1/apps/{appId}/namespaces/{namespaceName}/permission-init : 初始化应用权限 (new added) - * - * - * @param appId (required) - * @param namespaceName (required) - * @param operator 操作人用户名 (optional) - * @return 初始化成功 (status code 200) - */ - @Operation( - operationId = "initAppPermission", - summary = "初始化应用权限 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "初始化成功") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/apps/{appId}/namespaces/{namespaceName}/permission-init" - ) - default ResponseEntity initAppPermission( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().initAppPermission(appId, namespaceName, operator); - } - - - /** - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permission-init : 初始化集群Namespace权限 (new added) - * - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - */ - @Operation( - operationId = "initClusterNamespacePermission", - summary = "初始化集群Namespace权限 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permission-init" - ) - default ResponseEntity initClusterNamespacePermission( - @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 = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().initClusterNamespacePermission(appId, env, clusterName, operator); - } - - - /** - * GET /openapi/v1/system/role/manage-app-master : 校验AppMaster开关 (new added) - * - * - * @return (status code 200) - */ - @Operation( - operationId = "isManageAppMasterPermissionEnabled", - summary = "校验AppMaster开关 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Map.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/system/role/manage-app-master", - produces = { "application/json" } - ) - default ResponseEntity> isManageAppMasterPermissionEnabled( - - ) { - return getDelegate().isManageAppMasterPermissionEnabled(); - } - - - /** - * DELETE /openapi/v1/apps/{appId}/roles/{roleType} : 移除应用角色 (new added) - * - * - * @param appId (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - */ - @Operation( - operationId = "removeAppRoleFromUser", - summary = "移除应用角色 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.DELETE, - value = "/openapi/v1/apps/{appId}/roles/{roleType}" - ) - default ResponseEntity removeAppRoleFromUser( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "roleType", description = "", required = true, in = ParameterIn.PATH) @PathVariable("roleType") String roleType, - @NotNull @Parameter(name = "userId", description = "the user which role removed from", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "userId", required = true) String userId, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().removeAppRoleFromUser(appId, roleType, userId, operator); - } - - - /** - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/roles/{roleType} : 移除集群Namespace角色 (new added) - * - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - */ - @Operation( - operationId = "removeClusterNamespaceRoleFromUser", - summary = "移除集群Namespace角色 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.DELETE, - value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/roles/{roleType}" - ) - default ResponseEntity removeClusterNamespaceRoleFromUser( - @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 = "roleType", description = "", required = true, in = ParameterIn.PATH) @PathVariable("roleType") String roleType, - @NotNull @Parameter(name = "userId", description = "the user which role removed from", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "userId", required = true) String userId, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().removeClusterNamespaceRoleFromUser(appId, env, clusterName, roleType, userId, operator); - } - - - /** - * DELETE /openapi/v1/apps/{appId}/roles/master : 移除AppMaster (new added) - * - * - * @param appId (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - */ - @Operation( - operationId = "removeManageAppMasterRoleFromUser", - summary = "移除AppMaster (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.DELETE, - value = "/openapi/v1/apps/{appId}/roles/master" - ) - default ResponseEntity removeManageAppMasterRoleFromUser( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @NotNull @Parameter(name = "userId", description = "the user which role removed from", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "userId", required = true) String userId, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().removeManageAppMasterRoleFromUser(appId, userId, operator); - } - - - /** - * DELETE /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType} : 移除环境Namespace角色 (new added) - * - * - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - */ - @Operation( - operationId = "removeNamespaceEnvRoleFromUser", - summary = "移除环境Namespace角色 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.DELETE, - value = "/openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType}" - ) - default ResponseEntity removeNamespaceEnvRoleFromUser( - @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 = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "roleType", description = "", required = true, in = ParameterIn.PATH) @PathVariable("roleType") String roleType, - @NotNull @Parameter(name = "userId", description = "the user which role removed from", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "userId", required = true) String userId, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().removeNamespaceEnvRoleFromUser(appId, env, namespaceName, roleType, userId, operator); - } - - - /** - * DELETE /openapi/v1/apps/{appId}/namespaces/{namespaceName}/roles/{roleType} : 移除Namespace角色 (new added) - * - * - * @param appId (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - */ - @Operation( - operationId = "removeNamespaceRoleFromUser", - summary = "移除Namespace角色 (new added)", - description = "", - tags = { "Permission Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.DELETE, - value = "/openapi/v1/apps/{appId}/namespaces/{namespaceName}/roles/{roleType}" - ) - default ResponseEntity removeNamespaceRoleFromUser( - @Parameter(name = "appId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("appId") String appId, - @Parameter(name = "namespaceName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("namespaceName") String namespaceName, - @Parameter(name = "roleType", description = "", required = true, in = ParameterIn.PATH) @PathVariable("roleType") String roleType, - @NotNull @Parameter(name = "userId", description = "the user which role removed from", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "userId", required = true) String userId, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().removeNamespaceRoleFromUser(appId, namespaceName, roleType, userId, operator); - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/PermissionManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/PermissionManagementApiController.java deleted file mode 100644 index 6f9cb529..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/PermissionManagementApiController.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.apollo.openapi.server.api; - -import java.util.List; -import java.util.Map; -import com.apollo.openapi.server.model.OpenAppRoleUserDTO; -import com.apollo.openapi.server.model.OpenClusterNamespaceRoleUserDTO; -import com.apollo.openapi.server.model.OpenEnvNamespaceRoleUserDTO; -import com.apollo.openapi.server.model.OpenNamespaceRoleUserDTO; -import com.apollo.openapi.server.model.OpenPermissionConditionDTO; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.CookieValue; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Controller -@RequestMapping("${openapi.apolloOpen.base-path:}") -public class PermissionManagementApiController implements PermissionManagementApi { - - private final PermissionManagementApiDelegate delegate; - - public PermissionManagementApiController(@Autowired(required = false) PermissionManagementApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new PermissionManagementApiDelegate() {}); - } - - @Override - public PermissionManagementApiDelegate getDelegate() { - return delegate; - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/PermissionManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/PermissionManagementApiDelegate.java deleted file mode 100644 index 353aa253..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/PermissionManagementApiDelegate.java +++ /dev/null @@ -1,586 +0,0 @@ -package com.apollo.openapi.server.api; - -import java.util.List; -import java.util.Map; -import com.apollo.openapi.server.model.OpenAppRoleUserDTO; -import com.apollo.openapi.server.model.OpenClusterNamespaceRoleUserDTO; -import com.apollo.openapi.server.model.OpenEnvNamespaceRoleUserDTO; -import com.apollo.openapi.server.model.OpenNamespaceRoleUserDTO; -import com.apollo.openapi.server.model.OpenPermissionConditionDTO; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.context.request.NativeWebRequest; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -/** - * A delegate to be called by the {@link PermissionManagementApiController}}. - * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. - */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public interface PermissionManagementApiDelegate { - - default Optional getRequest() { - return Optional.empty(); - } - - /** - * POST /openapi/v1/system/roles/create-application : 分配建应用角色 (new added) - * - * - * @param operator 操作人用户名 (optional) - * @param requestBody (optional) - * @return (status code 200) - * @see PermissionManagementApi#addCreateApplicationRoleToUsers - */ - default ResponseEntity addCreateApplicationRoleToUsers(String operator, - List requestBody) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/apps/{appId}/roles/master : 分配AppMaster (new added) - * - * - * @param appId (required) - * @param userId the user which role assign to (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - * @see PermissionManagementApi#addManageAppMasterRoleToUser - */ - default ResponseEntity addManageAppMasterRoleToUser(String appId, - String userId, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/apps/{appId}/roles/{roleType} : 分配应用角色 (new added) - * - * - * @param appId (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @param body (optional) - * @return (status code 200) - * @see PermissionManagementApi#assignAppRoleToUser - */ - default ResponseEntity assignAppRoleToUser(String appId, - String roleType, - String userId, - String operator, - String body) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/roles/{roleType} : 分配集群Namespace角色 (new added) - * - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param roleType (required) - * @param userId the user which role assigned to (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - * @see PermissionManagementApi#assignClusterNamespaceRoleToUser - */ - default ResponseEntity assignClusterNamespaceRoleToUser(String appId, - String env, - String clusterName, - String roleType, - String userId, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType} : 分配环境Namespace角色 (new added) - * - * - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role assigned to (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - * @see PermissionManagementApi#assignNamespaceEnvRoleToUser - */ - default ResponseEntity assignNamespaceEnvRoleToUser(String appId, - String env, - String namespaceName, - String roleType, - String userId, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/apps/{appId}/namespaces/{namespaceName}/roles/{roleType} : 分配Namespace角色 (new added) - * - * - * @param appId (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role assigned to (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - * @see PermissionManagementApi#assignNamespaceRoleToUser - */ - default ResponseEntity assignNamespaceRoleToUser(String appId, - String namespaceName, - String roleType, - String userId, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * DELETE /openapi/v1/system/roles/create-application : 移除建应用角色 (new added) - * - * - * @param userId (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - * @see PermissionManagementApi#deleteCreateApplicationRoleFromUser - */ - default ResponseEntity deleteCreateApplicationRoleFromUser(String userId, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/role-users : 获取应用角色用户 (new added) - * - * - * @param appId (required) - * @return (status code 200) - * @see PermissionManagementApi#getAppRoles - */ - default ResponseEntity getAppRoles(String appId) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"appId\" : \"appId\", \"masterUsers\" : [ { \"name\" : \"name\", \"userId\" : \"userId\", \"email\" : \"email\", \"enabled\" : 0 }, { \"name\" : \"name\", \"userId\" : \"userId\", \"email\" : \"email\", \"enabled\" : 0 } ] }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/role-users : 获取集群Namespace用户 (new added) - * - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @return (status code 200) - * @see PermissionManagementApi#getClusterNamespaceRoles - */ - default ResponseEntity getClusterNamespaceRoles(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 = "{ \"cluster\" : \"cluster\", \"releaseRoleUsers\" : [ { \"name\" : \"name\", \"userId\" : \"userId\", \"email\" : \"email\", \"enabled\" : 0 }, { \"name\" : \"name\", \"userId\" : \"userId\", \"email\" : \"email\", \"enabled\" : 0 } ], \"appId\" : \"appId\", \"modifyRoleUsers\" : [ { \"name\" : \"name\", \"userId\" : \"userId\", \"email\" : \"email\", \"enabled\" : 0 }, { \"name\" : \"name\", \"userId\" : \"userId\", \"email\" : \"email\", \"enabled\" : 0 } ], \"env\" : \"env\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/system/roles/create-application/role-users : 获取建应用用户 (new added) - * - * - * @return (status code 200) - * @see PermissionManagementApi#getCreateApplicationRoleUsers - */ - default ResponseEntity> getCreateApplicationRoleUsers() { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ \"\", \"\" ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/role-users : 获取环境Namespace用户 (new added) - * - * - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @return (status code 200) - * @see PermissionManagementApi#getNamespaceEnvRoleUsers - */ - default ResponseEntity getNamespaceEnvRoleUsers(String appId, - String env, - String namespaceName) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"releaseRoleUsers\" : [ { \"name\" : \"name\", \"userId\" : \"userId\", \"email\" : \"email\", \"enabled\" : 0 }, { \"name\" : \"name\", \"userId\" : \"userId\", \"email\" : \"email\", \"enabled\" : 0 } ], \"appId\" : \"appId\", \"modifyRoleUsers\" : [ { \"name\" : \"name\", \"userId\" : \"userId\", \"email\" : \"email\", \"enabled\" : 0 }, { \"name\" : \"name\", \"userId\" : \"userId\", \"email\" : \"email\", \"enabled\" : 0 } ], \"env\" : \"env\", \"namespaceName\" : \"namespaceName\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/namespaces/{namespaceName}/role-users : 获取Namespace用户 (new added) - * - * - * @param appId (required) - * @param namespaceName (required) - * @return (status code 200) - * @see PermissionManagementApi#getNamespaceRoles - */ - default ResponseEntity getNamespaceRoles(String appId, - String namespaceName) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"releaseRoleUsers\" : [ { \"name\" : \"name\", \"userId\" : \"userId\", \"email\" : \"email\", \"enabled\" : 0 }, { \"name\" : \"name\", \"userId\" : \"userId\", \"email\" : \"email\", \"enabled\" : 0 } ], \"appId\" : \"appId\", \"modifyRoleUsers\" : [ { \"name\" : \"name\", \"userId\" : \"userId\", \"email\" : \"email\", \"enabled\" : 0 }, { \"name\" : \"name\", \"userId\" : \"userId\", \"email\" : \"email\", \"enabled\" : 0 } ], \"namespaceName\" : \"namespaceName\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/permissions/{permissionType} : 校验应用权限 (new added) - * - * - * @param appId (required) - * @param permissionType (required) - * @param userId (required) - * @return (status code 200) - * @see PermissionManagementApi#hasAppPermission - */ - default ResponseEntity hasAppPermission(String appId, - String permissionType, - String userId) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"hasPermission\" : true }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permissions/{permissionType} : 校验集群Namespace权限 (new added) - * - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param permissionType (required) - * @param userId (required) - * @return (status code 200) - * @see PermissionManagementApi#hasClusterNamespacePermission - */ - default ResponseEntity hasClusterNamespacePermission(String appId, - String env, - String clusterName, - String permissionType, - String userId) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"hasPermission\" : true }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/system/roles/create-application : 校验建应用权限 (new added) - * - * - * @param userId (required) - * @return (status code 200) - * @see PermissionManagementApi#hasCreateApplicationPermission - */ - default ResponseEntity> hasCreateApplicationPermission(String userId) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/permissions/{permissionType} : 校验环境Namespace权限 (new added) - * - * - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @param permissionType (required) - * @param userId (required) - * @return (status code 200) - * @see PermissionManagementApi#hasEnvNamespacePermission - */ - default ResponseEntity hasEnvNamespacePermission(String appId, - String env, - String namespaceName, - String permissionType, - String userId) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"hasPermission\" : true }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/namespaces/{namespaceName}/permissions/{permissionType} : 校验Namespace权限 (new added) - * - * - * @param appId (required) - * @param namespaceName (required) - * @param permissionType (required) - * @param userId (required) - * @return (status code 200) - * @see PermissionManagementApi#hasNamespacePermission - */ - default ResponseEntity hasNamespacePermission(String appId, - String namespaceName, - String permissionType, - String userId) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"hasPermission\" : true }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/permissions/root : 校验Root权限 (new added) - * - * - * @param userId (required) - * @return (status code 200) - * @see PermissionManagementApi#hasRootPermission - */ - default ResponseEntity hasRootPermission(String userId) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"hasPermission\" : true }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/apps/{appId}/namespaces/{namespaceName}/permission-init : 初始化应用权限 (new added) - * - * - * @param appId (required) - * @param namespaceName (required) - * @param operator 操作人用户名 (optional) - * @return 初始化成功 (status code 200) - * @see PermissionManagementApi#initAppPermission - */ - default ResponseEntity initAppPermission(String appId, - String namespaceName, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permission-init : 初始化集群Namespace权限 (new added) - * - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - * @see PermissionManagementApi#initClusterNamespacePermission - */ - default ResponseEntity initClusterNamespacePermission(String appId, - String env, - String clusterName, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/system/role/manage-app-master : 校验AppMaster开关 (new added) - * - * - * @return (status code 200) - * @see PermissionManagementApi#isManageAppMasterPermissionEnabled - */ - default ResponseEntity> isManageAppMasterPermissionEnabled() { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * DELETE /openapi/v1/apps/{appId}/roles/{roleType} : 移除应用角色 (new added) - * - * - * @param appId (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - * @see PermissionManagementApi#removeAppRoleFromUser - */ - default ResponseEntity removeAppRoleFromUser(String appId, - String roleType, - String userId, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/roles/{roleType} : 移除集群Namespace角色 (new added) - * - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - * @see PermissionManagementApi#removeClusterNamespaceRoleFromUser - */ - default ResponseEntity removeClusterNamespaceRoleFromUser(String appId, - String env, - String clusterName, - String roleType, - String userId, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * DELETE /openapi/v1/apps/{appId}/roles/master : 移除AppMaster (new added) - * - * - * @param appId (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - * @see PermissionManagementApi#removeManageAppMasterRoleFromUser - */ - default ResponseEntity removeManageAppMasterRoleFromUser(String appId, - String userId, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * DELETE /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType} : 移除环境Namespace角色 (new added) - * - * - * @param appId (required) - * @param env (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - * @see PermissionManagementApi#removeNamespaceEnvRoleFromUser - */ - default ResponseEntity removeNamespaceEnvRoleFromUser(String appId, - String env, - String namespaceName, - String roleType, - String userId, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * DELETE /openapi/v1/apps/{appId}/namespaces/{namespaceName}/roles/{roleType} : 移除Namespace角色 (new added) - * - * - * @param appId (required) - * @param namespaceName (required) - * @param roleType (required) - * @param userId the user which role removed from (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - * @see PermissionManagementApi#removeNamespaceRoleFromUser - */ - default ResponseEntity removeNamespaceRoleFromUser(String appId, - String namespaceName, - String roleType, - String userId, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApi.java deleted file mode 100644 index 60f732a3..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApi.java +++ /dev/null @@ -1,1311 +0,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 io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Parameters; -import io.swagger.v3.oas.annotations.media.ArraySchema; -import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.security.SecurityRequirement; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.enums.ParameterIn; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.Valid; -import javax.validation.constraints.*; -import java.util.List; -import java.util.Map; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Validated -@Tag(name = "Portal Management", description = "Portal UI 登录态管理接口,主要供当前版本 Portal 前端调用") -public interface PortalManagementApi { - - default PortalManagementApiDelegate getDelegate() { - return new PortalManagementApiDelegate() {}; - } - - /** - * POST /openapi/v1/favorites : 添加收藏(new added) - * POST /openapi/v1/favorites - * - * @param body (required) - * @return 成功添加收藏 (status code 200) - */ - @Operation( - operationId = "addFavorite", - summary = "添加收藏(new added)", - description = "POST /openapi/v1/favorites", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功添加收藏", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/favorites", - produces = { "application/json" }, - consumes = { "application/json" } - ) - default ResponseEntity addFavorite( - @Parameter(name = "body", description = "", required = true) @Valid @RequestBody Object body - ) { - return getDelegate().addFavorite(body); - } - - - /** - * POST /openapi/v1/consumers/{token}/assign-role : 给消费者授权(new added) - * POST /openapi/v1/consumers/{token}/assign-role - * - * @param token (required) - * @param type (required) - * @param body (required) - * @param envs (optional) - * @return 成功授权 (status code 200) - */ - @Operation( - operationId = "assignRoleToConsumer", - summary = "给消费者授权(new added)", - description = "POST /openapi/v1/consumers/{token}/assign-role", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功授权", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Object.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/consumers/{token}/assign-role", - produces = { "application/json" }, - consumes = { "application/json" } - ) - default ResponseEntity> assignRoleToConsumer( - @Parameter(name = "token", description = "", required = true, in = ParameterIn.PATH) @PathVariable("token") String token, - @NotNull @Parameter(name = "type", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "type", required = true) String type, - @Parameter(name = "body", description = "", required = true) @Valid @RequestBody Object body, - @Parameter(name = "envs", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "envs", required = false) String envs - ) { - return getDelegate().assignRoleToConsumer(token, type, body, envs); - } - - - /** - * HEAD /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export : 检查应用配置导出权限(new added) - * HEAD /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @return 可导出 (status code 200) - */ - @Operation( - operationId = "checkExportAppConfig", - summary = "检查应用配置导出权限(new added)", - description = "HEAD /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "可导出") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.HEAD, - value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export" - ) - default ResponseEntity checkExportAppConfig( - @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 - ) { - return getDelegate().checkExportAppConfig(appId, env, clusterName); - } - - - /** - * GET /openapi/v1/system-info/health : 检查系统实例健康状态(new added) - * GET /openapi/v1/system-info/health - * - * @param instanceId (required) - * @return 成功获取健康状态 (status code 200) - */ - @Operation( - operationId = "checkSystemHealth", - summary = "检查系统实例健康状态(new added)", - description = "GET /openapi/v1/system-info/health", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取健康状态", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/system-info/health", - produces = { "application/json" } - ) - default ResponseEntity checkSystemHealth( - @NotNull @Parameter(name = "instanceId", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "instanceId", required = true) String instanceId - ) { - return getDelegate().checkSystemHealth(instanceId); - } - - - /** - * POST /openapi/v1/consumers : 创建开放平台消费者(new added) - * POST /openapi/v1/consumers - * - * @param body (required) - * @param expires (optional) - * @return 成功创建消费者 (status code 200) - */ - @Operation( - operationId = "createConsumer", - summary = "创建开放平台消费者(new added)", - description = "POST /openapi/v1/consumers", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功创建消费者", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/consumers", - produces = { "application/json" }, - consumes = { "application/json" } - ) - default ResponseEntity createConsumer( - @Parameter(name = "body", description = "", required = true) @Valid @RequestBody Object body, - @Parameter(name = "expires", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "expires", required = false) String expires - ) { - return getDelegate().createConsumer(body, expires); - } - - - /** - * POST /openapi/v1/server/envs/{env}/config-db/config : 创建或更新Config DB配置(new added) - * POST /openapi/v1/server/envs/{env}/config-db/config - * - * @param env (required) - * @param body (required) - * @return 成功创建或更新配置 (status code 200) - */ - @Operation( - operationId = "createOrUpdateConfigDBConfig", - summary = "创建或更新Config DB配置(new added)", - description = "POST /openapi/v1/server/envs/{env}/config-db/config", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功创建或更新配置", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/server/envs/{env}/config-db/config", - produces = { "application/json" }, - consumes = { "application/json" } - ) - default ResponseEntity createOrUpdateConfigDBConfig( - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @Parameter(name = "body", description = "", required = true) @Valid @RequestBody Object body - ) { - return getDelegate().createOrUpdateConfigDBConfig(env, body); - } - - - /** - * POST /openapi/v1/server/portal-db/config : 创建或更新Portal DB配置(new added) - * POST /openapi/v1/server/portal-db/config - * - * @param body (required) - * @return 成功创建或更新配置 (status code 200) - */ - @Operation( - operationId = "createOrUpdatePortalDBConfig", - summary = "创建或更新Portal DB配置(new added)", - description = "POST /openapi/v1/server/portal-db/config", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功创建或更新配置", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/server/portal-db/config", - produces = { "application/json" }, - consumes = { "application/json" } - ) - default ResponseEntity createOrUpdatePortalDBConfig( - @Parameter(name = "body", description = "", required = true) @Valid @RequestBody Object body - ) { - return getDelegate().createOrUpdatePortalDBConfig(body); - } - - - /** - * DELETE /openapi/v1/server/envs/{env}/config-db/config : 删除Config DB配置(new added) - * DELETE /openapi/v1/server/envs/{env}/config-db/config - * - * @param env (required) - * @param key (required) - * @param cluster (required) - * @return 成功删除配置 (status code 200) - */ - @Operation( - operationId = "deleteConfigDBConfig", - summary = "删除Config DB配置(new added)", - description = "DELETE /openapi/v1/server/envs/{env}/config-db/config", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功删除配置") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.DELETE, - value = "/openapi/v1/server/envs/{env}/config-db/config" - ) - default ResponseEntity deleteConfigDBConfig( - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @NotNull @Parameter(name = "key", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "key", required = true) String key, - @NotNull @Parameter(name = "cluster", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "cluster", required = true) String cluster - ) { - return getDelegate().deleteConfigDBConfig(env, key, cluster); - } - - - /** - * DELETE /openapi/v1/consumers/by-appId : 按应用ID删除消费者(new added) - * DELETE /openapi/v1/consumers/by-appId - * - * @param appId (required) - * @return 成功删除消费者 (status code 200) - */ - @Operation( - operationId = "deleteConsumer", - summary = "按应用ID删除消费者(new added)", - description = "DELETE /openapi/v1/consumers/by-appId", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功删除消费者") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.DELETE, - value = "/openapi/v1/consumers/by-appId" - ) - default ResponseEntity deleteConsumer( - @NotNull @Parameter(name = "appId", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "appId", required = true) String appId - ) { - return getDelegate().deleteConsumer(appId); - } - - - /** - * DELETE /openapi/v1/favorites/{favoriteId} : 删除收藏(new added) - * DELETE /openapi/v1/favorites/{favoriteId} - * - * @param favoriteId (required) - * @return 成功删除收藏 (status code 200) - */ - @Operation( - operationId = "deleteFavorite", - summary = "删除收藏(new added)", - description = "DELETE /openapi/v1/favorites/{favoriteId}", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功删除收藏") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.DELETE, - value = "/openapi/v1/favorites/{favoriteId}" - ) - default ResponseEntity deleteFavorite( - @Parameter(name = "favoriteId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("favoriteId") Long favoriteId - ) { - return getDelegate().deleteFavorite(favoriteId); - } - - - /** - * DELETE /openapi/v1/server/portal-db/config : 删除Portal DB配置(new added) - * DELETE /openapi/v1/server/portal-db/config - * - * @param key (required) - * @return 成功删除配置 (status code 200) - */ - @Operation( - operationId = "deletePortalDBConfig", - summary = "删除Portal DB配置(new added)", - description = "DELETE /openapi/v1/server/portal-db/config", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功删除配置") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.DELETE, - value = "/openapi/v1/server/portal-db/config" - ) - default ResponseEntity deletePortalDBConfig( - @NotNull @Parameter(name = "key", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "key", required = true) String key - ) { - return getDelegate().deletePortalDBConfig(key); - } - - - /** - * GET /openapi/v1/configs/export : 导出所有配置(new added) - * GET /openapi/v1/configs/export - * - * @param envs (required) - * @return 成功导出配置 (status code 200) - */ - @Operation( - operationId = "exportAllConfigs", - summary = "导出所有配置(new added)", - description = "GET /openapi/v1/configs/export", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功导出配置", content = { - @Content(mediaType = "application/octet-stream", schema = @Schema(implementation = org.springframework.core.io.Resource.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/configs/export", - produces = { "application/octet-stream" } - ) - default ResponseEntity exportAllConfigs( - @NotNull @Parameter(name = "envs", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "envs", required = true) String envs - ) { - return getDelegate().exportAllConfigs(envs); - } - - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export : 导出应用配置(new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @return 成功导出应用配置 (status code 200) - */ - @Operation( - operationId = "exportAppConfig", - summary = "导出应用配置(new added)", - description = "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功导出应用配置", content = { - @Content(mediaType = "application/octet-stream", schema = @Schema(implementation = org.springframework.core.io.Resource.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export", - produces = { "application/octet-stream" } - ) - default ResponseEntity exportAppConfig( - @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 - ) { - return getDelegate().exportAppConfig(appId, env, clusterName); - } - - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export : 导出命名空间配置项(new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return 成功导出命名空间配置项 (status code 200) - */ - @Operation( - operationId = "exportNamespaceItems", - summary = "导出命名空间配置项(new added)", - description = "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功导出命名空间配置项", content = { - @Content(mediaType = "application/octet-stream", schema = @Schema(implementation = org.springframework.core.io.Resource.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export", - produces = { "application/octet-stream" } - ) - default ResponseEntity exportNamespaceItems( - @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().exportNamespaceItems(appId, env, clusterName, namespaceName); - } - - - /** - * GET /openapi/v1/server/envs/{env}/config-db/config/find-all-config : 查询指定环境全部Config DB配置(new added) - * GET /openapi/v1/server/envs/{env}/config-db/config/find-all-config - * - * @param env (required) - * @return 成功获取配置列表 (status code 200) - */ - @Operation( - operationId = "findAllConfigDBConfig", - summary = "查询指定环境全部Config DB配置(new added)", - description = "GET /openapi/v1/server/envs/{env}/config-db/config/find-all-config", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取配置列表", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Object.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/server/envs/{env}/config-db/config/find-all-config", - produces = { "application/json" } - ) - default ResponseEntity> findAllConfigDBConfig( - @Parameter(name = "env", description = "", required = true, in = ParameterIn.PATH) @PathVariable("env") String env - ) { - return getDelegate().findAllConfigDBConfig(env); - } - - - /** - * GET /openapi/v1/server/portal-db/config/find-all-config : 查询全部Portal DB配置(new added) - * GET /openapi/v1/server/portal-db/config/find-all-config - * - * @return 成功获取配置列表 (status code 200) - */ - @Operation( - operationId = "findAllPortalDBConfig", - summary = "查询全部Portal DB配置(new added)", - description = "GET /openapi/v1/server/portal-db/config/find-all-config", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取配置列表", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Object.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/server/portal-db/config/find-all-config", - produces = { "application/json" } - ) - default ResponseEntity> findAllPortalDBConfig( - - ) { - return getDelegate().findAllPortalDBConfig(); - } - - - /** - * GET /openapi/v1/apollo/audit/logs/dataInfluences/field : 查询审计数据影响(new added) - * GET /openapi/v1/apollo/audit/logs/dataInfluences/field - * - * @param entityName (required) - * @param entityId (required) - * @param fieldName (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return 成功获取审计数据影响 (status code 200) - */ - @Operation( - operationId = "findAuditDataInfluencesByField", - summary = "查询审计数据影响(new added)", - description = "GET /openapi/v1/apollo/audit/logs/dataInfluences/field", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取审计数据影响", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Object.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apollo/audit/logs/dataInfluences/field", - produces = { "application/json" } - ) - default ResponseEntity> findAuditDataInfluencesByField( - @NotNull @Parameter(name = "entityName", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "entityName", required = true) String entityName, - @NotNull @Parameter(name = "entityId", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "entityId", required = true) String entityId, - @NotNull @Parameter(name = "fieldName", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "fieldName", required = true) String fieldName, - @Parameter(name = "page", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = false, defaultValue = "0") Integer page, - @Parameter(name = "size", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = false, defaultValue = "10") Integer size - ) { - return getDelegate().findAuditDataInfluencesByField(entityName, entityId, fieldName, page, size); - } - - - /** - * GET /openapi/v1/apollo/audit/logs : 查询审计日志(new added) - * GET /openapi/v1/apollo/audit/logs - * - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return 成功获取审计日志 (status code 200) - */ - @Operation( - operationId = "findAuditLogs", - summary = "查询审计日志(new added)", - description = "GET /openapi/v1/apollo/audit/logs", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取审计日志", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Object.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apollo/audit/logs", - produces = { "application/json" } - ) - default ResponseEntity> findAuditLogs( - @Parameter(name = "page", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = false, defaultValue = "0") Integer page, - @Parameter(name = "size", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = false, defaultValue = "10") Integer size - ) { - return getDelegate().findAuditLogs(page, size); - } - - - /** - * GET /openapi/v1/apollo/audit/logs/opName : 按操作名查询审计日志(new added) - * GET /openapi/v1/apollo/audit/logs/opName - * - * @param opName (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @param startDate (optional) - * @param endDate (optional) - * @return 成功获取审计日志 (status code 200) - */ - @Operation( - operationId = "findAuditLogsByOpName", - summary = "按操作名查询审计日志(new added)", - description = "GET /openapi/v1/apollo/audit/logs/opName", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取审计日志", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Object.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apollo/audit/logs/opName", - produces = { "application/json" } - ) - default ResponseEntity> findAuditLogsByOpName( - @NotNull @Parameter(name = "opName", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "opName", required = true) String opName, - @Parameter(name = "page", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = false, defaultValue = "0") Integer page, - @Parameter(name = "size", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = false, defaultValue = "10") Integer size, - @Parameter(name = "startDate", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "startDate", required = false) String startDate, - @Parameter(name = "endDate", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "endDate", required = false) String endDate - ) { - return getDelegate().findAuditLogsByOpName(opName, page, size, startDate, endDate); - } - - - /** - * GET /openapi/v1/apollo/audit/trace : 查询审计链路详情(new added) - * GET /openapi/v1/apollo/audit/trace - * - * @param traceId (required) - * @return 成功获取审计链路详情 (status code 200) - */ - @Operation( - operationId = "findAuditTraceDetails", - summary = "查询审计链路详情(new added)", - description = "GET /openapi/v1/apollo/audit/trace", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取审计链路详情", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Object.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apollo/audit/trace", - produces = { "application/json" } - ) - default ResponseEntity> findAuditTraceDetails( - @NotNull @Parameter(name = "traceId", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "traceId", required = true) String traceId - ) { - return getDelegate().findAuditTraceDetails(traceId); - } - - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits : 查询命名空间提交记录(new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (optional) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return 成功获取提交记录 (status code 200) - */ - @Operation( - operationId = "findCommits", - summary = "查询命名空间提交记录(new added)", - description = "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取提交记录", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Object.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits", - produces = { "application/json" } - ) - default ResponseEntity> findCommits( - @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 = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "key", required = false) String key, - @Parameter(name = "page", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = false, defaultValue = "0") Integer page, - @Parameter(name = "size", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = false, defaultValue = "10") Integer size - ) { - return getDelegate().findCommits(appId, env, clusterName, namespaceName, key, page, size); - } - - - /** - * GET /openapi/v1/favorites : 查询收藏(new added) - * GET /openapi/v1/favorites - * - * @param userId (optional) - * @param appId (optional) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return 成功获取收藏 (status code 200) - */ - @Operation( - operationId = "findFavorites", - summary = "查询收藏(new added)", - description = "GET /openapi/v1/favorites", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取收藏", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Object.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/favorites", - produces = { "application/json" } - ) - default ResponseEntity> findFavorites( - @Parameter(name = "userId", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "userId", required = false) String userId, - @Parameter(name = "appId", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "appId", required = false) String appId, - @Parameter(name = "page", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = false, defaultValue = "0") Integer page, - @Parameter(name = "size", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = false, defaultValue = "10") Integer size - ) { - return getDelegate().findFavorites(userId, appId, page, size); - } - - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories : 查询命名空间发布历史(new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return 成功获取发布历史 (status code 200) - */ - @Operation( - operationId = "findReleaseHistoriesByNamespace", - summary = "查询命名空间发布历史(new added)", - description = "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取发布历史", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Object.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories", - produces = { "application/json" } - ) - default ResponseEntity> findReleaseHistoriesByNamespace( - @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 = "page", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = false, defaultValue = "0") Integer page, - @Parameter(name = "size", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = false, defaultValue = "10") Integer size - ) { - return getDelegate().findReleaseHistoriesByNamespace(appId, env, clusterName, namespaceName, page, size); - } - - - /** - * GET /openapi/v1/apollo/audit/properties : 获取审计配置(new added) - * GET /openapi/v1/apollo/audit/properties - * - * @return 成功获取审计配置 (status code 200) - */ - @Operation( - operationId = "getAuditProperties", - summary = "获取审计配置(new added)", - description = "GET /openapi/v1/apollo/audit/properties", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取审计配置", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apollo/audit/properties", - produces = { "application/json" } - ) - default ResponseEntity getAuditProperties( - - ) { - return getDelegate().getAuditProperties(); - } - - - /** - * GET /openapi/v1/consumers : 查询开放平台消费者列表(new added) - * GET /openapi/v1/consumers - * - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return 成功获取消费者列表 (status code 200) - */ - @Operation( - operationId = "getConsumerList", - summary = "查询开放平台消费者列表(new added)", - description = "GET /openapi/v1/consumers", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取消费者列表", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Object.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/consumers", - produces = { "application/json" } - ) - default ResponseEntity> getConsumerList( - @Parameter(name = "page", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = false, defaultValue = "0") Integer page, - @Parameter(name = "size", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = false, defaultValue = "10") Integer size - ) { - return getDelegate().getConsumerList(page, size); - } - - - /** - * GET /openapi/v1/consumer-tokens/by-appId : 按应用ID查询消费者Token(new added) - * GET /openapi/v1/consumer-tokens/by-appId - * - * @param appId (required) - * @return 成功获取消费者Token (status code 200) - */ - @Operation( - operationId = "getConsumerTokenByAppId", - summary = "按应用ID查询消费者Token(new added)", - description = "GET /openapi/v1/consumer-tokens/by-appId", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取消费者Token", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/consumer-tokens/by-appId", - produces = { "application/json" } - ) - default ResponseEntity getConsumerTokenByAppId( - @NotNull @Parameter(name = "appId", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "appId", required = true) String appId - ) { - return getDelegate().getConsumerTokenByAppId(appId); - } - - - /** - * GET /openapi/v1/page-settings : 获取Portal页面配置(new added) - * GET /openapi/v1/page-settings - * - * @return 成功获取页面配置 (status code 200) - */ - @Operation( - operationId = "getPageSettings", - summary = "获取Portal页面配置(new added)", - description = "GET /openapi/v1/page-settings", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取页面配置", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/page-settings", - produces = { "application/json" } - ) - default ResponseEntity getPageSettings( - - ) { - return getDelegate().getPageSettings(); - } - - - /** - * GET /openapi/v1/system-info : 获取系统信息(new added) - * GET /openapi/v1/system-info - * - * @return 成功获取系统信息 (status code 200) - */ - @Operation( - operationId = "getSystemInfo", - summary = "获取系统信息(new added)", - description = "GET /openapi/v1/system-info", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取系统信息", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/system-info", - produces = { "application/json" } - ) - default ResponseEntity getSystemInfo( - - ) { - return getDelegate().getSystemInfo(); - } - - - /** - * POST /openapi/v1/configs/import : 导入所有配置(new added) - * POST /openapi/v1/configs/import - * - * @param envs (required) - * @param conflictAction (optional, default to ignore) - * @param file (optional) - * @return 导入成功 (status code 200) - */ - @Operation( - operationId = "importAllConfigs", - summary = "导入所有配置(new added)", - description = "POST /openapi/v1/configs/import", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "导入成功") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/configs/import", - consumes = { "multipart/form-data" } - ) - default ResponseEntity importAllConfigs( - @NotNull @Parameter(name = "envs", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "envs", required = true) String envs, - @Parameter(name = "conflictAction", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "conflictAction", required = false, defaultValue = "ignore") String conflictAction, - @Parameter(name = "file", description = "") @RequestPart(value = "file", required = false) MultipartFile file - ) { - return getDelegate().importAllConfigs(envs, conflictAction, file); - } - - - /** - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import : 导入应用配置(new added) - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param conflictAction (optional, default to ignore) - * @param file (optional) - * @return 导入成功 (status code 200) - */ - @Operation( - operationId = "importAppConfig", - summary = "导入应用配置(new added)", - description = "POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "导入成功") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import", - consumes = { "multipart/form-data" } - ) - default ResponseEntity importAppConfig( - @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 = "conflictAction", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "conflictAction", required = false, defaultValue = "ignore") String conflictAction, - @Parameter(name = "file", description = "") @RequestPart(value = "file", required = false) MultipartFile file - ) { - return getDelegate().importAppConfig(appId, env, clusterName, conflictAction, file); - } - - - /** - * POST /openapi/v1/import : 导入配置兼容入口(new added) - * POST /openapi/v1/import - * - * @param envs (required) - * @param conflictAction (optional, default to ignore) - * @param file (optional) - * @return 导入成功 (status code 200) - */ - @Operation( - operationId = "importConfig", - summary = "导入配置兼容入口(new added)", - description = "POST /openapi/v1/import", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "导入成功") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/import", - consumes = { "multipart/form-data" } - ) - default ResponseEntity importConfig( - @NotNull @Parameter(name = "envs", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "envs", required = true) String envs, - @Parameter(name = "conflictAction", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "conflictAction", required = false, defaultValue = "ignore") String conflictAction, - @Parameter(name = "file", description = "") @RequestPart(value = "file", required = false) MultipartFile file - ) { - return getDelegate().importConfig(envs, conflictAction, file); - } - - - /** - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import : 导入命名空间配置项(new added) - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param file (optional) - * @return 导入成功 (status code 200) - */ - @Operation( - operationId = "importNamespaceItems", - summary = "导入命名空间配置项(new added)", - description = "POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "导入成功") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import", - consumes = { "multipart/form-data" } - ) - default ResponseEntity importNamespaceItems( - @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 = "file", description = "") @RequestPart(value = "file", required = false) MultipartFile file - ) { - return getDelegate().importNamespaceItems(appId, env, clusterName, namespaceName, file); - } - - - /** - * GET /openapi/v1/apps/search/by-appid-or-name : 按应用ID或名称搜索应用(new added) - * GET /openapi/v1/apps/search/by-appid-or-name - * - * @param query (optional) - * @param page (optional, default to 0) - * @param size (optional, default to 20) - * @return 成功搜索应用 (status code 200) - */ - @Operation( - operationId = "searchAppsByAppIdOrName", - summary = "按应用ID或名称搜索应用(new added)", - description = "GET /openapi/v1/apps/search/by-appid-or-name", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功搜索应用", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apps/search/by-appid-or-name", - produces = { "application/json" } - ) - default ResponseEntity searchAppsByAppIdOrName( - @Parameter(name = "query", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "query", required = false) String query, - @Parameter(name = "page", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = false, defaultValue = "0") Integer page, - @Parameter(name = "size", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = false, defaultValue = "20") Integer size - ) { - return getDelegate().searchAppsByAppIdOrName(query, page, size); - } - - - /** - * GET /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator : 搜索审计日志(new added) - * GET /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator - * - * @param query (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return 成功搜索审计日志 (status code 200) - */ - @Operation( - operationId = "searchAuditLogs", - summary = "搜索审计日志(new added)", - description = "GET /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功搜索审计日志", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = Object.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/apollo/audit/logs/by-name-or-type-or-operator", - produces = { "application/json" } - ) - default ResponseEntity> searchAuditLogs( - @NotNull @Parameter(name = "query", description = "", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "query", required = true) String query, - @Parameter(name = "page", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "page", required = false, defaultValue = "0") Integer page, - @Parameter(name = "size", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "size", required = false, defaultValue = "10") Integer size - ) { - return getDelegate().searchAuditLogs(query, page, size); - } - - - /** - * GET /openapi/v1/global-search/item-info/by-key-or-value : 按Key或Value全局搜索配置(new added) - * GET /openapi/v1/global-search/item-info/by-key-or-value - * - * @param key (optional, default to ) - * @param value (optional, default to ) - * @return 成功搜索配置 (status code 200) - */ - @Operation( - operationId = "searchItemInfoByKeyOrValue", - summary = "按Key或Value全局搜索配置(new added)", - description = "GET /openapi/v1/global-search/item-info/by-key-or-value", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功搜索配置", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/global-search/item-info/by-key-or-value", - produces = { "application/json" } - ) - default ResponseEntity searchItemInfoByKeyOrValue( - @Parameter(name = "key", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "key", required = false, defaultValue = "") String key, - @Parameter(name = "value", description = "", in = ParameterIn.QUERY) @Valid @RequestParam(value = "value", required = false, defaultValue = "") String value - ) { - return getDelegate().searchItemInfoByKeyOrValue(key, value); - } - - - /** - * PUT /openapi/v1/favorites/{favoriteId} : 收藏置顶(new added) - * PUT /openapi/v1/favorites/{favoriteId} - * - * @param favoriteId (required) - * @return 成功置顶收藏 (status code 200) - */ - @Operation( - operationId = "topFavorite", - summary = "收藏置顶(new added)", - description = "PUT /openapi/v1/favorites/{favoriteId}", - tags = { "Portal Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功置顶收藏") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.PUT, - value = "/openapi/v1/favorites/{favoriteId}" - ) - default ResponseEntity topFavorite( - @Parameter(name = "favoriteId", description = "", required = true, in = ParameterIn.PATH) @PathVariable("favoriteId") Long favoriteId - ) { - return getDelegate().topFavorite(favoriteId); - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApiController.java deleted file mode 100644 index 5f05e1e3..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApiController.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.apollo.openapi.server.api; - - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.CookieValue; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Controller -@RequestMapping("${openapi.apolloOpen.base-path:}") -public class PortalManagementApiController implements PortalManagementApi { - - private final PortalManagementApiDelegate delegate; - - public PortalManagementApiController(@Autowired(required = false) PortalManagementApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new PortalManagementApiDelegate() {}); - } - - @Override - public PortalManagementApiDelegate getDelegate() { - return delegate; - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApiDelegate.java deleted file mode 100644 index d4905115..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/PortalManagementApiDelegate.java +++ /dev/null @@ -1,707 +0,0 @@ -package com.apollo.openapi.server.api; - -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.context.request.NativeWebRequest; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -/** - * A delegate to be called by the {@link PortalManagementApiController}}. - * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. - */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public interface PortalManagementApiDelegate { - - default Optional getRequest() { - return Optional.empty(); - } - - /** - * POST /openapi/v1/favorites : 添加收藏(new added) - * POST /openapi/v1/favorites - * - * @param body (required) - * @return 成功添加收藏 (status code 200) - * @see PortalManagementApi#addFavorite - */ - default ResponseEntity addFavorite(Object body) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/consumers/{token}/assign-role : 给消费者授权(new added) - * POST /openapi/v1/consumers/{token}/assign-role - * - * @param token (required) - * @param type (required) - * @param body (required) - * @param envs (optional) - * @return 成功授权 (status code 200) - * @see PortalManagementApi#assignRoleToConsumer - */ - default ResponseEntity> assignRoleToConsumer(String token, - String type, - Object body, - String envs) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ \"{}\", \"{}\" ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * HEAD /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export : 检查应用配置导出权限(new added) - * HEAD /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @return 可导出 (status code 200) - * @see PortalManagementApi#checkExportAppConfig - */ - default ResponseEntity checkExportAppConfig(String appId, - String env, - String clusterName) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/system-info/health : 检查系统实例健康状态(new added) - * GET /openapi/v1/system-info/health - * - * @param instanceId (required) - * @return 成功获取健康状态 (status code 200) - * @see PortalManagementApi#checkSystemHealth - */ - default ResponseEntity checkSystemHealth(String instanceId) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/consumers : 创建开放平台消费者(new added) - * POST /openapi/v1/consumers - * - * @param body (required) - * @param expires (optional) - * @return 成功创建消费者 (status code 200) - * @see PortalManagementApi#createConsumer - */ - default ResponseEntity createConsumer(Object body, - String expires) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/server/envs/{env}/config-db/config : 创建或更新Config DB配置(new added) - * POST /openapi/v1/server/envs/{env}/config-db/config - * - * @param env (required) - * @param body (required) - * @return 成功创建或更新配置 (status code 200) - * @see PortalManagementApi#createOrUpdateConfigDBConfig - */ - default ResponseEntity createOrUpdateConfigDBConfig(String env, - Object body) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/server/portal-db/config : 创建或更新Portal DB配置(new added) - * POST /openapi/v1/server/portal-db/config - * - * @param body (required) - * @return 成功创建或更新配置 (status code 200) - * @see PortalManagementApi#createOrUpdatePortalDBConfig - */ - default ResponseEntity createOrUpdatePortalDBConfig(Object body) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * DELETE /openapi/v1/server/envs/{env}/config-db/config : 删除Config DB配置(new added) - * DELETE /openapi/v1/server/envs/{env}/config-db/config - * - * @param env (required) - * @param key (required) - * @param cluster (required) - * @return 成功删除配置 (status code 200) - * @see PortalManagementApi#deleteConfigDBConfig - */ - default ResponseEntity deleteConfigDBConfig(String env, - String key, - String cluster) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * DELETE /openapi/v1/consumers/by-appId : 按应用ID删除消费者(new added) - * DELETE /openapi/v1/consumers/by-appId - * - * @param appId (required) - * @return 成功删除消费者 (status code 200) - * @see PortalManagementApi#deleteConsumer - */ - default ResponseEntity deleteConsumer(String appId) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * DELETE /openapi/v1/favorites/{favoriteId} : 删除收藏(new added) - * DELETE /openapi/v1/favorites/{favoriteId} - * - * @param favoriteId (required) - * @return 成功删除收藏 (status code 200) - * @see PortalManagementApi#deleteFavorite - */ - default ResponseEntity deleteFavorite(Long favoriteId) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * DELETE /openapi/v1/server/portal-db/config : 删除Portal DB配置(new added) - * DELETE /openapi/v1/server/portal-db/config - * - * @param key (required) - * @return 成功删除配置 (status code 200) - * @see PortalManagementApi#deletePortalDBConfig - */ - default ResponseEntity deletePortalDBConfig(String key) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/configs/export : 导出所有配置(new added) - * GET /openapi/v1/configs/export - * - * @param envs (required) - * @return 成功导出配置 (status code 200) - * @see PortalManagementApi#exportAllConfigs - */ - default ResponseEntity exportAllConfigs(String envs) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export : 导出应用配置(new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @return 成功导出应用配置 (status code 200) - * @see PortalManagementApi#exportAppConfig - */ - default ResponseEntity exportAppConfig(String appId, - String env, - String clusterName) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export : 导出命名空间配置项(new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @return 成功导出命名空间配置项 (status code 200) - * @see PortalManagementApi#exportNamespaceItems - */ - default ResponseEntity exportNamespaceItems(String appId, - String env, - String clusterName, - String namespaceName) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/server/envs/{env}/config-db/config/find-all-config : 查询指定环境全部Config DB配置(new added) - * GET /openapi/v1/server/envs/{env}/config-db/config/find-all-config - * - * @param env (required) - * @return 成功获取配置列表 (status code 200) - * @see PortalManagementApi#findAllConfigDBConfig - */ - default ResponseEntity> findAllConfigDBConfig(String env) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ \"{}\", \"{}\" ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/server/portal-db/config/find-all-config : 查询全部Portal DB配置(new added) - * GET /openapi/v1/server/portal-db/config/find-all-config - * - * @return 成功获取配置列表 (status code 200) - * @see PortalManagementApi#findAllPortalDBConfig - */ - default ResponseEntity> findAllPortalDBConfig() { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ \"{}\", \"{}\" ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apollo/audit/logs/dataInfluences/field : 查询审计数据影响(new added) - * GET /openapi/v1/apollo/audit/logs/dataInfluences/field - * - * @param entityName (required) - * @param entityId (required) - * @param fieldName (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return 成功获取审计数据影响 (status code 200) - * @see PortalManagementApi#findAuditDataInfluencesByField - */ - default ResponseEntity> findAuditDataInfluencesByField(String entityName, - String entityId, - String fieldName, - Integer page, - Integer size) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ \"{}\", \"{}\" ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apollo/audit/logs : 查询审计日志(new added) - * GET /openapi/v1/apollo/audit/logs - * - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return 成功获取审计日志 (status code 200) - * @see PortalManagementApi#findAuditLogs - */ - default ResponseEntity> findAuditLogs(Integer page, - Integer size) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ \"{}\", \"{}\" ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apollo/audit/logs/opName : 按操作名查询审计日志(new added) - * GET /openapi/v1/apollo/audit/logs/opName - * - * @param opName (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @param startDate (optional) - * @param endDate (optional) - * @return 成功获取审计日志 (status code 200) - * @see PortalManagementApi#findAuditLogsByOpName - */ - default ResponseEntity> findAuditLogsByOpName(String opName, - Integer page, - Integer size, - String startDate, - String endDate) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ \"{}\", \"{}\" ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apollo/audit/trace : 查询审计链路详情(new added) - * GET /openapi/v1/apollo/audit/trace - * - * @param traceId (required) - * @return 成功获取审计链路详情 (status code 200) - * @see PortalManagementApi#findAuditTraceDetails - */ - default ResponseEntity> findAuditTraceDetails(String traceId) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ \"{}\", \"{}\" ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits : 查询命名空间提交记录(new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param key (optional) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return 成功获取提交记录 (status code 200) - * @see PortalManagementApi#findCommits - */ - default ResponseEntity> findCommits(String appId, - String env, - String clusterName, - String namespaceName, - String key, - Integer page, - Integer size) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ \"{}\", \"{}\" ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/favorites : 查询收藏(new added) - * GET /openapi/v1/favorites - * - * @param userId (optional) - * @param appId (optional) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return 成功获取收藏 (status code 200) - * @see PortalManagementApi#findFavorites - */ - default ResponseEntity> findFavorites(String userId, - String appId, - Integer page, - Integer size) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ \"{}\", \"{}\" ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories : 查询命名空间发布历史(new added) - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return 成功获取发布历史 (status code 200) - * @see PortalManagementApi#findReleaseHistoriesByNamespace - */ - default ResponseEntity> findReleaseHistoriesByNamespace(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 = "[ \"{}\", \"{}\" ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apollo/audit/properties : 获取审计配置(new added) - * GET /openapi/v1/apollo/audit/properties - * - * @return 成功获取审计配置 (status code 200) - * @see PortalManagementApi#getAuditProperties - */ - default ResponseEntity getAuditProperties() { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/consumers : 查询开放平台消费者列表(new added) - * GET /openapi/v1/consumers - * - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return 成功获取消费者列表 (status code 200) - * @see PortalManagementApi#getConsumerList - */ - default ResponseEntity> getConsumerList(Integer page, - Integer size) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ \"{}\", \"{}\" ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/consumer-tokens/by-appId : 按应用ID查询消费者Token(new added) - * GET /openapi/v1/consumer-tokens/by-appId - * - * @param appId (required) - * @return 成功获取消费者Token (status code 200) - * @see PortalManagementApi#getConsumerTokenByAppId - */ - default ResponseEntity getConsumerTokenByAppId(String appId) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/page-settings : 获取Portal页面配置(new added) - * GET /openapi/v1/page-settings - * - * @return 成功获取页面配置 (status code 200) - * @see PortalManagementApi#getPageSettings - */ - default ResponseEntity getPageSettings() { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/system-info : 获取系统信息(new added) - * GET /openapi/v1/system-info - * - * @return 成功获取系统信息 (status code 200) - * @see PortalManagementApi#getSystemInfo - */ - default ResponseEntity getSystemInfo() { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/configs/import : 导入所有配置(new added) - * POST /openapi/v1/configs/import - * - * @param envs (required) - * @param conflictAction (optional, default to ignore) - * @param file (optional) - * @return 导入成功 (status code 200) - * @see PortalManagementApi#importAllConfigs - */ - default ResponseEntity importAllConfigs(String envs, - String conflictAction, - MultipartFile file) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import : 导入应用配置(new added) - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param conflictAction (optional, default to ignore) - * @param file (optional) - * @return 导入成功 (status code 200) - * @see PortalManagementApi#importAppConfig - */ - default ResponseEntity importAppConfig(String appId, - String env, - String clusterName, - String conflictAction, - MultipartFile file) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/import : 导入配置兼容入口(new added) - * POST /openapi/v1/import - * - * @param envs (required) - * @param conflictAction (optional, default to ignore) - * @param file (optional) - * @return 导入成功 (status code 200) - * @see PortalManagementApi#importConfig - */ - default ResponseEntity importConfig(String envs, - String conflictAction, - MultipartFile file) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import : 导入命名空间配置项(new added) - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param file (optional) - * @return 导入成功 (status code 200) - * @see PortalManagementApi#importNamespaceItems - */ - default ResponseEntity importNamespaceItems(String appId, - String env, - String clusterName, - String namespaceName, - MultipartFile file) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apps/search/by-appid-or-name : 按应用ID或名称搜索应用(new added) - * GET /openapi/v1/apps/search/by-appid-or-name - * - * @param query (optional) - * @param page (optional, default to 0) - * @param size (optional, default to 20) - * @return 成功搜索应用 (status code 200) - * @see PortalManagementApi#searchAppsByAppIdOrName - */ - default ResponseEntity searchAppsByAppIdOrName(String query, - Integer page, - Integer size) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator : 搜索审计日志(new added) - * GET /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator - * - * @param query (required) - * @param page (optional, default to 0) - * @param size (optional, default to 10) - * @return 成功搜索审计日志 (status code 200) - * @see PortalManagementApi#searchAuditLogs - */ - default ResponseEntity> searchAuditLogs(String query, - Integer page, - Integer size) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ \"{}\", \"{}\" ]"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/global-search/item-info/by-key-or-value : 按Key或Value全局搜索配置(new added) - * GET /openapi/v1/global-search/item-info/by-key-or-value - * - * @param key (optional, default to ) - * @param value (optional, default to ) - * @return 成功搜索配置 (status code 200) - * @see PortalManagementApi#searchItemInfoByKeyOrValue - */ - default ResponseEntity searchItemInfoByKeyOrValue(String key, - String value) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * PUT /openapi/v1/favorites/{favoriteId} : 收藏置顶(new added) - * PUT /openapi/v1/favorites/{favoriteId} - * - * @param favoriteId (required) - * @return 成功置顶收藏 (status code 200) - * @see PortalManagementApi#topFavorite - */ - default ResponseEntity topFavorite(Long favoriteId) { - 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 deleted file mode 100644 index e2d810cd..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApi.java +++ /dev/null @@ -1,381 +0,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.ExceptionResponse; -import com.apollo.openapi.server.model.NamespaceGrayDelReleaseDTO; -import com.apollo.openapi.server.model.NamespaceReleaseDTO; -import com.apollo.openapi.server.model.OpenReleaseDTO; -import com.apollo.openapi.server.model.OpenReleaseDiffDTO; -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Parameters; -import io.swagger.v3.oas.annotations.media.ArraySchema; -import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.security.SecurityRequirement; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.enums.ParameterIn; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.Valid; -import javax.validation.constraints.*; -import java.util.List; -import java.util.Map; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Validated -@Tag(name = "Release Management", description = "发布管理相关接口,包括配置发布、发布历史、灰度发布等功能") -public interface ReleaseManagementApi { - - default ReleaseManagementApiDelegate getDelegate() { - return new ReleaseManagementApiDelegate() {}; - } - - /** - * GET /openapi/v1/envs/{env}/releases/comparison : Compare two releases - * Get the configuration differences between two releases. - * - * @param env Environment (required) - * @param baseReleaseId The base release ID (required) - * @param toCompareReleaseId The release ID to compare against (required) - * @return Successful comparison (status code 200) - */ - @Operation( - operationId = "compareRelease", - summary = "Compare two releases", - description = "Get the configuration differences between two releases.", - tags = { "Release Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "Successful comparison", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDiffDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/releases/comparison", - produces = { "application/json" } - ) - default ResponseEntity compareRelease( - @Parameter(name = "env", description = "Environment", required = true, in = ParameterIn.PATH) @PathVariable("env") String env, - @NotNull @Parameter(name = "baseReleaseId", description = "The base release ID", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "baseReleaseId", required = true) Long baseReleaseId, - @NotNull @Parameter(name = "toCompareReleaseId", description = "The release ID to compare against", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "toCompareReleaseId", required = true) Long toCompareReleaseId - ) { - return getDelegate().compareRelease(env, baseReleaseId, toCompareReleaseId); - } - - - /** - * 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 branchName (required) - * @param namespaceGrayDelReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - */ - @Operation( - operationId = "createGrayDelRelease", - summary = "创建灰度删除发布 (original openapi)", - description = "", - tags = { "Release 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 = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases", - produces = { "application/json" }, - consumes = { "application/json" } - ) - 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, - @Parameter(name = "branchName", description = "", required = true, in = ParameterIn.PATH) @PathVariable("branchName") String branchName, - @Parameter(name = "NamespaceGrayDelReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().createGrayDelRelease(appId, env, clusterName, namespaceName, branchName, namespaceGrayDelReleaseDTO, operator); - } - - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases : 创建灰度发布 (original openapi) - * 创建灰度发布 - * - * @param appId app标识 (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param namespaceReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @return 灰度发布创建成功 (status code 200) - */ - @Operation( - operationId = "createGrayRelease", - summary = "创建灰度发布 (original openapi)", - description = "创建灰度发布", - tags = { "Release 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 = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases", - produces = { "application/json" }, - consumes = { "application/json" } - ) - 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, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().createGrayRelease(appId, env, clusterName, namespaceName, branchName, namespaceReleaseDTO, operator); - } - - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases : 创建发布 (original openapi) - * 创建发布 - * - * @param appId app标识 (required) - * @param env 环境标识 (required) - * @param clusterName (required) - * @param namespaceName 命名空间名称 (required) - * @param namespaceReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @return 发布创建成功 (status code 200) - * or 发布参数错误 (status code 400) - * or 权限不足 (status code 403) - */ - @Operation( - operationId = "createRelease", - summary = "创建发布 (original openapi)", - description = "创建发布", - tags = { "Release Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "发布创建成功", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) - }), - @ApiResponse(responseCode = "400", description = "发布参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases", - produces = { "application/json" }, - consumes = { "application/json" } - ) - 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 = "NamespaceReleaseDTO", description = "", required = true) @Valid @RequestBody NamespaceReleaseDTO namespaceReleaseDTO, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().createRelease(appId, env, clusterName, namespaceName, namespaceReleaseDTO, operator); - } - - - /** - * 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 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param page 页码,从0开始 (required) - * @param size 每页数量 (required) - * @return 成功获取活跃发布列表 (status code 200) - */ - @Operation( - 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", array = @ArraySchema(schema = @Schema(implementation = OpenReleaseDTO.class))) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/active", - produces = { "application/json" } - ) - 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().findActiveReleases(appId, env, clusterName, namespaceName, page, size); - } - - - /** - * 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) - */ - @Operation( - operationId = "getReleaseById", - summary = "获取发布详情 (new added)", - description = "GET /openapi/v1/envs/{env}/releases/{releaseId}", - tags = { "Release Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取发布详情", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenReleaseDTO.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/envs/{env}/releases/{releaseId}", - produces = { "application/json" } - ) - 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") Long releaseId - ) { - return getDelegate().getReleaseById(env, releaseId); - } - - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases/latest : 获取最新活跃发布 (original openapi) - * 查询命名空间最新活跃发布 - * - * @param appId 应用ID (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @return 成功获取最新活跃发布 (status code 200) - * or 未找到活跃发布 (status code 404) - */ - @Operation( - operationId = "loadLatestActiveRelease", - summary = "获取最新活跃发布 (original openapi)", - description = "查询命名空间最新活跃发布", - tags = { "Release Management" }, - responses = { - @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 = ExceptionResponse.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); - } - - - /** - * PUT /openapi/v1/envs/{env}/releases/{releaseId}/rollback : 回滚发布 (original openapi) - * 回滚到指定的发布版本 - * - * @param env 环境标识 (required) - * @param releaseId 发布ID (required) - * @param operator 操作人用户名 (optional) - * @param toReleaseId 要回滚到的目标发布ID;不传时回滚到上一版本 (optional) - * @return 发布回滚成功 (status code 200) - */ - @Operation( - operationId = "rollback", - summary = "回滚发布 (original openapi)", - description = "回滚到指定的发布版本", - tags = { "Release Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "发布回滚成功") - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.PUT, - value = "/openapi/v1/envs/{env}/releases/{releaseId}/rollback" - ) - 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, - @Parameter(name = "operator", description = "操作人用户名", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator, - @Parameter(name = "toReleaseId", description = "要回滚到的目标发布ID;不传时回滚到上一版本", in = ParameterIn.QUERY) @Valid @RequestParam(value = "toReleaseId", required = false) Long toReleaseId - ) { - return getDelegate().rollback(env, releaseId, operator, toReleaseId); - } - -} 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 deleted file mode 100644 index 6cbd8f43..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiController.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.ExceptionResponse; -import com.apollo.openapi.server.model.NamespaceGrayDelReleaseDTO; -import com.apollo.openapi.server.model.NamespaceReleaseDTO; -import com.apollo.openapi.server.model.OpenReleaseDTO; -import com.apollo.openapi.server.model.OpenReleaseDiffDTO; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.CookieValue; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Controller -@RequestMapping("${openapi.apolloOpen.base-path:}") -public class ReleaseManagementApiController implements ReleaseManagementApi { - - private final ReleaseManagementApiDelegate delegate; - - public ReleaseManagementApiController(@Autowired(required = false) ReleaseManagementApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new ReleaseManagementApiDelegate() {}); - } - - @Override - public ReleaseManagementApiDelegate getDelegate() { - return delegate; - } - -} 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 deleted file mode 100644 index 88e23565..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/ReleaseManagementApiDelegate.java +++ /dev/null @@ -1,262 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.ExceptionResponse; -import com.apollo.openapi.server.model.NamespaceGrayDelReleaseDTO; -import com.apollo.openapi.server.model.NamespaceReleaseDTO; -import com.apollo.openapi.server.model.OpenReleaseDTO; -import com.apollo.openapi.server.model.OpenReleaseDiffDTO; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.context.request.NativeWebRequest; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -/** - * A delegate to be called by the {@link ReleaseManagementApiController}}. - * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. - */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public interface ReleaseManagementApiDelegate { - - default Optional getRequest() { - return Optional.empty(); - } - - /** - * GET /openapi/v1/envs/{env}/releases/comparison : Compare two releases - * Get the configuration differences between two releases. - * - * @param env Environment (required) - * @param baseReleaseId The base release ID (required) - * @param toCompareReleaseId The release ID to compare against (required) - * @return Successful comparison (status code 200) - * @see ReleaseManagementApi#compareRelease - */ - default ResponseEntity compareRelease(String env, - Long baseReleaseId, - Long toCompareReleaseId) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"changes\" : [ { \"newValue\" : \"newValue\", \"changeType\" : \"changeType\", \"oldValue\" : \"oldValue\", \"key\" : \"key\" }, { \"newValue\" : \"newValue\", \"changeType\" : \"changeType\", \"oldValue\" : \"oldValue\", \"key\" : \"key\" } ] }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/gray-del-releases : 创建灰度删除发布 (original openapi) - * - * - * @param appId (required) - * @param env (required) - * @param clusterName (required) - * @param namespaceName (required) - * @param branchName (required) - * @param namespaceGrayDelReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @return (status code 200) - * @see ReleaseManagementApi#createGrayDelRelease - */ - default ResponseEntity createGrayDelRelease(String appId, - String env, - String clusterName, - String namespaceName, - String branchName, - NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO, - String operator) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"namespaceName\" : \"namespaceName\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases : 创建灰度发布 (original openapi) - * 创建灰度发布 - * - * @param appId app标识 (required) - * @param env 环境标识 (required) - * @param clusterName 集群名称 (required) - * @param namespaceName 命名空间名称 (required) - * @param branchName 分支名称 (required) - * @param namespaceReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @return 灰度发布创建成功 (status code 200) - * @see ReleaseManagementApi#createGrayRelease - */ - default ResponseEntity createGrayRelease(String appId, - String env, - String clusterName, - String namespaceName, - String branchName, - NamespaceReleaseDTO namespaceReleaseDTO, - String operator) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"namespaceName\" : \"namespaceName\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases : 创建发布 (original openapi) - * 创建发布 - * - * @param appId app标识 (required) - * @param env 环境标识 (required) - * @param clusterName (required) - * @param namespaceName 命名空间名称 (required) - * @param namespaceReleaseDTO (required) - * @param operator 操作人用户名 (optional) - * @return 发布创建成功 (status code 200) - * or 发布参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see ReleaseManagementApi#createRelease - */ - default ResponseEntity createRelease(String appId, - String env, - String clusterName, - String namespaceName, - NamespaceReleaseDTO namespaceReleaseDTO, - String operator) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"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/active : 获取活跃发布(分页) (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 成功获取活跃发布列表 (status code 200) - * @see ReleaseManagementApi#findActiveReleases - */ - default ResponseEntity> findActiveReleases(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 = "[ { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"namespaceName\" : \"namespaceName\" }, { \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"namespaceName\" : \"namespaceName\" } ]"; - 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, - Long releaseId) { - 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\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"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/latest : 获取最新活跃发布 (original openapi) - * 查询命名空间最新活跃发布 - * - * @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 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 = "{ \"dataChangeCreatedTime\" : \"2025-09-29T12:34:56Z\", \"configurations\" : { \"key\" : \"configurations\" }, \"dataChangeCreatedBy\" : \"dataChangeCreatedBy\", \"dataChangeLastModifiedTime\" : \"2025-09-29T12:34:56Z\", \"dataChangeLastModifiedByDisplayName\" : \"dataChangeLastModifiedByDisplayName\", \"dataChangeCreatedByDisplayName\" : \"dataChangeCreatedByDisplayName\", \"dataChangeLastModifiedBy\" : \"dataChangeLastModifiedBy\", \"appId\" : \"appId\", \"clusterName\" : \"clusterName\", \"name\" : \"name\", \"comment\" : \"comment\", \"id\" : 0, \"namespaceName\" : \"namespaceName\" }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * PUT /openapi/v1/envs/{env}/releases/{releaseId}/rollback : 回滚发布 (original openapi) - * 回滚到指定的发布版本 - * - * @param env 环境标识 (required) - * @param releaseId 发布ID (required) - * @param operator 操作人用户名 (optional) - * @param toReleaseId 要回滚到的目标发布ID;不传时回滚到上一版本 (optional) - * @return 发布回滚成功 (status code 200) - * @see ReleaseManagementApi#rollback - */ - default ResponseEntity rollback(String env, - Long releaseId, - String operator, - Long toReleaseId) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/UserManagementApi.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/UserManagementApi.java deleted file mode 100644 index 89a9bea1..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/UserManagementApi.java +++ /dev/null @@ -1,259 +0,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.ExceptionResponse; -import com.apollo.openapi.server.model.OpenUserDTO; -import com.apollo.openapi.server.model.OpenUserInfoDTO; -import io.swagger.v3.oas.annotations.ExternalDocumentation; -import io.swagger.v3.oas.annotations.Operation; -import io.swagger.v3.oas.annotations.Parameter; -import io.swagger.v3.oas.annotations.Parameters; -import io.swagger.v3.oas.annotations.media.ArraySchema; -import io.swagger.v3.oas.annotations.media.Content; -import io.swagger.v3.oas.annotations.media.Schema; -import io.swagger.v3.oas.annotations.responses.ApiResponse; -import io.swagger.v3.oas.annotations.security.SecurityRequirement; -import io.swagger.v3.oas.annotations.tags.Tag; -import io.swagger.v3.oas.annotations.enums.ParameterIn; -import org.springframework.http.ResponseEntity; -import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.Valid; -import javax.validation.constraints.*; -import java.util.List; -import java.util.Map; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Validated -@Tag(name = "User Management", description = "用户管理相关接口,支持Portal用户登录态和具备用户管理权限的Consumer Token调用") -public interface UserManagementApi { - - default UserManagementApiDelegate getDelegate() { - return new UserManagementApiDelegate() {}; - } - - /** - * PUT /openapi/v1/users/enabled : 修改用户启用状态(new added) - * PUT /openapi/v1/users/enabled,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - * - * @param openUserDTO (required) - * @param operator 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数 (optional) - * @return 用户状态修改成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - */ - @Operation( - operationId = "changeUserEnabled", - summary = "修改用户启用状态(new added)", - description = "PUT /openapi/v1/users/enabled,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator", - tags = { "User Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "用户状态修改成功"), - @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.PUT, - value = "/openapi/v1/users/enabled", - produces = { "application/json" }, - consumes = { "application/json" } - ) - default ResponseEntity changeUserEnabled( - @Parameter(name = "OpenUserDTO", description = "", required = true) @Valid @RequestBody OpenUserDTO openUserDTO, - @Parameter(name = "operator", description = "操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().changeUserEnabled(openUserDTO, operator); - } - - - /** - * POST /openapi/v1/users : 创建或更新用户(new added) - * POST /openapi/v1/users,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - * - * @param openUserDTO (required) - * @param isCreate true 表示创建用户,false 表示更新用户 (optional, default to false) - * @param operator 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数 (optional) - * @return 用户创建或更新成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - */ - @Operation( - operationId = "createOrUpdateUser", - summary = "创建或更新用户(new added)", - description = "POST /openapi/v1/users,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator", - tags = { "User Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "用户创建或更新成功"), - @ApiResponse(responseCode = "400", description = "请求参数错误", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.POST, - value = "/openapi/v1/users", - produces = { "application/json" }, - consumes = { "application/json" } - ) - default ResponseEntity createOrUpdateUser( - @Parameter(name = "OpenUserDTO", description = "", required = true) @Valid @RequestBody OpenUserDTO openUserDTO, - @Parameter(name = "isCreate", description = "true 表示创建用户,false 表示更新用户", in = ParameterIn.QUERY) @Valid @RequestParam(value = "isCreate", required = false, defaultValue = "false") Boolean isCreate, - @Parameter(name = "operator", description = "操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数", in = ParameterIn.QUERY) @Valid @RequestParam(value = "operator", required = false) String operator - ) { - return getDelegate().createOrUpdateUser(openUserDTO, isCreate, operator); - } - - - /** - * GET /openapi/v1/user : 获取当前Portal用户(new added) - * GET /openapi/v1/user - * - * @return 成功获取当前用户 (status code 200) - * or 未登录或未授权访问 (status code 401) - * or 仅支持Portal用户登录态访问 (status code 403) - */ - @Operation( - operationId = "getCurrentUser", - summary = "获取当前Portal用户(new added)", - description = "GET /openapi/v1/user", - tags = { "User Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取当前用户", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenUserInfoDTO.class)) - }), - @ApiResponse(responseCode = "401", description = "未登录或未授权访问", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "403", description = "仅支持Portal用户登录态访问", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/user", - produces = { "application/json" } - ) - default ResponseEntity getCurrentUser( - - ) { - return getDelegate().getCurrentUser(); - } - - - /** - * GET /openapi/v1/users/{userId} : 获取指定用户(new added) - * GET /openapi/v1/users/{userId},支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - * - * @param userId 用户ID (required) - * @return 成功获取用户 (status code 200) - * or 请求参数错误或用户不存在 (status code 400) - * or 未登录或未认证 (status code 401) - * or 权限不足 (status code 403) - */ - @Operation( - operationId = "getUserByUserId", - summary = "获取指定用户(new added)", - description = "GET /openapi/v1/users/{userId},支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问", - tags = { "User Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取用户", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = OpenUserInfoDTO.class)) - }), - @ApiResponse(responseCode = "400", description = "请求参数错误或用户不存在", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "401", description = "未登录或未认证", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/users/{userId}", - produces = { "application/json" } - ) - default ResponseEntity getUserByUserId( - @Parameter(name = "userId", description = "用户ID", required = true, in = ParameterIn.PATH) @PathVariable("userId") String userId - ) { - return getDelegate().getUserByUserId(userId); - } - - - /** - * GET /openapi/v1/users : 搜索用户(new added) - * GET /openapi/v1/users,支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - * - * @param keyword 用户名、显示名或邮箱关键字 (required) - * @param includeInactiveUsers 是否包含禁用用户 (optional, default to false) - * @param offset 偏移量 (optional, default to 0) - * @param limit 返回数量 (optional, default to 10) - * @return 成功获取用户列表 (status code 200) - * or 未登录或未授权访问 (status code 401) - * or 权限不足 (status code 403) - */ - @Operation( - operationId = "searchUsers", - summary = "搜索用户(new added)", - description = "GET /openapi/v1/users,支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问", - tags = { "User Management" }, - responses = { - @ApiResponse(responseCode = "200", description = "成功获取用户列表", content = { - @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = OpenUserInfoDTO.class))) - }), - @ApiResponse(responseCode = "401", description = "未登录或未授权访问", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }), - @ApiResponse(responseCode = "403", description = "权限不足", content = { - @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)) - }) - }, - security = { - @SecurityRequirement(name = "ApiKeyAuth") - } - ) - @RequestMapping( - method = RequestMethod.GET, - value = "/openapi/v1/users", - produces = { "application/json" } - ) - default ResponseEntity> searchUsers( - @NotNull @Parameter(name = "keyword", description = "用户名、显示名或邮箱关键字", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "keyword", required = true) String keyword, - @Parameter(name = "includeInactiveUsers", description = "是否包含禁用用户", in = ParameterIn.QUERY) @Valid @RequestParam(value = "includeInactiveUsers", required = false, defaultValue = "false") Boolean includeInactiveUsers, - @Min(0) @Parameter(name = "offset", description = "偏移量", in = ParameterIn.QUERY) @Valid @RequestParam(value = "offset", required = false, defaultValue = "0") Integer offset, - @Min(1) @Parameter(name = "limit", description = "返回数量", in = ParameterIn.QUERY) @Valid @RequestParam(value = "limit", required = false, defaultValue = "10") Integer limit - ) { - return getDelegate().searchUsers(keyword, includeInactiveUsers, offset, limit); - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/UserManagementApiController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/UserManagementApiController.java deleted file mode 100644 index 28b21dbc..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/UserManagementApiController.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.ExceptionResponse; -import com.apollo.openapi.server.model.OpenUserDTO; -import com.apollo.openapi.server.model.OpenUserInfoDTO; - - -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.CookieValue; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RequestPart; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.constraints.*; -import javax.validation.Valid; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -@Controller -@RequestMapping("${openapi.apolloOpen.base-path:}") -public class UserManagementApiController implements UserManagementApi { - - private final UserManagementApiDelegate delegate; - - public UserManagementApiController(@Autowired(required = false) UserManagementApiDelegate delegate) { - this.delegate = Optional.ofNullable(delegate).orElse(new UserManagementApiDelegate() {}); - } - - @Override - public UserManagementApiDelegate getDelegate() { - return delegate; - } - -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/api/UserManagementApiDelegate.java b/spring-boot2/src/main/java/com/apollo/openapi/server/api/UserManagementApiDelegate.java deleted file mode 100644 index 19d77fcf..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/api/UserManagementApiDelegate.java +++ /dev/null @@ -1,142 +0,0 @@ -package com.apollo.openapi.server.api; - -import com.apollo.openapi.server.model.ExceptionResponse; -import com.apollo.openapi.server.model.OpenUserDTO; -import com.apollo.openapi.server.model.OpenUserInfoDTO; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.web.context.request.NativeWebRequest; -import org.springframework.web.multipart.MultipartFile; - -import java.util.List; -import java.util.Map; -import java.util.Optional; -import javax.annotation.Generated; - -/** - * A delegate to be called by the {@link UserManagementApiController}}. - * Implement this interface with a {@link org.springframework.stereotype.Service} annotated class. - */ -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public interface UserManagementApiDelegate { - - default Optional getRequest() { - return Optional.empty(); - } - - /** - * PUT /openapi/v1/users/enabled : 修改用户启用状态(new added) - * PUT /openapi/v1/users/enabled,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - * - * @param openUserDTO (required) - * @param operator 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数 (optional) - * @return 用户状态修改成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see UserManagementApi#changeUserEnabled - */ - default ResponseEntity changeUserEnabled(OpenUserDTO openUserDTO, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * POST /openapi/v1/users : 创建或更新用户(new added) - * POST /openapi/v1/users,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - * - * @param openUserDTO (required) - * @param isCreate true 表示创建用户,false 表示更新用户 (optional, default to false) - * @param operator 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数 (optional) - * @return 用户创建或更新成功 (status code 200) - * or 请求参数错误 (status code 400) - * or 权限不足 (status code 403) - * @see UserManagementApi#createOrUpdateUser - */ - default ResponseEntity createOrUpdateUser(OpenUserDTO openUserDTO, - Boolean isCreate, - String operator) { - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/user : 获取当前Portal用户(new added) - * GET /openapi/v1/user - * - * @return 成功获取当前用户 (status code 200) - * or 未登录或未授权访问 (status code 401) - * or 仅支持Portal用户登录态访问 (status code 403) - * @see UserManagementApi#getCurrentUser - */ - default ResponseEntity getCurrentUser() { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"name\" : \"name\", \"userId\" : \"userId\", \"email\" : \"email\", \"enabled\" : 0 }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/users/{userId} : 获取指定用户(new added) - * GET /openapi/v1/users/{userId},支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - * - * @param userId 用户ID (required) - * @return 成功获取用户 (status code 200) - * or 请求参数错误或用户不存在 (status code 400) - * or 未登录或未认证 (status code 401) - * or 权限不足 (status code 403) - * @see UserManagementApi#getUserByUserId - */ - default ResponseEntity getUserByUserId(String userId) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "{ \"name\" : \"name\", \"userId\" : \"userId\", \"email\" : \"email\", \"enabled\" : 0 }"; - ApiUtil.setExampleResponse(request, "application/json", exampleString); - break; - } - } - }); - return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED); - - } - - /** - * GET /openapi/v1/users : 搜索用户(new added) - * GET /openapi/v1/users,支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - * - * @param keyword 用户名、显示名或邮箱关键字 (required) - * @param includeInactiveUsers 是否包含禁用用户 (optional, default to false) - * @param offset 偏移量 (optional, default to 0) - * @param limit 返回数量 (optional, default to 10) - * @return 成功获取用户列表 (status code 200) - * or 未登录或未授权访问 (status code 401) - * or 权限不足 (status code 403) - * @see UserManagementApi#searchUsers - */ - default ResponseEntity> searchUsers(String keyword, - Boolean includeInactiveUsers, - Integer offset, - Integer limit) { - getRequest().ifPresent(request -> { - for (MediaType mediaType: MediaType.parseMediaTypes(request.getHeader("Accept"))) { - if (mediaType.isCompatibleWith(MediaType.valueOf("application/json"))) { - String exampleString = "[ { \"name\" : \"name\", \"userId\" : \"userId\", \"email\" : \"email\", \"enabled\" : 0 }, { \"name\" : \"name\", \"userId\" : \"userId\", \"email\" : \"email\", \"enabled\" : 0 } ]"; - 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/config/HomeController.java b/spring-boot2/src/main/java/com/apollo/openapi/server/config/HomeController.java deleted file mode 100644 index c35d2252..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/config/HomeController.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.apollo.openapi.server.config; - -import org.springframework.context.annotation.Bean; -import org.springframework.stereotype.Controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.GetMapping; - -/** - * Home redirection to OpenAPI api documentation - */ -@Controller -public class HomeController { - - @RequestMapping("/") - public String index() { - return "redirect:swagger-ui.html"; - } - -} 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 deleted file mode 100644 index baf6ceb0..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/config/SpringDocConfiguration.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.apollo.openapi.server.config; - -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.info.Info; -import io.swagger.v3.oas.models.info.Contact; -import io.swagger.v3.oas.models.info.License; -import io.swagger.v3.oas.models.Components; -import io.swagger.v3.oas.models.security.SecurityScheme; - -@Configuration -public class SpringDocConfiguration { - - @Bean(name = "com.apollo.openapi.server.config.SpringDocConfiguration.apiInfo") - OpenAPI apiInfo() { - return new OpenAPI() - .info( - new Info() - .title("Apollo OpenAPI") - .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("0.3.8") - ) - .components( - new Components() - .addSecuritySchemes("ApiKeyAuth", new SecurityScheme() - .type(SecurityScheme.Type.APIKEY) - .in(SecurityScheme.In.HEADER) - .name("Authorization") - ) - ) - ; - } -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ExceptionResponse.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/ExceptionResponse.java deleted file mode 100644 index 65406f66..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/ExceptionResponse.java +++ /dev/null @@ -1,157 +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 java.time.OffsetDateTime; -import org.springframework.format.annotation.DateTimeFormat; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * ExceptionResponse - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class ExceptionResponse { - - private Integer status; - - private String message; - - @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME) - private OffsetDateTime timestamp; - - private String exception; - - public ExceptionResponse status(Integer status) { - this.status = status; - return this; - } - - /** - * HTTP 状态码 - * @return status - */ - - @Schema(name = "status", description = "HTTP 状态码", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("status") - public Integer getStatus() { - return status; - } - - public void setStatus(Integer status) { - this.status = status; - } - - public ExceptionResponse message(String message) { - this.message = message; - return this; - } - - /** - * 错误信息 - * @return message - */ - - @Schema(name = "message", description = "错误信息", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("message") - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public ExceptionResponse timestamp(OffsetDateTime timestamp) { - this.timestamp = timestamp; - return this; - } - - /** - * 时间戳 - * @return timestamp - */ - @Valid - @Schema(name = "timestamp", description = "时间戳", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("timestamp") - public OffsetDateTime getTimestamp() { - return timestamp; - } - - public void setTimestamp(OffsetDateTime timestamp) { - this.timestamp = timestamp; - } - - public ExceptionResponse exception(String exception) { - this.exception = exception; - return this; - } - - /** - * 错误类名 - * @return exception - */ - - @Schema(name = "exception", description = "错误类名", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("exception") - public String getException() { - return exception; - } - - public void setException(String exception) { - this.exception = exception; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - ExceptionResponse exceptionResponse = (ExceptionResponse) o; - return Objects.equals(this.status, exceptionResponse.status) && - Objects.equals(this.message, exceptionResponse.message) && - Objects.equals(this.timestamp, exceptionResponse.timestamp) && - Objects.equals(this.exception, exceptionResponse.exception); - } - - @Override - public int hashCode() { - return Objects.hash(status, message, timestamp, exception); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ExceptionResponse {\n"); - sb.append(" status: ").append(toIndentedString(status)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); - sb.append(" exception: ").append(toIndentedString(exception)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceGrayDelReleaseDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceGrayDelReleaseDTO.java deleted file mode 100644 index 638bb8bf..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceGrayDelReleaseDTO.java +++ /dev/null @@ -1,190 +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 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; - -/** - * 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 - */ - -@Schema(name = "NamespaceGrayDelReleaseDTO", description = "命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NamespaceGrayDelReleaseDTO { - - private String releaseTitle; - - private String releaseComment; - - private String releasedBy; - - private Boolean isEmergencyPublish; - - @Valid - private List grayDelKeys; - - public NamespaceGrayDelReleaseDTO releaseTitle(String releaseTitle) { - this.releaseTitle = releaseTitle; - return this; - } - - /** - * 发布标题,用于标识这次灰度删除发布的名称或版本号 - * @return releaseTitle - */ - - @Schema(name = "releaseTitle", description = "发布标题,用于标识这次灰度删除发布的名称或版本号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("releaseTitle") - public String getReleaseTitle() { - return releaseTitle; - } - - public void setReleaseTitle(String releaseTitle) { - this.releaseTitle = releaseTitle; - } - - public NamespaceGrayDelReleaseDTO releaseComment(String releaseComment) { - this.releaseComment = releaseComment; - return this; - } - - /** - * 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 - * @return releaseComment - */ - - @Schema(name = "releaseComment", description = "发布备注,详细描述本次灰度删除发布的目的和删除的配置项", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("releaseComment") - public String getReleaseComment() { - return releaseComment; - } - - public void setReleaseComment(String releaseComment) { - this.releaseComment = releaseComment; - } - - public NamespaceGrayDelReleaseDTO releasedBy(String releasedBy) { - this.releasedBy = releasedBy; - return this; - } - - /** - * 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 - * @return releasedBy - */ - - @Schema(name = "releasedBy", description = "发布操作者用户名,记录是谁执行了这次灰度删除发布操作", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("releasedBy") - public String getReleasedBy() { - return releasedBy; - } - - public void setReleasedBy(String releasedBy) { - this.releasedBy = releasedBy; - } - - public NamespaceGrayDelReleaseDTO isEmergencyPublish(Boolean isEmergencyPublish) { - this.isEmergencyPublish = isEmergencyPublish; - return this; - } - - /** - * 是否为紧急发布,紧急发布可能会跳过某些审核流程 - * @return isEmergencyPublish - */ - - @Schema(name = "isEmergencyPublish", description = "是否为紧急发布,紧急发布可能会跳过某些审核流程", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("isEmergencyPublish") - public Boolean getIsEmergencyPublish() { - return isEmergencyPublish; - } - - public void setIsEmergencyPublish(Boolean isEmergencyPublish) { - this.isEmergencyPublish = isEmergencyPublish; - } - - public NamespaceGrayDelReleaseDTO grayDelKeys(List grayDelKeys) { - this.grayDelKeys = grayDelKeys; - return this; - } - - public NamespaceGrayDelReleaseDTO addGrayDelKeysItem(String grayDelKeysItem) { - if (this.grayDelKeys == null) { - this.grayDelKeys = new ArrayList<>(); - } - this.grayDelKeys.add(grayDelKeysItem); - return this; - } - - /** - * 需要在灰度发布中删除的配置项键名列表 - * @return grayDelKeys - */ - - @Schema(name = "grayDelKeys", description = "需要在灰度发布中删除的配置项键名列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("grayDelKeys") - public List getGrayDelKeys() { - return grayDelKeys; - } - - public void setGrayDelKeys(List grayDelKeys) { - this.grayDelKeys = grayDelKeys; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NamespaceGrayDelReleaseDTO namespaceGrayDelReleaseDTO = (NamespaceGrayDelReleaseDTO) o; - return Objects.equals(this.releaseTitle, namespaceGrayDelReleaseDTO.releaseTitle) && - Objects.equals(this.releaseComment, namespaceGrayDelReleaseDTO.releaseComment) && - Objects.equals(this.releasedBy, namespaceGrayDelReleaseDTO.releasedBy) && - Objects.equals(this.isEmergencyPublish, namespaceGrayDelReleaseDTO.isEmergencyPublish) && - Objects.equals(this.grayDelKeys, namespaceGrayDelReleaseDTO.grayDelKeys); - } - - @Override - public int hashCode() { - return Objects.hash(releaseTitle, releaseComment, releasedBy, isEmergencyPublish, grayDelKeys); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NamespaceGrayDelReleaseDTO {\n"); - sb.append(" releaseTitle: ").append(toIndentedString(releaseTitle)).append("\n"); - sb.append(" releaseComment: ").append(toIndentedString(releaseComment)).append("\n"); - sb.append(" releasedBy: ").append(toIndentedString(releasedBy)).append("\n"); - sb.append(" isEmergencyPublish: ").append(toIndentedString(isEmergencyPublish)).append("\n"); - sb.append(" grayDelKeys: ").append(toIndentedString(grayDelKeys)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} 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 deleted file mode 100644 index 684c18cc..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/NamespaceReleaseDTO.java +++ /dev/null @@ -1,155 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * 命名空间发布请求数据传输对象,用于创建新的配置发布 - */ - -@Schema(name = "NamespaceReleaseDTO", description = "命名空间发布请求数据传输对象,用于创建新的配置发布") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class NamespaceReleaseDTO { - - private String releaseTitle; - - private String releaseComment; - - private String releasedBy; - - private Boolean isEmergencyPublish; - - public NamespaceReleaseDTO releaseTitle(String releaseTitle) { - this.releaseTitle = releaseTitle; - return this; - } - - /** - * 发布标题,用于标识这次发布的名称或版本号 - * @return releaseTitle - */ - - @Schema(name = "releaseTitle", description = "发布标题,用于标识这次发布的名称或版本号", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("releaseTitle") - public String getReleaseTitle() { - return releaseTitle; - } - - public void setReleaseTitle(String releaseTitle) { - this.releaseTitle = releaseTitle; - } - - public NamespaceReleaseDTO releaseComment(String releaseComment) { - this.releaseComment = releaseComment; - return this; - } - - /** - * 发布备注,详细描述本次发布的变更内容和目的 - * @return releaseComment - */ - - @Schema(name = "releaseComment", description = "发布备注,详细描述本次发布的变更内容和目的", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("releaseComment") - public String getReleaseComment() { - return releaseComment; - } - - public void setReleaseComment(String releaseComment) { - this.releaseComment = releaseComment; - } - - public NamespaceReleaseDTO releasedBy(String releasedBy) { - this.releasedBy = releasedBy; - return this; - } - - /** - * 发布操作者用户名,记录是谁执行了这次发布操作 - * @return releasedBy - */ - - @Schema(name = "releasedBy", description = "发布操作者用户名,记录是谁执行了这次发布操作", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("releasedBy") - public String getReleasedBy() { - return releasedBy; - } - - public void setReleasedBy(String releasedBy) { - this.releasedBy = releasedBy; - } - - public NamespaceReleaseDTO isEmergencyPublish(Boolean isEmergencyPublish) { - this.isEmergencyPublish = isEmergencyPublish; - return this; - } - - /** - * 是否为紧急发布,紧急发布可能会跳过某些审核流程 - * @return isEmergencyPublish - */ - - @Schema(name = "isEmergencyPublish", description = "是否为紧急发布,紧急发布可能会跳过某些审核流程", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("isEmergencyPublish") - public Boolean getIsEmergencyPublish() { - return isEmergencyPublish; - } - - public void setIsEmergencyPublish(Boolean isEmergencyPublish) { - this.isEmergencyPublish = isEmergencyPublish; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - NamespaceReleaseDTO namespaceReleaseDTO = (NamespaceReleaseDTO) o; - return Objects.equals(this.releaseTitle, namespaceReleaseDTO.releaseTitle) && - Objects.equals(this.releaseComment, namespaceReleaseDTO.releaseComment) && - Objects.equals(this.releasedBy, namespaceReleaseDTO.releasedBy) && - Objects.equals(this.isEmergencyPublish, namespaceReleaseDTO.isEmergencyPublish); - } - - @Override - public int hashCode() { - return Objects.hash(releaseTitle, releaseComment, releasedBy, isEmergencyPublish); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class NamespaceReleaseDTO {\n"); - sb.append(" releaseTitle: ").append(toIndentedString(releaseTitle)).append("\n"); - sb.append(" releaseComment: ").append(toIndentedString(releaseComment)).append("\n"); - sb.append(" releasedBy: ").append(toIndentedString(releasedBy)).append("\n"); - sb.append(" isEmergencyPublish: ").append(toIndentedString(isEmergencyPublish)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAccessKeyDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAccessKeyDTO.java deleted file mode 100644 index b71fbec9..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAccessKeyDTO.java +++ /dev/null @@ -1,322 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OpenAccessKeyDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenAccessKeyDTO { - - private String dataChangeCreatedBy; - - private String dataChangeLastModifiedBy; - - private String dataChangeCreatedByDisplayName; - - private String dataChangeLastModifiedByDisplayName; - - private String dataChangeCreatedTime; - - private String dataChangeLastModifiedTime; - - private Long id; - - private String secret; - - private String appId; - - private Integer mode; - - private Boolean enabled; - - public OpenAccessKeyDTO 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 OpenAccessKeyDTO 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 OpenAccessKeyDTO 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 OpenAccessKeyDTO 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 OpenAccessKeyDTO dataChangeCreatedTime(String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - return this; - } - - /** - * - * @return dataChangeCreatedTime - */ - - @Schema(name = "dataChangeCreatedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeCreatedTime") - public String getDataChangeCreatedTime() { - return dataChangeCreatedTime; - } - - public void setDataChangeCreatedTime(String dataChangeCreatedTime) { - this.dataChangeCreatedTime = dataChangeCreatedTime; - } - - public OpenAccessKeyDTO dataChangeLastModifiedTime(String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - return this; - } - - /** - * - * @return dataChangeLastModifiedTime - */ - - @Schema(name = "dataChangeLastModifiedTime", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataChangeLastModifiedTime") - public String getDataChangeLastModifiedTime() { - return dataChangeLastModifiedTime; - } - - public void setDataChangeLastModifiedTime(String dataChangeLastModifiedTime) { - this.dataChangeLastModifiedTime = dataChangeLastModifiedTime; - } - - public OpenAccessKeyDTO id(Long id) { - this.id = id; - return this; - } - - /** - * - * @return id - */ - - @Schema(name = "id", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("id") - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public OpenAccessKeyDTO secret(String secret) { - this.secret = secret; - return this; - } - - /** - * - * @return secret - */ - - @Schema(name = "secret", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("secret") - public String getSecret() { - return secret; - } - - public void setSecret(String secret) { - this.secret = secret; - } - - public OpenAccessKeyDTO 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 OpenAccessKeyDTO mode(Integer mode) { - this.mode = mode; - return this; - } - - /** - * - * @return mode - */ - - @Schema(name = "mode", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("mode") - public Integer getMode() { - return mode; - } - - public void setMode(Integer mode) { - this.mode = mode; - } - - public OpenAccessKeyDTO enabled(Boolean enabled) { - this.enabled = enabled; - return this; - } - - /** - * - * @return enabled - */ - - @Schema(name = "enabled", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("enabled") - public Boolean getEnabled() { - return enabled; - } - - public void setEnabled(Boolean enabled) { - this.enabled = enabled; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenAccessKeyDTO openAccessKeyDTO = (OpenAccessKeyDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openAccessKeyDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeLastModifiedBy, openAccessKeyDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, openAccessKeyDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, openAccessKeyDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, openAccessKeyDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openAccessKeyDTO.dataChangeLastModifiedTime) && - Objects.equals(this.id, openAccessKeyDTO.id) && - Objects.equals(this.secret, openAccessKeyDTO.secret) && - Objects.equals(this.appId, openAccessKeyDTO.appId) && - Objects.equals(this.mode, openAccessKeyDTO.mode) && - Objects.equals(this.enabled, openAccessKeyDTO.enabled); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeLastModifiedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, id, secret, appId, mode, enabled); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenAccessKeyDTO {\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(" secret: ").append(toIndentedString(secret)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).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 deleted file mode 100644 index 4248dedf..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppDTO.java +++ /dev/null @@ -1,371 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Apollo应用信息数据传输对象,包含应用的基本信息和元数据 - */ - -@Schema(name = "OpenAppDTO", description = "Apollo应用信息数据传输对象,包含应用的基本信息和元数据") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenAppDTO { - - private String dataChangeCreatedBy; - - private String dataChangeCreatedByDisplayName; - - private String dataChangeLastModifiedBy; - - private String dataChangeLastModifiedByDisplayName; - - private String dataChangeCreatedTime; - - private String dataChangeLastModifiedTime; - - private String name; - - private String appId; - - private String orgId; - - private String orgName; - - private String ownerName; - - private String ownerEmail; - - private String ownerDisplayName; - - public OpenAppDTO 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 OpenAppDTO 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 OpenAppDTO 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 OpenAppDTO 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 OpenAppDTO 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 OpenAppDTO 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 OpenAppDTO name(String name) { - this.name = name; - return this; - } - - /** - * 应用名称,用于显示的友好名称 - * @return name - */ - - @Schema(name = "name", description = "应用名称,用于显示的友好名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("name") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public OpenAppDTO appId(String appId) { - this.appId = appId; - return this; - } - - /** - * 应用唯一标识符,全局唯一的应用ID - * @return appId - */ - - @Schema(name = "appId", description = "应用唯一标识符,全局唯一的应用ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("appId") - public String getAppId() { - return appId; - } - - public void setAppId(String appId) { - this.appId = appId; - } - - public OpenAppDTO orgId(String orgId) { - this.orgId = orgId; - return this; - } - - /** - * 组织ID,应用所属组织的唯一标识 - * @return orgId - */ - - @Schema(name = "orgId", description = "组织ID,应用所属组织的唯一标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("orgId") - public String getOrgId() { - return orgId; - } - - public void setOrgId(String orgId) { - this.orgId = orgId; - } - - public OpenAppDTO orgName(String orgName) { - this.orgName = orgName; - return this; - } - - /** - * 组织名称,应用所属组织的显示名称 - * @return orgName - */ - - @Schema(name = "orgName", description = "组织名称,应用所属组织的显示名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("orgName") - public String getOrgName() { - return orgName; - } - - public void setOrgName(String orgName) { - this.orgName = orgName; - } - - public OpenAppDTO ownerName(String ownerName) { - this.ownerName = ownerName; - return this; - } - - /** - * 应用负责人姓名,应用的主要负责人 - * @return ownerName - */ - - @Schema(name = "ownerName", description = "应用负责人姓名,应用的主要负责人", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("ownerName") - public String getOwnerName() { - return ownerName; - } - - public void setOwnerName(String ownerName) { - this.ownerName = ownerName; - } - - public OpenAppDTO ownerEmail(String ownerEmail) { - this.ownerEmail = ownerEmail; - return this; - } - - /** - * 应用负责人邮箱地址,用于接收应用相关通知 - * @return ownerEmail - */ - - @Schema(name = "ownerEmail", description = "应用负责人邮箱地址,用于接收应用相关通知", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("ownerEmail") - public String getOwnerEmail() { - return ownerEmail; - } - - public void setOwnerEmail(String ownerEmail) { - this.ownerEmail = ownerEmail; - } - - public OpenAppDTO ownerDisplayName(String ownerDisplayName) { - this.ownerDisplayName = ownerDisplayName; - return this; - } - - /** - * Get ownerDisplayName - * @return ownerDisplayName - */ - - @Schema(name = "ownerDisplayName", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("ownerDisplayName") - public String getOwnerDisplayName() { - return ownerDisplayName; - } - - public void setOwnerDisplayName(String ownerDisplayName) { - this.ownerDisplayName = ownerDisplayName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenAppDTO openAppDTO = (OpenAppDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openAppDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, openAppDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedBy, openAppDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, openAppDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, openAppDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openAppDTO.dataChangeLastModifiedTime) && - Objects.equals(this.name, openAppDTO.name) && - Objects.equals(this.appId, openAppDTO.appId) && - Objects.equals(this.orgId, openAppDTO.orgId) && - Objects.equals(this.orgName, openAppDTO.orgName) && - Objects.equals(this.ownerName, openAppDTO.ownerName) && - Objects.equals(this.ownerEmail, openAppDTO.ownerEmail) && - Objects.equals(this.ownerDisplayName, openAppDTO.ownerDisplayName); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedBy, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, name, appId, orgId, orgName, ownerName, ownerEmail, ownerDisplayName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenAppDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).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(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); - sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); - sb.append(" ownerName: ").append(toIndentedString(ownerName)).append("\n"); - sb.append(" ownerEmail: ").append(toIndentedString(ownerEmail)).append("\n"); - sb.append(" ownerDisplayName: ").append(toIndentedString(ownerDisplayName)).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/OpenAppNamespaceDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppNamespaceDTO.java deleted file mode 100644 index 86d750e4..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppNamespaceDTO.java +++ /dev/null @@ -1,347 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 - */ - -@Schema(name = "OpenAppNamespaceDTO", description = "Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenAppNamespaceDTO { - - private String dataChangeCreatedBy; - - private String dataChangeCreatedByDisplayName; - - private String dataChangeLastModifiedBy; - - private String dataChangeLastModifiedByDisplayName; - - private String dataChangeCreatedTime; - - private String dataChangeLastModifiedTime; - - private String name; - - private String appId; - - private String format; - - private Boolean isPublic; - - private Boolean appendNamespacePrefix = true; - - private String comment; - - public OpenAppNamespaceDTO 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 OpenAppNamespaceDTO 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 OpenAppNamespaceDTO 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 OpenAppNamespaceDTO 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 OpenAppNamespaceDTO 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 OpenAppNamespaceDTO 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 OpenAppNamespaceDTO name(String name) { - this.name = name; - return this; - } - - /** - * 命名空间名称,在同一应用内唯一标识一个命名空间 - * @return name - */ - - @Schema(name = "name", description = "命名空间名称,在同一应用内唯一标识一个命名空间", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("name") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public OpenAppNamespaceDTO 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 OpenAppNamespaceDTO 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 OpenAppNamespaceDTO isPublic(Boolean isPublic) { - this.isPublic = isPublic; - return this; - } - - /** - * 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - * @return isPublic - */ - - @Schema(name = "isPublic", description = "是否为公共命名空间,公共命名空间可以被其他应用关联使用", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("isPublic") - public Boolean getIsPublic() { - return isPublic; - } - - public void setIsPublic(Boolean isPublic) { - this.isPublic = isPublic; - } - - public OpenAppNamespaceDTO appendNamespacePrefix(Boolean appendNamespacePrefix) { - this.appendNamespacePrefix = appendNamespacePrefix; - return this; - } - - /** - * 对于公共命名空间,是否在命名空间名称前添加前缀 - * @return appendNamespacePrefix - */ - - @Schema(name = "appendNamespacePrefix", description = "对于公共命名空间,是否在命名空间名称前添加前缀", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("appendNamespacePrefix") - public Boolean getAppendNamespacePrefix() { - return appendNamespacePrefix; - } - - public void setAppendNamespacePrefix(Boolean appendNamespacePrefix) { - this.appendNamespacePrefix = appendNamespacePrefix; - } - - public OpenAppNamespaceDTO comment(String comment) { - this.comment = comment; - return this; - } - - /** - * 命名空间备注说明,描述命名空间的用途和包含的配置类型 - * @return comment - */ - - @Schema(name = "comment", description = "命名空间备注说明,描述命名空间的用途和包含的配置类型", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("comment") - public String getComment() { - return comment; - } - - public void setComment(String comment) { - this.comment = comment; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenAppNamespaceDTO openAppNamespaceDTO = (OpenAppNamespaceDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openAppNamespaceDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, openAppNamespaceDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedBy, openAppNamespaceDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, openAppNamespaceDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, openAppNamespaceDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openAppNamespaceDTO.dataChangeLastModifiedTime) && - Objects.equals(this.name, openAppNamespaceDTO.name) && - Objects.equals(this.appId, openAppNamespaceDTO.appId) && - Objects.equals(this.format, openAppNamespaceDTO.format) && - Objects.equals(this.isPublic, openAppNamespaceDTO.isPublic) && - Objects.equals(this.appendNamespacePrefix, openAppNamespaceDTO.appendNamespacePrefix) && - Objects.equals(this.comment, openAppNamespaceDTO.comment); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedBy, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, name, appId, format, isPublic, appendNamespacePrefix, comment); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenAppNamespaceDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).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(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" format: ").append(toIndentedString(format)).append("\n"); - sb.append(" isPublic: ").append(toIndentedString(isPublic)).append("\n"); - sb.append(" appendNamespacePrefix: ").append(toIndentedString(appendNamespacePrefix)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppRoleUserDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppRoleUserDTO.java deleted file mode 100644 index 60a30247..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenAppRoleUserDTO.java +++ /dev/null @@ -1,118 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.OpenUserInfoDTO; -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; - -/** - * OpenAppRoleUserDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenAppRoleUserDTO { - - private String appId; - - @Valid - private List<@Valid OpenUserInfoDTO> masterUsers; - - public OpenAppRoleUserDTO 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 OpenAppRoleUserDTO masterUsers(List<@Valid OpenUserInfoDTO> masterUsers) { - this.masterUsers = masterUsers; - return this; - } - - public OpenAppRoleUserDTO addMasterUsersItem(OpenUserInfoDTO masterUsersItem) { - if (this.masterUsers == null) { - this.masterUsers = new ArrayList<>(); - } - this.masterUsers.add(masterUsersItem); - return this; - } - - /** - * - * @return masterUsers - */ - @Valid - @Schema(name = "masterUsers", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("masterUsers") - public List<@Valid OpenUserInfoDTO> getMasterUsers() { - return masterUsers; - } - - public void setMasterUsers(List<@Valid OpenUserInfoDTO> masterUsers) { - this.masterUsers = masterUsers; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenAppRoleUserDTO openAppRoleUserDTO = (OpenAppRoleUserDTO) o; - return Objects.equals(this.appId, openAppRoleUserDTO.appId) && - Objects.equals(this.masterUsers, openAppRoleUserDTO.masterUsers); - } - - @Override - public int hashCode() { - return Objects.hash(appId, masterUsers); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenAppRoleUserDTO {\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" masterUsers: ").append(toIndentedString(masterUsers)).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/OpenClusterDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenClusterDTO.java deleted file mode 100644 index 18947c10..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenClusterDTO.java +++ /dev/null @@ -1,323 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 - */ - -@Schema(name = "OpenClusterDTO", description = "Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenClusterDTO { - - private String dataChangeCreatedBy; - - private String dataChangeCreatedByDisplayName; - - private String dataChangeLastModifiedBy; - - private String dataChangeLastModifiedByDisplayName; - - private String dataChangeCreatedTime; - - private String dataChangeLastModifiedTime; - - private String name; - - private String appId; - - private Long id; - - private Long parentClusterId; - - private String comment; - - public OpenClusterDTO 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 OpenClusterDTO 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 OpenClusterDTO 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 OpenClusterDTO 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 OpenClusterDTO 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 OpenClusterDTO 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 OpenClusterDTO name(String name) { - this.name = name; - return this; - } - - /** - * 集群名称,在同一应用和环境下唯一标识一个集群 - * @return name - */ - - @Schema(name = "name", description = "集群名称,在同一应用和环境下唯一标识一个集群", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("name") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public OpenClusterDTO 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 OpenClusterDTO id(Long id) { - this.id = id; - return this; - } - - /** - * 集群的唯一标识符 - * @return id - */ - - @Schema(name = "id", description = "集群的唯一标识符", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("id") - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public OpenClusterDTO parentClusterId(Long parentClusterId) { - this.parentClusterId = parentClusterId; - return this; - } - - /** - * 父集群的ID - * @return parentClusterId - */ - - @Schema(name = "parentClusterId", description = "父集群的ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("parentClusterId") - public Long getParentClusterId() { - return parentClusterId; - } - - public void setParentClusterId(Long parentClusterId) { - this.parentClusterId = parentClusterId; - } - - public OpenClusterDTO comment(String comment) { - this.comment = comment; - return this; - } - - /** - * 集群的备注说明 - * @return comment - */ - - @Schema(name = "comment", description = "集群的备注说明", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("comment") - public String getComment() { - return comment; - } - - public void setComment(String comment) { - this.comment = comment; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenClusterDTO openClusterDTO = (OpenClusterDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openClusterDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, openClusterDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedBy, openClusterDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, openClusterDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, openClusterDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openClusterDTO.dataChangeLastModifiedTime) && - Objects.equals(this.name, openClusterDTO.name) && - Objects.equals(this.appId, openClusterDTO.appId) && - Objects.equals(this.id, openClusterDTO.id) && - Objects.equals(this.parentClusterId, openClusterDTO.parentClusterId) && - Objects.equals(this.comment, openClusterDTO.comment); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedBy, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, name, appId, id, parentClusterId, comment); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenClusterDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).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(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).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/OpenClusterNamespaceRoleUserDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenClusterNamespaceRoleUserDTO.java deleted file mode 100644 index c81f59e0..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenClusterNamespaceRoleUserDTO.java +++ /dev/null @@ -1,199 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.OpenUserInfoDTO; -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; - -/** - * OpenClusterNamespaceRoleUserDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenClusterNamespaceRoleUserDTO { - - private String appId; - - private String env; - - private String cluster; - - @Valid - private List<@Valid OpenUserInfoDTO> modifyRoleUsers; - - @Valid - private List<@Valid OpenUserInfoDTO> releaseRoleUsers; - - public OpenClusterNamespaceRoleUserDTO 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 OpenClusterNamespaceRoleUserDTO 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 OpenClusterNamespaceRoleUserDTO cluster(String cluster) { - this.cluster = cluster; - return this; - } - - /** - * - * @return cluster - */ - - @Schema(name = "cluster", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("cluster") - public String getCluster() { - return cluster; - } - - public void setCluster(String cluster) { - this.cluster = cluster; - } - - public OpenClusterNamespaceRoleUserDTO modifyRoleUsers(List<@Valid OpenUserInfoDTO> modifyRoleUsers) { - this.modifyRoleUsers = modifyRoleUsers; - return this; - } - - public OpenClusterNamespaceRoleUserDTO addModifyRoleUsersItem(OpenUserInfoDTO modifyRoleUsersItem) { - if (this.modifyRoleUsers == null) { - this.modifyRoleUsers = new ArrayList<>(); - } - this.modifyRoleUsers.add(modifyRoleUsersItem); - return this; - } - - /** - * - * @return modifyRoleUsers - */ - @Valid - @Schema(name = "modifyRoleUsers", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("modifyRoleUsers") - public List<@Valid OpenUserInfoDTO> getModifyRoleUsers() { - return modifyRoleUsers; - } - - public void setModifyRoleUsers(List<@Valid OpenUserInfoDTO> modifyRoleUsers) { - this.modifyRoleUsers = modifyRoleUsers; - } - - public OpenClusterNamespaceRoleUserDTO releaseRoleUsers(List<@Valid OpenUserInfoDTO> releaseRoleUsers) { - this.releaseRoleUsers = releaseRoleUsers; - return this; - } - - public OpenClusterNamespaceRoleUserDTO addReleaseRoleUsersItem(OpenUserInfoDTO releaseRoleUsersItem) { - if (this.releaseRoleUsers == null) { - this.releaseRoleUsers = new ArrayList<>(); - } - this.releaseRoleUsers.add(releaseRoleUsersItem); - return this; - } - - /** - * - * @return releaseRoleUsers - */ - @Valid - @Schema(name = "releaseRoleUsers", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("releaseRoleUsers") - public List<@Valid OpenUserInfoDTO> getReleaseRoleUsers() { - return releaseRoleUsers; - } - - public void setReleaseRoleUsers(List<@Valid OpenUserInfoDTO> releaseRoleUsers) { - this.releaseRoleUsers = releaseRoleUsers; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenClusterNamespaceRoleUserDTO openClusterNamespaceRoleUserDTO = (OpenClusterNamespaceRoleUserDTO) o; - return Objects.equals(this.appId, openClusterNamespaceRoleUserDTO.appId) && - Objects.equals(this.env, openClusterNamespaceRoleUserDTO.env) && - Objects.equals(this.cluster, openClusterNamespaceRoleUserDTO.cluster) && - Objects.equals(this.modifyRoleUsers, openClusterNamespaceRoleUserDTO.modifyRoleUsers) && - Objects.equals(this.releaseRoleUsers, openClusterNamespaceRoleUserDTO.releaseRoleUsers); - } - - @Override - public int hashCode() { - return Objects.hash(appId, env, cluster, modifyRoleUsers, releaseRoleUsers); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenClusterNamespaceRoleUserDTO {\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" env: ").append(toIndentedString(env)).append("\n"); - sb.append(" cluster: ").append(toIndentedString(cluster)).append("\n"); - sb.append(" modifyRoleUsers: ").append(toIndentedString(modifyRoleUsers)).append("\n"); - sb.append(" releaseRoleUsers: ").append(toIndentedString(releaseRoleUsers)).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/OpenCreateAppDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateAppDTO.java deleted file mode 100644 index 5c6934f7..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateAppDTO.java +++ /dev/null @@ -1,145 +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.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; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 - */ - -@Schema(name = "OpenCreateAppDTO", description = "创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenCreateAppDTO { - - private Boolean assignAppRoleToSelf; - - @Valid - private Set admins; - - private OpenAppDTO app; - - public OpenCreateAppDTO assignAppRoleToSelf(Boolean assignAppRoleToSelf) { - this.assignAppRoleToSelf = assignAppRoleToSelf; - return this; - } - - /** - * 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 - * @return assignAppRoleToSelf - */ - - @Schema(name = "assignAppRoleToSelf", description = "是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("assignAppRoleToSelf") - public Boolean getAssignAppRoleToSelf() { - return assignAppRoleToSelf; - } - - public void setAssignAppRoleToSelf(Boolean assignAppRoleToSelf) { - this.assignAppRoleToSelf = assignAppRoleToSelf; - } - - public OpenCreateAppDTO admins(Set admins) { - this.admins = admins; - return this; - } - - public OpenCreateAppDTO addAdminsItem(String adminsItem) { - if (this.admins == null) { - this.admins = new LinkedHashSet<>(); - } - this.admins.add(adminsItem); - return this; - } - - /** - * 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 - * @return admins - */ - - @Schema(name = "admins", description = "应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("admins") - public Set getAdmins() { - return admins; - } - - @JsonDeserialize(as = LinkedHashSet.class) - public void setAdmins(Set admins) { - this.admins = admins; - } - - public OpenCreateAppDTO app(OpenAppDTO app) { - this.app = app; - return this; - } - - /** - * Get app - * @return app - */ - @Valid - @Schema(name = "app", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("app") - public OpenAppDTO getApp() { - return app; - } - - public void setApp(OpenAppDTO app) { - this.app = app; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenCreateAppDTO openCreateAppDTO = (OpenCreateAppDTO) o; - return Objects.equals(this.assignAppRoleToSelf, openCreateAppDTO.assignAppRoleToSelf) && - Objects.equals(this.admins, openCreateAppDTO.admins) && - Objects.equals(this.app, openCreateAppDTO.app); - } - - @Override - public int hashCode() { - return Objects.hash(assignAppRoleToSelf, admins, app); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenCreateAppDTO {\n"); - sb.append(" assignAppRoleToSelf: ").append(toIndentedString(assignAppRoleToSelf)).append("\n"); - sb.append(" admins: ").append(toIndentedString(admins)).append("\n"); - sb.append(" app: ").append(toIndentedString(app)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateNamespaceDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateNamespaceDTO.java deleted file mode 100644 index 76a421ca..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenCreateNamespaceDTO.java +++ /dev/null @@ -1,155 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - */ - -@Schema(name = "OpenCreateNamespaceDTO", description = "Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenCreateNamespaceDTO { - - private String appId; - - private String env; - - private String clusterName; - - private String appNamespaceName; - - public OpenCreateNamespaceDTO appId(String appId) { - this.appId = appId; - return this; - } - - /** - * 所属应用的唯一标识符 - * @return appId - */ - - @Schema(name = "appId", description = "所属应用的唯一标识符", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("appId") - public String getAppId() { - return appId; - } - - public void setAppId(String appId) { - this.appId = appId; - } - - public OpenCreateNamespaceDTO env(String env) { - this.env = env; - return this; - } - - /** - * 所在那个环境创建 - * @return env - */ - - @Schema(name = "env", description = "所在那个环境创建", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("env") - public String getEnv() { - return env; - } - - public void setEnv(String env) { - this.env = env; - } - - public OpenCreateNamespaceDTO clusterName(String clusterName) { - this.clusterName = clusterName; - return this; - } - - /** - * 所属集群的名称 - * @return clusterName - */ - - @Schema(name = "clusterName", description = "所属集群的名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("clusterName") - public String getClusterName() { - return clusterName; - } - - public void setClusterName(String clusterName) { - this.clusterName = clusterName; - } - - public OpenCreateNamespaceDTO appNamespaceName(String appNamespaceName) { - this.appNamespaceName = appNamespaceName; - return this; - } - - /** - * 根据已创建的appnamespace来实例化namespace - * @return appNamespaceName - */ - - @Schema(name = "appNamespaceName", description = "根据已创建的appnamespace来实例化namespace", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("appNamespaceName") - public String getAppNamespaceName() { - return appNamespaceName; - } - - public void setAppNamespaceName(String appNamespaceName) { - this.appNamespaceName = appNamespaceName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenCreateNamespaceDTO openCreateNamespaceDTO = (OpenCreateNamespaceDTO) o; - return Objects.equals(this.appId, openCreateNamespaceDTO.appId) && - Objects.equals(this.env, openCreateNamespaceDTO.env) && - Objects.equals(this.clusterName, openCreateNamespaceDTO.clusterName) && - Objects.equals(this.appNamespaceName, openCreateNamespaceDTO.appNamespaceName); - } - - @Override - public int hashCode() { - return Objects.hash(appId, env, clusterName, appNamespaceName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenCreateNamespaceDTO {\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" env: ").append(toIndentedString(env)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" appNamespaceName: ").append(toIndentedString(appNamespaceName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterDTO.java deleted file mode 100644 index cb86eea8..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterDTO.java +++ /dev/null @@ -1,117 +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 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; - -/** - * OpenEnvClusterDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenEnvClusterDTO { - - private String env; - - @Valid - private List clusters; - - public OpenEnvClusterDTO env(String env) { - this.env = env; - return this; - } - - /** - * 环境标识,例如 DEV、FAT、UAT、PROD - * @return env - */ - - @Schema(name = "env", description = "环境标识,例如 DEV、FAT、UAT、PROD", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("env") - public String getEnv() { - return env; - } - - public void setEnv(String env) { - this.env = env; - } - - public OpenEnvClusterDTO clusters(List clusters) { - this.clusters = clusters; - return this; - } - - public OpenEnvClusterDTO addClustersItem(String clustersItem) { - if (this.clusters == null) { - this.clusters = new ArrayList<>(); - } - this.clusters.add(clustersItem); - return this; - } - - /** - * 该环境下的集群名称列表 - * @return clusters - */ - - @Schema(name = "clusters", description = "该环境下的集群名称列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("clusters") - public List getClusters() { - return clusters; - } - - public void setClusters(List clusters) { - this.clusters = clusters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenEnvClusterDTO openEnvClusterDTO = (OpenEnvClusterDTO) o; - return Objects.equals(this.env, openEnvClusterDTO.env) && - Objects.equals(this.clusters, openEnvClusterDTO.clusters); - } - - @Override - public int hashCode() { - return Objects.hash(env, clusters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenEnvClusterDTO {\n"); - sb.append(" env: ").append(toIndentedString(env)).append("\n"); - sb.append(" clusters: ").append(toIndentedString(clusters)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} 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 deleted file mode 100644 index ed5137ff..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvClusterInfo.java +++ /dev/null @@ -1,166 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -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.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; - -/** - * OpenEnvClusterInfo - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenEnvClusterInfo { - - private Integer code; - - private String message; - - private String env; - - @Valid - private List<@Valid OpenClusterDTO> clusters; - - public OpenEnvClusterInfo code(Integer code) { - this.code = code; - return this; - } - - /** - * 查询状态码 - * @return code - */ - - @Schema(name = "code", description = "查询状态码", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("code") - public Integer getCode() { - return code; - } - - public void setCode(Integer code) { - this.code = code; - } - - public OpenEnvClusterInfo message(String message) { - this.message = message; - return this; - } - - /** - * 相关信息 - * @return message - */ - - @Schema(name = "message", description = "相关信息", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("message") - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public OpenEnvClusterInfo env(String env) { - this.env = env; - return this; - } - - /** - * 环境标识 - * @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 OpenEnvClusterInfo clusters(List<@Valid OpenClusterDTO> clusters) { - this.clusters = clusters; - return this; - } - - public OpenEnvClusterInfo addClustersItem(OpenClusterDTO clustersItem) { - if (this.clusters == null) { - this.clusters = new ArrayList<>(); - } - this.clusters.add(clustersItem); - return this; - } - - /** - * 集群信息列表 - * @return clusters - */ - @Valid - @Schema(name = "clusters", description = "集群信息列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("clusters") - public List<@Valid OpenClusterDTO> getClusters() { - return clusters; - } - - public void setClusters(List<@Valid OpenClusterDTO> clusters) { - this.clusters = clusters; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenEnvClusterInfo openEnvClusterInfo = (OpenEnvClusterInfo) o; - return Objects.equals(this.code, openEnvClusterInfo.code) && - Objects.equals(this.message, openEnvClusterInfo.message) && - Objects.equals(this.env, openEnvClusterInfo.env) && - Objects.equals(this.clusters, openEnvClusterInfo.clusters); - } - - @Override - public int hashCode() { - return Objects.hash(code, message, env, clusters); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenEnvClusterInfo {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" env: ").append(toIndentedString(env)).append("\n"); - sb.append(" clusters: ").append(toIndentedString(clusters)).append("\n"); - sb.append("}"); - 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/OpenEnvNamespaceRoleUserDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvNamespaceRoleUserDTO.java deleted file mode 100644 index c32182b3..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenEnvNamespaceRoleUserDTO.java +++ /dev/null @@ -1,199 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.OpenUserInfoDTO; -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; - -/** - * OpenEnvNamespaceRoleUserDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenEnvNamespaceRoleUserDTO { - - private String appId; - - private String namespaceName; - - @Valid - private List<@Valid OpenUserInfoDTO> modifyRoleUsers; - - @Valid - private List<@Valid OpenUserInfoDTO> releaseRoleUsers; - - private String env; - - public OpenEnvNamespaceRoleUserDTO 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 OpenEnvNamespaceRoleUserDTO 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 OpenEnvNamespaceRoleUserDTO modifyRoleUsers(List<@Valid OpenUserInfoDTO> modifyRoleUsers) { - this.modifyRoleUsers = modifyRoleUsers; - return this; - } - - public OpenEnvNamespaceRoleUserDTO addModifyRoleUsersItem(OpenUserInfoDTO modifyRoleUsersItem) { - if (this.modifyRoleUsers == null) { - this.modifyRoleUsers = new ArrayList<>(); - } - this.modifyRoleUsers.add(modifyRoleUsersItem); - return this; - } - - /** - * - * @return modifyRoleUsers - */ - @Valid - @Schema(name = "modifyRoleUsers", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("modifyRoleUsers") - public List<@Valid OpenUserInfoDTO> getModifyRoleUsers() { - return modifyRoleUsers; - } - - public void setModifyRoleUsers(List<@Valid OpenUserInfoDTO> modifyRoleUsers) { - this.modifyRoleUsers = modifyRoleUsers; - } - - public OpenEnvNamespaceRoleUserDTO releaseRoleUsers(List<@Valid OpenUserInfoDTO> releaseRoleUsers) { - this.releaseRoleUsers = releaseRoleUsers; - return this; - } - - public OpenEnvNamespaceRoleUserDTO addReleaseRoleUsersItem(OpenUserInfoDTO releaseRoleUsersItem) { - if (this.releaseRoleUsers == null) { - this.releaseRoleUsers = new ArrayList<>(); - } - this.releaseRoleUsers.add(releaseRoleUsersItem); - return this; - } - - /** - * - * @return releaseRoleUsers - */ - @Valid - @Schema(name = "releaseRoleUsers", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("releaseRoleUsers") - public List<@Valid OpenUserInfoDTO> getReleaseRoleUsers() { - return releaseRoleUsers; - } - - public void setReleaseRoleUsers(List<@Valid OpenUserInfoDTO> releaseRoleUsers) { - this.releaseRoleUsers = releaseRoleUsers; - } - - public OpenEnvNamespaceRoleUserDTO 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; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenEnvNamespaceRoleUserDTO openEnvNamespaceRoleUserDTO = (OpenEnvNamespaceRoleUserDTO) o; - return Objects.equals(this.appId, openEnvNamespaceRoleUserDTO.appId) && - Objects.equals(this.namespaceName, openEnvNamespaceRoleUserDTO.namespaceName) && - Objects.equals(this.modifyRoleUsers, openEnvNamespaceRoleUserDTO.modifyRoleUsers) && - Objects.equals(this.releaseRoleUsers, openEnvNamespaceRoleUserDTO.releaseRoleUsers) && - Objects.equals(this.env, openEnvNamespaceRoleUserDTO.env); - } - - @Override - public int hashCode() { - return Objects.hash(appId, namespaceName, modifyRoleUsers, releaseRoleUsers, env); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenEnvNamespaceRoleUserDTO {\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" modifyRoleUsers: ").append(toIndentedString(modifyRoleUsers)).append("\n"); - sb.append(" releaseRoleUsers: ").append(toIndentedString(releaseRoleUsers)).append("\n"); - sb.append(" env: ").append(toIndentedString(env)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleDTO.java deleted file mode 100644 index cbf7bcb8..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleDTO.java +++ /dev/null @@ -1,337 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.OpenGrayReleaseRuleItemDTO; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -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; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 - */ - -@Schema(name = "OpenGrayReleaseRuleDTO", description = "Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenGrayReleaseRuleDTO { - - private String dataChangeCreatedBy; - - private String dataChangeCreatedByDisplayName; - - private String dataChangeLastModifiedBy; - - private String dataChangeLastModifiedByDisplayName; - - private String dataChangeCreatedTime; - - private String dataChangeLastModifiedTime; - - private String appId; - - private String clusterName; - - private String namespaceName; - - private String branchName; - - @Valid - private Set<@Valid OpenGrayReleaseRuleItemDTO> ruleItems; - - public OpenGrayReleaseRuleDTO 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 OpenGrayReleaseRuleDTO 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 OpenGrayReleaseRuleDTO 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 OpenGrayReleaseRuleDTO 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 OpenGrayReleaseRuleDTO 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 OpenGrayReleaseRuleDTO 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 OpenGrayReleaseRuleDTO 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 OpenGrayReleaseRuleDTO 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 OpenGrayReleaseRuleDTO 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 OpenGrayReleaseRuleDTO branchName(String branchName) { - this.branchName = branchName; - return this; - } - - /** - * 灰度分支名称,标识灰度发布的分支 - * @return branchName - */ - - @Schema(name = "branchName", description = "灰度分支名称,标识灰度发布的分支", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("branchName") - public String getBranchName() { - return branchName; - } - - public void setBranchName(String branchName) { - this.branchName = branchName; - } - - public OpenGrayReleaseRuleDTO ruleItems(Set<@Valid OpenGrayReleaseRuleItemDTO> ruleItems) { - this.ruleItems = ruleItems; - return this; - } - - public OpenGrayReleaseRuleDTO addRuleItemsItem(OpenGrayReleaseRuleItemDTO ruleItemsItem) { - if (this.ruleItems == null) { - this.ruleItems = new LinkedHashSet<>(); - } - this.ruleItems.add(ruleItemsItem); - return this; - } - - /** - * 灰度发布规则项列表,包含具体的灰度规则条件 - * @return ruleItems - */ - @Valid - @Schema(name = "ruleItems", description = "灰度发布规则项列表,包含具体的灰度规则条件", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("ruleItems") - public Set<@Valid OpenGrayReleaseRuleItemDTO> getRuleItems() { - return ruleItems; - } - - @JsonDeserialize(as = LinkedHashSet.class) - public void setRuleItems(Set<@Valid OpenGrayReleaseRuleItemDTO> ruleItems) { - this.ruleItems = ruleItems; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenGrayReleaseRuleDTO openGrayReleaseRuleDTO = (OpenGrayReleaseRuleDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openGrayReleaseRuleDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, openGrayReleaseRuleDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedBy, openGrayReleaseRuleDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, openGrayReleaseRuleDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, openGrayReleaseRuleDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openGrayReleaseRuleDTO.dataChangeLastModifiedTime) && - Objects.equals(this.appId, openGrayReleaseRuleDTO.appId) && - Objects.equals(this.clusterName, openGrayReleaseRuleDTO.clusterName) && - Objects.equals(this.namespaceName, openGrayReleaseRuleDTO.namespaceName) && - Objects.equals(this.branchName, openGrayReleaseRuleDTO.branchName) && - Objects.equals(this.ruleItems, openGrayReleaseRuleDTO.ruleItems); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedBy, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, appId, clusterName, namespaceName, branchName, ruleItems); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenGrayReleaseRuleDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).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(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" branchName: ").append(toIndentedString(branchName)).append("\n"); - sb.append(" ruleItems: ").append(toIndentedString(ruleItems)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} 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 deleted file mode 100644 index 6539acd3..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenGrayReleaseRuleItemDTO.java +++ /dev/null @@ -1,154 +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.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; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 - */ - -@Schema(name = "OpenGrayReleaseRuleItemDTO", description = "Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenGrayReleaseRuleItemDTO { - - private String clientAppId; - - @Valid - private Set clientIpList; - - @Valid - private Set clientLabelList; - - public OpenGrayReleaseRuleItemDTO clientAppId(String clientAppId) { - this.clientAppId = clientAppId; - return this; - } - - /** - * 客户端应用ID,指定哪个应用可以获取灰度配置 - * @return clientAppId - */ - - @Schema(name = "clientAppId", description = "客户端应用ID,指定哪个应用可以获取灰度配置", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("clientAppId") - public String getClientAppId() { - return clientAppId; - } - - public void setClientAppId(String clientAppId) { - this.clientAppId = clientAppId; - } - - public OpenGrayReleaseRuleItemDTO clientIpList(Set clientIpList) { - this.clientIpList = clientIpList; - return this; - } - - public OpenGrayReleaseRuleItemDTO addClientIpListItem(String clientIpListItem) { - if (this.clientIpList == null) { - this.clientIpList = new LinkedHashSet<>(); - } - this.clientIpList.add(clientIpListItem); - return this; - } - - /** - * 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 - * @return clientIpList - */ - - @Schema(name = "clientIpList", description = "客户端IP地址列表,指定哪些IP地址可以获取灰度配置", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("clientIpList") - public Set getClientIpList() { - return clientIpList; - } - - @JsonDeserialize(as = LinkedHashSet.class) - public void setClientIpList(Set clientIpList) { - this.clientIpList = clientIpList; - } - - public OpenGrayReleaseRuleItemDTO clientLabelList(Set clientLabelList) { - this.clientLabelList = clientLabelList; - return this; - } - - public OpenGrayReleaseRuleItemDTO addClientLabelListItem(String clientLabelListItem) { - if (this.clientLabelList == null) { - this.clientLabelList = new LinkedHashSet<>(); - } - this.clientLabelList.add(clientLabelListItem); - return this; - } - - /** - * 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 - * @return clientLabelList - */ - - @Schema(name = "clientLabelList", description = "客户端标签列表,通过标签来识别可以获取灰度配置的客户端", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("clientLabelList") - public Set getClientLabelList() { - return clientLabelList; - } - - @JsonDeserialize(as = LinkedHashSet.class) - public void setClientLabelList(Set clientLabelList) { - this.clientLabelList = clientLabelList; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenGrayReleaseRuleItemDTO openGrayReleaseRuleItemDTO = (OpenGrayReleaseRuleItemDTO) o; - return Objects.equals(this.clientAppId, openGrayReleaseRuleItemDTO.clientAppId) && - Objects.equals(this.clientIpList, openGrayReleaseRuleItemDTO.clientIpList) && - Objects.equals(this.clientLabelList, openGrayReleaseRuleItemDTO.clientLabelList); - } - - @Override - public int hashCode() { - return Objects.hash(clientAppId, clientIpList, clientLabelList); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenGrayReleaseRuleItemDTO {\n"); - sb.append(" clientAppId: ").append(toIndentedString(clientAppId)).append("\n"); - sb.append(" clientIpList: ").append(toIndentedString(clientIpList)).append("\n"); - sb.append(" clientLabelList: ").append(toIndentedString(clientLabelList)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} 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 deleted file mode 100644 index 0c5a1664..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceConfigDTO.java +++ /dev/null @@ -1,131 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.OpenReleaseDTO; -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; - -/** - * OpenInstanceConfigDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenInstanceConfigDTO { - - private OpenReleaseDTO release; - - private String releaseDeliveryTime; - - private String dataChangeLastModifiedTime; - - public OpenInstanceConfigDTO release(OpenReleaseDTO release) { - this.release = release; - return this; - } - - /** - * Get release - * @return release - */ - @Valid - @Schema(name = "release", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("release") - public OpenReleaseDTO getRelease() { - return release; - } - - public void setRelease(OpenReleaseDTO release) { - this.release = release; - } - - public OpenInstanceConfigDTO releaseDeliveryTime(String releaseDeliveryTime) { - this.releaseDeliveryTime = releaseDeliveryTime; - return this; - } - - /** - * 配置下发时间(ISO 8601) - * @return releaseDeliveryTime - */ - - @Schema(name = "releaseDeliveryTime", example = "2025-09-29T12:34:56Z", description = "配置下发时间(ISO 8601)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("releaseDeliveryTime") - public String getReleaseDeliveryTime() { - return releaseDeliveryTime; - } - - public void setReleaseDeliveryTime(String releaseDeliveryTime) { - this.releaseDeliveryTime = releaseDeliveryTime; - } - - public OpenInstanceConfigDTO 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; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenInstanceConfigDTO openInstanceConfigDTO = (OpenInstanceConfigDTO) o; - return Objects.equals(this.release, openInstanceConfigDTO.release) && - Objects.equals(this.releaseDeliveryTime, openInstanceConfigDTO.releaseDeliveryTime) && - Objects.equals(this.dataChangeLastModifiedTime, openInstanceConfigDTO.dataChangeLastModifiedTime); - } - - @Override - public int hashCode() { - return Objects.hash(release, releaseDeliveryTime, dataChangeLastModifiedTime); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenInstanceConfigDTO {\n"); - sb.append(" release: ").append(toIndentedString(release)).append("\n"); - sb.append(" releaseDeliveryTime: ").append(toIndentedString(releaseDeliveryTime)).append("\n"); - sb.append(" dataChangeLastModifiedTime: ").append(toIndentedString(dataChangeLastModifiedTime)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} 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 deleted file mode 100644 index 21a1e4bd..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstanceDTO.java +++ /dev/null @@ -1,238 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.OpenInstanceConfigDTO; -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; - -/** - * OpenInstanceDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenInstanceDTO { - - private Long id; - - private String appId; - - private String clusterName; - - private String dataCenter; - - private String ip; - - @Valid - private List<@Valid OpenInstanceConfigDTO> configs; - - private String dataChangeCreatedTime; - - public OpenInstanceDTO id(Long id) { - this.id = id; - return this; - } - - /** - * 实例ID - * @return id - */ - - @Schema(name = "id", description = "实例ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("id") - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public OpenInstanceDTO appId(String appId) { - this.appId = appId; - return this; - } - - /** - * 实例所属应用ID - * @return appId - */ - - @Schema(name = "appId", description = "实例所属应用ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("appId") - public String getAppId() { - return appId; - } - - public void setAppId(String appId) { - this.appId = appId; - } - - public OpenInstanceDTO 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 OpenInstanceDTO dataCenter(String dataCenter) { - this.dataCenter = dataCenter; - return this; - } - - /** - * 数据中心/机房标识 - * @return dataCenter - */ - - @Schema(name = "dataCenter", description = "数据中心/机房标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("dataCenter") - public String getDataCenter() { - return dataCenter; - } - - public void setDataCenter(String dataCenter) { - this.dataCenter = dataCenter; - } - - public OpenInstanceDTO ip(String ip) { - this.ip = ip; - return this; - } - - /** - * 实例IP地址 - * @return ip - */ - - @Schema(name = "ip", description = "实例IP地址", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("ip") - public String getIp() { - return ip; - } - - public void setIp(String ip) { - this.ip = ip; - } - - public OpenInstanceDTO configs(List<@Valid OpenInstanceConfigDTO> configs) { - this.configs = configs; - return this; - } - - public OpenInstanceDTO addConfigsItem(OpenInstanceConfigDTO configsItem) { - if (this.configs == null) { - this.configs = new ArrayList<>(); - } - this.configs.add(configsItem); - return this; - } - - /** - * 实例当前生效的配置列表 - * @return configs - */ - @Valid - @Schema(name = "configs", description = "实例当前生效的配置列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("configs") - public List<@Valid OpenInstanceConfigDTO> getConfigs() { - return configs; - } - - public void setConfigs(List<@Valid OpenInstanceConfigDTO> configs) { - this.configs = configs; - } - - public OpenInstanceDTO 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; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenInstanceDTO openInstanceDTO = (OpenInstanceDTO) o; - return Objects.equals(this.id, openInstanceDTO.id) && - Objects.equals(this.appId, openInstanceDTO.appId) && - Objects.equals(this.clusterName, openInstanceDTO.clusterName) && - Objects.equals(this.dataCenter, openInstanceDTO.dataCenter) && - Objects.equals(this.ip, openInstanceDTO.ip) && - Objects.equals(this.configs, openInstanceDTO.configs) && - Objects.equals(this.dataChangeCreatedTime, openInstanceDTO.dataChangeCreatedTime); - } - - @Override - public int hashCode() { - return Objects.hash(id, appId, clusterName, dataCenter, ip, configs, dataChangeCreatedTime); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenInstanceDTO {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" dataCenter: ").append(toIndentedString(dataCenter)).append("\n"); - sb.append(" ip: ").append(toIndentedString(ip)).append("\n"); - sb.append(" configs: ").append(toIndentedString(configs)).append("\n"); - sb.append(" dataChangeCreatedTime: ").append(toIndentedString(dataChangeCreatedTime)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstancePageDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstancePageDTO.java deleted file mode 100644 index 7e2653a8..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenInstancePageDTO.java +++ /dev/null @@ -1,167 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.OpenInstanceDTO; -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; - -/** - * 分页实例数据传输对象,用于返回分页查询的实例列表结果 - */ - -@Schema(name = "OpenInstancePageDTO", description = "分页实例数据传输对象,用于返回分页查询的实例列表结果") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenInstancePageDTO { - - private Integer page; - - private Integer size; - - private Long total; - - @Valid - private List<@Valid OpenInstanceDTO> instances; - - public OpenInstancePageDTO page(Integer page) { - this.page = page; - return this; - } - - /** - * 当前页码,从0开始计数 - * @return page - */ - - @Schema(name = "page", description = "当前页码,从0开始计数", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("page") - public Integer getPage() { - return page; - } - - public void setPage(Integer page) { - this.page = page; - } - - public OpenInstancePageDTO size(Integer size) { - this.size = size; - return this; - } - - /** - * 每页显示的记录数量 - * @return size - */ - - @Schema(name = "size", description = "每页显示的记录数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("size") - public Integer getSize() { - return size; - } - - public void setSize(Integer size) { - this.size = size; - } - - public OpenInstancePageDTO total(Long total) { - this.total = total; - return this; - } - - /** - * 总记录数,符合查询条件的实例总数量 - * @return total - */ - - @Schema(name = "total", description = "总记录数,符合查询条件的实例总数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("total") - public Long getTotal() { - return total; - } - - public void setTotal(Long total) { - this.total = total; - } - - public OpenInstancePageDTO instances(List<@Valid OpenInstanceDTO> instances) { - this.instances = instances; - return this; - } - - public OpenInstancePageDTO addInstancesItem(OpenInstanceDTO instancesItem) { - if (this.instances == null) { - this.instances = new ArrayList<>(); - } - this.instances.add(instancesItem); - return this; - } - - /** - * 当前页的实例列表,包含具体的实例数据 - * @return instances - */ - @Valid - @Schema(name = "instances", description = "当前页的实例列表,包含具体的实例数据", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("instances") - public List<@Valid OpenInstanceDTO> getInstances() { - return instances; - } - - public void setInstances(List<@Valid OpenInstanceDTO> instances) { - this.instances = instances; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenInstancePageDTO openInstancePageDTO = (OpenInstancePageDTO) o; - return Objects.equals(this.page, openInstancePageDTO.page) && - Objects.equals(this.size, openInstancePageDTO.size) && - Objects.equals(this.total, openInstancePageDTO.total) && - Objects.equals(this.instances, openInstancePageDTO.instances); - } - - @Override - public int hashCode() { - return Objects.hash(page, size, total, instances); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenInstancePageDTO {\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" size: ").append(toIndentedString(size)).append("\n"); - sb.append(" total: ").append(toIndentedString(total)).append("\n"); - sb.append(" instances: ").append(toIndentedString(instances)).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 deleted file mode 100644 index d7c3066e..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDTO.java +++ /dev/null @@ -1,348 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.OpenItemExtendDTO; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Apollo配置项核心数据对象,仅包含键值及基础审计信息 - */ - -@Schema(name = "OpenItemDTO", description = "Apollo配置项核心数据对象,仅包含键值及基础审计信息") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenItemDTO { - - private String key; - - private String value; - - private Integer type; - - private String comment; - - private Integer lineNum; - - private OpenItemExtendDTO extendInfo; - - private String dataChangeCreatedBy; - - private String dataChangeCreatedByDisplayName; - - private String dataChangeLastModifiedBy; - - private String dataChangeLastModifiedByDisplayName; - - private String dataChangeCreatedTime; - - private String dataChangeLastModifiedTime; - - public OpenItemDTO key(String key) { - this.key = key; - return this; - } - - /** - * 配置项的键名,在同一命名空间内唯一标识一个配置项 - * @return key - */ - - @Schema(name = "key", description = "配置项的键名,在同一命名空间内唯一标识一个配置项", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("key") - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public OpenItemDTO value(String value) { - this.value = value; - return this; - } - - /** - * 配置项的值,可以是字符串、数字、JSON等格式 - * @return value - */ - - @Schema(name = "value", description = "配置项的值,可以是字符串、数字、JSON等格式", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("value") - public String getValue() { - return value; - } - - public void setValue(String value) { - this.value = value; - } - - public OpenItemDTO type(Integer type) { - this.type = type; - return this; - } - - /** - * 配置项类型 - * @return type - */ - - @Schema(name = "type", description = "配置项类型", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("type") - public Integer getType() { - return type; - } - - public void setType(Integer type) { - this.type = type; - } - - public OpenItemDTO comment(String comment) { - this.comment = comment; - return this; - } - - /** - * 配置项的注释说明,用于描述配置项的用途和含义 - * @return comment - */ - - @Schema(name = "comment", description = "配置项的注释说明,用于描述配置项的用途和含义", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("comment") - public String getComment() { - return comment; - } - - public void setComment(String comment) { - this.comment = comment; - } - - public OpenItemDTO lineNum(Integer lineNum) { - this.lineNum = lineNum; - return this; - } - - /** - * 配置项在命名空间中的行号,用于保持和旧版 Portal 配置项列表一致的默认展示顺序 - * @return lineNum - */ - - @Schema(name = "lineNum", description = "配置项在命名空间中的行号,用于保持和旧版 Portal 配置项列表一致的默认展示顺序", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("lineNum") - public Integer getLineNum() { - return lineNum; - } - - public void setLineNum(Integer lineNum) { - this.lineNum = lineNum; - } - - public OpenItemDTO extendInfo(OpenItemExtendDTO extendInfo) { - this.extendInfo = extendInfo; - return this; - } - - /** - * Get extendInfo - * @return extendInfo - */ - @Valid - @Schema(name = "extendInfo", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("extendInfo") - public OpenItemExtendDTO getExtendInfo() { - return extendInfo; - } - - public void setExtendInfo(OpenItemExtendDTO extendInfo) { - this.extendInfo = extendInfo; - } - - public OpenItemDTO dataChangeCreatedBy(String dataChangeCreatedBy) { - this.dataChangeCreatedBy = dataChangeCreatedBy; - 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 OpenItemDTO 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 OpenItemDTO 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 OpenItemDTO 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 OpenItemDTO 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 OpenItemDTO 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; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenItemDTO openItemDTO = (OpenItemDTO) o; - return Objects.equals(this.key, openItemDTO.key) && - Objects.equals(this.value, openItemDTO.value) && - Objects.equals(this.type, openItemDTO.type) && - Objects.equals(this.comment, openItemDTO.comment) && - Objects.equals(this.lineNum, openItemDTO.lineNum) && - Objects.equals(this.extendInfo, openItemDTO.extendInfo) && - Objects.equals(this.dataChangeCreatedBy, openItemDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, openItemDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedBy, openItemDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, openItemDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, openItemDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openItemDTO.dataChangeLastModifiedTime); - } - - @Override - public int hashCode() { - return Objects.hash(key, value, type, comment, lineNum, extendInfo, dataChangeCreatedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedBy, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenItemDTO {\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" value: ").append(toIndentedString(value)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append(" lineNum: ").append(toIndentedString(lineNum)).append("\n"); - sb.append(" extendInfo: ").append(toIndentedString(extendInfo)).append("\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).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("}"); - 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/OpenItemDiffDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDiffDTO.java deleted file mode 100644 index 35f626f4..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemDiffDTO.java +++ /dev/null @@ -1,233 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.OpenItemDTO; -import com.apollo.openapi.server.model.OpenNamespaceIdentifier; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OpenItemDiffDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenItemDiffDTO { - - private Integer code; - - private String message; - - private OpenNamespaceIdentifier namespace; - - @Valid - private List<@Valid OpenItemDTO> createItems; - - @Valid - private List<@Valid OpenItemDTO> deleteItems; - - @Valid - private List<@Valid OpenItemDTO> updateItems; - - public OpenItemDiffDTO code(Integer code) { - this.code = code; - return this; - } - - /** - * 查找结果 - * @return code - */ - - @Schema(name = "code", description = "查找结果", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("code") - public Integer getCode() { - return code; - } - - public void setCode(Integer code) { - this.code = code; - } - - public OpenItemDiffDTO message(String message) { - this.message = message; - return this; - } - - /** - * 查找结果信息 - * @return message - */ - - @Schema(name = "message", description = "查找结果信息", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("message") - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public OpenItemDiffDTO namespace(OpenNamespaceIdentifier namespace) { - this.namespace = namespace; - return this; - } - - /** - * Get namespace - * @return namespace - */ - @Valid - @Schema(name = "namespace", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("namespace") - public OpenNamespaceIdentifier getNamespace() { - return namespace; - } - - public void setNamespace(OpenNamespaceIdentifier namespace) { - this.namespace = namespace; - } - - public OpenItemDiffDTO createItems(List<@Valid OpenItemDTO> createItems) { - this.createItems = createItems; - return this; - } - - public OpenItemDiffDTO addCreateItemsItem(OpenItemDTO createItemsItem) { - if (this.createItems == null) { - this.createItems = new ArrayList<>(); - } - this.createItems.add(createItemsItem); - return this; - } - - /** - * Get createItems - * @return createItems - */ - @Valid - @Schema(name = "createItems", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("createItems") - public List<@Valid OpenItemDTO> getCreateItems() { - return createItems; - } - - public void setCreateItems(List<@Valid OpenItemDTO> createItems) { - this.createItems = createItems; - } - - public OpenItemDiffDTO deleteItems(List<@Valid OpenItemDTO> deleteItems) { - this.deleteItems = deleteItems; - return this; - } - - public OpenItemDiffDTO addDeleteItemsItem(OpenItemDTO deleteItemsItem) { - if (this.deleteItems == null) { - this.deleteItems = new ArrayList<>(); - } - this.deleteItems.add(deleteItemsItem); - return this; - } - - /** - * Get deleteItems - * @return deleteItems - */ - @Valid - @Schema(name = "deleteItems", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("deleteItems") - public List<@Valid OpenItemDTO> getDeleteItems() { - return deleteItems; - } - - public void setDeleteItems(List<@Valid OpenItemDTO> deleteItems) { - this.deleteItems = deleteItems; - } - - public OpenItemDiffDTO updateItems(List<@Valid OpenItemDTO> updateItems) { - this.updateItems = updateItems; - return this; - } - - public OpenItemDiffDTO addUpdateItemsItem(OpenItemDTO updateItemsItem) { - if (this.updateItems == null) { - this.updateItems = new ArrayList<>(); - } - this.updateItems.add(updateItemsItem); - return this; - } - - /** - * Get updateItems - * @return updateItems - */ - @Valid - @Schema(name = "updateItems", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("updateItems") - public List<@Valid OpenItemDTO> getUpdateItems() { - return updateItems; - } - - public void setUpdateItems(List<@Valid OpenItemDTO> updateItems) { - this.updateItems = updateItems; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenItemDiffDTO openItemDiffDTO = (OpenItemDiffDTO) o; - return Objects.equals(this.code, openItemDiffDTO.code) && - Objects.equals(this.message, openItemDiffDTO.message) && - Objects.equals(this.namespace, openItemDiffDTO.namespace) && - Objects.equals(this.createItems, openItemDiffDTO.createItems) && - Objects.equals(this.deleteItems, openItemDiffDTO.deleteItems) && - Objects.equals(this.updateItems, openItemDiffDTO.updateItems); - } - - @Override - public int hashCode() { - return Objects.hash(code, message, namespace, createItems, deleteItems, updateItems); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenItemDiffDTO {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); - sb.append(" createItems: ").append(toIndentedString(createItems)).append("\n"); - sb.append(" deleteItems: ").append(toIndentedString(deleteItems)).append("\n"); - sb.append(" updateItems: ").append(toIndentedString(updateItems)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemExtendDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemExtendDTO.java deleted file mode 100644 index b52277f4..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemExtendDTO.java +++ /dev/null @@ -1,203 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 - */ - -@Schema(name = "OpenItemExtendDTO", description = "Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenItemExtendDTO { - - private Long namespaceId; - - private Boolean isModified; - - private Boolean isDeleted; - - private Boolean isNewlyAdded; - - private String newValue; - - private String oldValue; - - public OpenItemExtendDTO namespaceId(Long namespaceId) { - this.namespaceId = namespaceId; - return this; - } - - /** - * 所属命名空间的ID - * @return namespaceId - */ - - @Schema(name = "namespaceId", description = "所属命名空间的ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("namespaceId") - public Long getNamespaceId() { - return namespaceId; - } - - public void setNamespaceId(Long namespaceId) { - this.namespaceId = namespaceId; - } - - public OpenItemExtendDTO isModified(Boolean isModified) { - this.isModified = isModified; - return this; - } - - /** - * 是否有未发布的修改 - * @return isModified - */ - - @Schema(name = "isModified", description = "是否有未发布的修改", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("isModified") - public Boolean getIsModified() { - return isModified; - } - - public void setIsModified(Boolean isModified) { - this.isModified = isModified; - } - - public OpenItemExtendDTO isDeleted(Boolean isDeleted) { - this.isDeleted = isDeleted; - return this; - } - - /** - * 是否被标记为删除(未发布) - * @return isDeleted - */ - - @Schema(name = "isDeleted", description = "是否被标记为删除(未发布)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("isDeleted") - public Boolean getIsDeleted() { - return isDeleted; - } - - public void setIsDeleted(Boolean isDeleted) { - this.isDeleted = isDeleted; - } - - public OpenItemExtendDTO isNewlyAdded(Boolean isNewlyAdded) { - this.isNewlyAdded = isNewlyAdded; - return this; - } - - /** - * 是否为新添加的配置项(未发布) - * @return isNewlyAdded - */ - - @Schema(name = "isNewlyAdded", description = "是否为新添加的配置项(未发布)", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("isNewlyAdded") - public Boolean getIsNewlyAdded() { - return isNewlyAdded; - } - - public void setIsNewlyAdded(Boolean isNewlyAdded) { - this.isNewlyAdded = isNewlyAdded; - } - - public OpenItemExtendDTO newValue(String newValue) { - this.newValue = newValue; - return this; - } - - /** - * 新的值 - * @return newValue - */ - - @Schema(name = "newValue", description = "新的值", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("newValue") - public String getNewValue() { - return newValue; - } - - public void setNewValue(String newValue) { - this.newValue = newValue; - } - - public OpenItemExtendDTO oldValue(String oldValue) { - this.oldValue = oldValue; - return this; - } - - /** - * 上一次发布的值,用于对比变更 - * @return oldValue - */ - - @Schema(name = "oldValue", description = "上一次发布的值,用于对比变更", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("oldValue") - public String getOldValue() { - return oldValue; - } - - public void setOldValue(String oldValue) { - this.oldValue = oldValue; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenItemExtendDTO openItemExtendDTO = (OpenItemExtendDTO) o; - return Objects.equals(this.namespaceId, openItemExtendDTO.namespaceId) && - Objects.equals(this.isModified, openItemExtendDTO.isModified) && - Objects.equals(this.isDeleted, openItemExtendDTO.isDeleted) && - Objects.equals(this.isNewlyAdded, openItemExtendDTO.isNewlyAdded) && - Objects.equals(this.newValue, openItemExtendDTO.newValue) && - Objects.equals(this.oldValue, openItemExtendDTO.oldValue); - } - - @Override - public int hashCode() { - return Objects.hash(namespaceId, isModified, isDeleted, isNewlyAdded, newValue, oldValue); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenItemExtendDTO {\n"); - sb.append(" namespaceId: ").append(toIndentedString(namespaceId)).append("\n"); - sb.append(" isModified: ").append(toIndentedString(isModified)).append("\n"); - sb.append(" isDeleted: ").append(toIndentedString(isDeleted)).append("\n"); - sb.append(" isNewlyAdded: ").append(toIndentedString(isNewlyAdded)).append("\n"); - sb.append(" newValue: ").append(toIndentedString(newValue)).append("\n"); - sb.append(" oldValue: ").append(toIndentedString(oldValue)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemPageDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemPageDTO.java deleted file mode 100644 index 554791bd..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenItemPageDTO.java +++ /dev/null @@ -1,167 +0,0 @@ -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; - -/** - * 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 - */ - -@Schema(name = "OpenItemPageDTO", description = "分页配置项数据传输对象,用于返回分页查询的配置项列表结果") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenItemPageDTO { - - private Integer page; - - private Integer size; - - private Long total; - - @Valid - private List<@Valid OpenItemDTO> content; - - public OpenItemPageDTO page(Integer page) { - this.page = page; - return this; - } - - /** - * 当前页码,从0开始计数 - * @return page - */ - - @Schema(name = "page", description = "当前页码,从0开始计数", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("page") - public Integer getPage() { - return page; - } - - public void setPage(Integer page) { - this.page = page; - } - - public OpenItemPageDTO size(Integer size) { - this.size = size; - return this; - } - - /** - * 每页显示的记录数量 - * @return size - */ - - @Schema(name = "size", description = "每页显示的记录数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("size") - public Integer getSize() { - return size; - } - - public void setSize(Integer size) { - this.size = size; - } - - public OpenItemPageDTO total(Long total) { - this.total = total; - return this; - } - - /** - * 总记录数,符合查询条件的配置项总数量 - * @return total - */ - - @Schema(name = "total", description = "总记录数,符合查询条件的配置项总数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("total") - public Long getTotal() { - return total; - } - - public void setTotal(Long total) { - this.total = total; - } - - public OpenItemPageDTO content(List<@Valid OpenItemDTO> content) { - this.content = content; - return this; - } - - public OpenItemPageDTO addContentItem(OpenItemDTO contentItem) { - if (this.content == null) { - this.content = new ArrayList<>(); - } - this.content.add(contentItem); - return this; - } - - /** - * 当前页的配置项列表,包含具体的配置项数据 - * @return content - */ - @Valid - @Schema(name = "content", description = "当前页的配置项列表,包含具体的配置项数据", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("content") - public List<@Valid OpenItemDTO> getContent() { - return content; - } - - public void setContent(List<@Valid OpenItemDTO> content) { - this.content = content; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenItemPageDTO openItemPageDTO = (OpenItemPageDTO) o; - return Objects.equals(this.page, openItemPageDTO.page) && - Objects.equals(this.size, openItemPageDTO.size) && - Objects.equals(this.total, openItemPageDTO.total) && - Objects.equals(this.content, openItemPageDTO.content); - } - - @Override - public int hashCode() { - return Objects.hash(page, size, total, content); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenItemPageDTO {\n"); - sb.append(" page: ").append(toIndentedString(page)).append("\n"); - sb.append(" size: ").append(toIndentedString(size)).append("\n"); - sb.append(" total: ").append(toIndentedString(total)).append("\n"); - sb.append(" content: ").append(toIndentedString(content)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenMissEnvDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenMissEnvDTO.java deleted file mode 100644 index d999c265..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenMissEnvDTO.java +++ /dev/null @@ -1,106 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OpenMissEnvDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenMissEnvDTO { - - private Integer code; - - private String message; - - public OpenMissEnvDTO code(Integer code) { - this.code = code; - return this; - } - - /** - * 查询状态码 - * @return code - */ - - @Schema(name = "code", description = "查询状态码", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("code") - public Integer getCode() { - return code; - } - - public void setCode(Integer code) { - this.code = code; - } - - public OpenMissEnvDTO message(String message) { - this.message = message; - return this; - } - - /** - * Get message - * @return message - */ - - @Schema(name = "message", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("message") - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenMissEnvDTO openMissEnvDTO = (OpenMissEnvDTO) o; - return Objects.equals(this.code, openMissEnvDTO.code) && - Objects.equals(this.message, openMissEnvDTO.message); - } - - @Override - public int hashCode() { - return Objects.hash(code, message); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenMissEnvDTO {\n"); - sb.append(" code: ").append(toIndentedString(code)).append("\n"); - sb.append(" message: ").append(toIndentedString(message)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java deleted file mode 100644 index 06aee689..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceDTO.java +++ /dev/null @@ -1,408 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.OpenItemDTO; -import com.apollo.openapi.server.model.OpenNamespaceExtendDTO; -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; - -/** - * Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - */ - -@Schema(name = "OpenNamespaceDTO", description = "Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenNamespaceDTO { - - private String dataChangeCreatedBy; - - private String dataChangeCreatedByDisplayName; - - private String dataChangeLastModifiedBy; - - private String dataChangeLastModifiedByDisplayName; - - private String dataChangeCreatedTime; - - private String dataChangeLastModifiedTime; - - private String appId; - - private String clusterName; - - private String namespaceName; - - private String comment; - - private String format; - - private Boolean isPublic; - - @Valid - private List<@Valid OpenItemDTO> items; - - private OpenNamespaceExtendDTO extendInfo; - - public OpenNamespaceDTO 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 OpenNamespaceDTO 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 OpenNamespaceDTO 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 OpenNamespaceDTO 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 OpenNamespaceDTO 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 OpenNamespaceDTO 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 OpenNamespaceDTO 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 OpenNamespaceDTO 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 OpenNamespaceDTO 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 OpenNamespaceDTO comment(String comment) { - this.comment = comment; - return this; - } - - /** - * 命名空间备注说明,描述命名空间的用途 - * @return comment - */ - - @Schema(name = "comment", description = "命名空间备注说明,描述命名空间的用途", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("comment") - public String getComment() { - return comment; - } - - public void setComment(String comment) { - this.comment = comment; - } - - public OpenNamespaceDTO 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 OpenNamespaceDTO isPublic(Boolean isPublic) { - this.isPublic = isPublic; - return this; - } - - /** - * 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - * @return isPublic - */ - - @Schema(name = "isPublic", description = "是否为公共命名空间,公共命名空间可以被其他应用关联使用", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("isPublic") - public Boolean getIsPublic() { - return isPublic; - } - - public void setIsPublic(Boolean isPublic) { - this.isPublic = isPublic; - } - - public OpenNamespaceDTO items(List<@Valid OpenItemDTO> items) { - this.items = items; - return this; - } - - public OpenNamespaceDTO addItemsItem(OpenItemDTO itemsItem) { - if (this.items == null) { - this.items = new ArrayList<>(); - } - this.items.add(itemsItem); - return this; - } - - /** - * 命名空间包含的配置项列表 - * @return items - */ - @Valid - @Schema(name = "items", description = "命名空间包含的配置项列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("items") - public List<@Valid OpenItemDTO> getItems() { - return items; - } - - public void setItems(List<@Valid OpenItemDTO> items) { - this.items = items; - } - - public OpenNamespaceDTO extendInfo(OpenNamespaceExtendDTO extendInfo) { - this.extendInfo = extendInfo; - return this; - } - - /** - * Get extendInfo - * @return extendInfo - */ - @Valid - @Schema(name = "extendInfo", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("extendInfo") - public OpenNamespaceExtendDTO getExtendInfo() { - return extendInfo; - } - - public void setExtendInfo(OpenNamespaceExtendDTO extendInfo) { - this.extendInfo = extendInfo; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenNamespaceDTO openNamespaceDTO = (OpenNamespaceDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openNamespaceDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, openNamespaceDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedBy, openNamespaceDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, openNamespaceDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, openNamespaceDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openNamespaceDTO.dataChangeLastModifiedTime) && - Objects.equals(this.appId, openNamespaceDTO.appId) && - Objects.equals(this.clusterName, openNamespaceDTO.clusterName) && - Objects.equals(this.namespaceName, openNamespaceDTO.namespaceName) && - Objects.equals(this.comment, openNamespaceDTO.comment) && - Objects.equals(this.format, openNamespaceDTO.format) && - Objects.equals(this.isPublic, openNamespaceDTO.isPublic) && - Objects.equals(this.items, openNamespaceDTO.items) && - Objects.equals(this.extendInfo, openNamespaceDTO.extendInfo); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedBy, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, appId, clusterName, namespaceName, comment, format, isPublic, items, extendInfo); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenNamespaceDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).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(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append(" format: ").append(toIndentedString(format)).append("\n"); - sb.append(" isPublic: ").append(toIndentedString(isPublic)).append("\n"); - sb.append(" items: ").append(toIndentedString(items)).append("\n"); - sb.append(" extendInfo: ").append(toIndentedString(extendInfo)).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/OpenNamespaceExtendDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceExtendDTO.java deleted file mode 100644 index 05ce77ed..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceExtendDTO.java +++ /dev/null @@ -1,130 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OpenNamespaceExtendDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenNamespaceExtendDTO { - - private Boolean isConfigHidden; - - private String parentAppId; - - private Integer itemModifiedCnt; - - public OpenNamespaceExtendDTO isConfigHidden(Boolean isConfigHidden) { - this.isConfigHidden = isConfigHidden; - return this; - } - - /** - * 当当前用户无权限查看配置时置为 true - * @return isConfigHidden - */ - - @Schema(name = "isConfigHidden", description = "当当前用户无权限查看配置时置为 true", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("isConfigHidden") - public Boolean getIsConfigHidden() { - return isConfigHidden; - } - - public void setIsConfigHidden(Boolean isConfigHidden) { - this.isConfigHidden = isConfigHidden; - } - - public OpenNamespaceExtendDTO parentAppId(String parentAppId) { - this.parentAppId = parentAppId; - return this; - } - - /** - * 公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转 - * @return parentAppId - */ - - @Schema(name = "parentAppId", description = "公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("parentAppId") - public String getParentAppId() { - return parentAppId; - } - - public void setParentAppId(String parentAppId) { - this.parentAppId = parentAppId; - } - - public OpenNamespaceExtendDTO itemModifiedCnt(Integer itemModifiedCnt) { - this.itemModifiedCnt = itemModifiedCnt; - return this; - } - - /** - * 未发布变更数 - * @return itemModifiedCnt - */ - - @Schema(name = "itemModifiedCnt", description = "未发布变更数", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("itemModifiedCnt") - public Integer getItemModifiedCnt() { - return itemModifiedCnt; - } - - public void setItemModifiedCnt(Integer itemModifiedCnt) { - this.itemModifiedCnt = itemModifiedCnt; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenNamespaceExtendDTO openNamespaceExtendDTO = (OpenNamespaceExtendDTO) o; - return Objects.equals(this.isConfigHidden, openNamespaceExtendDTO.isConfigHidden) && - Objects.equals(this.parentAppId, openNamespaceExtendDTO.parentAppId) && - Objects.equals(this.itemModifiedCnt, openNamespaceExtendDTO.itemModifiedCnt); - } - - @Override - public int hashCode() { - return Objects.hash(isConfigHidden, parentAppId, itemModifiedCnt); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenNamespaceExtendDTO {\n"); - sb.append(" isConfigHidden: ").append(toIndentedString(isConfigHidden)).append("\n"); - sb.append(" parentAppId: ").append(toIndentedString(parentAppId)).append("\n"); - sb.append(" itemModifiedCnt: ").append(toIndentedString(itemModifiedCnt)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceIdentifier.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceIdentifier.java deleted file mode 100644 index 35fd9a96..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceIdentifier.java +++ /dev/null @@ -1,154 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OpenNamespaceIdentifier - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenNamespaceIdentifier { - - private String appId; - - private String env; - - private String clusterName; - - private String namespaceName; - - public OpenNamespaceIdentifier 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 OpenNamespaceIdentifier 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 OpenNamespaceIdentifier 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 OpenNamespaceIdentifier 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; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - 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 - public int hashCode() { - return Objects.hash(appId, env, clusterName, namespaceName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - 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"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} 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 deleted file mode 100644 index ab45e502..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceLockDTO.java +++ /dev/null @@ -1,155 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Apollo命名空间锁状态数据传输对象 - */ - -@Schema(name = "OpenNamespaceLockDTO", description = "Apollo命名空间锁状态数据传输对象") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenNamespaceLockDTO { - - private String namespaceName; - - private Boolean isLocked; - - private String lockedBy; - - private Boolean isEmergencyPublishAllowed; - - public OpenNamespaceLockDTO 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 OpenNamespaceLockDTO isLocked(Boolean isLocked) { - this.isLocked = isLocked; - return this; - } - - /** - * 是否被锁定 - * @return isLocked - */ - - @Schema(name = "isLocked", description = "是否被锁定", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("isLocked") - public Boolean getIsLocked() { - return isLocked; - } - - public void setIsLocked(Boolean isLocked) { - this.isLocked = isLocked; - } - - public OpenNamespaceLockDTO lockedBy(String lockedBy) { - this.lockedBy = lockedBy; - return this; - } - - /** - * 锁定者用户名 - * @return lockedBy - */ - - @Schema(name = "lockedBy", description = "锁定者用户名", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("lockedBy") - public String getLockedBy() { - return lockedBy; - } - - public void setLockedBy(String lockedBy) { - this.lockedBy = lockedBy; - } - - public OpenNamespaceLockDTO isEmergencyPublishAllowed(Boolean isEmergencyPublishAllowed) { - this.isEmergencyPublishAllowed = isEmergencyPublishAllowed; - return this; - } - - /** - * 是否允许紧急发布 - * @return isEmergencyPublishAllowed - */ - - @Schema(name = "isEmergencyPublishAllowed", description = "是否允许紧急发布", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("isEmergencyPublishAllowed") - public Boolean getIsEmergencyPublishAllowed() { - return isEmergencyPublishAllowed; - } - - public void setIsEmergencyPublishAllowed(Boolean isEmergencyPublishAllowed) { - this.isEmergencyPublishAllowed = isEmergencyPublishAllowed; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenNamespaceLockDTO openNamespaceLockDTO = (OpenNamespaceLockDTO) o; - return Objects.equals(this.namespaceName, openNamespaceLockDTO.namespaceName) && - Objects.equals(this.isLocked, openNamespaceLockDTO.isLocked) && - Objects.equals(this.lockedBy, openNamespaceLockDTO.lockedBy) && - Objects.equals(this.isEmergencyPublishAllowed, openNamespaceLockDTO.isEmergencyPublishAllowed); - } - - @Override - public int hashCode() { - return Objects.hash(namespaceName, isLocked, lockedBy, isEmergencyPublishAllowed); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenNamespaceLockDTO {\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" isLocked: ").append(toIndentedString(isLocked)).append("\n"); - sb.append(" lockedBy: ").append(toIndentedString(lockedBy)).append("\n"); - sb.append(" isEmergencyPublishAllowed: ").append(toIndentedString(isEmergencyPublishAllowed)).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/OpenNamespaceRoleUserDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceRoleUserDTO.java deleted file mode 100644 index 152d9310..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceRoleUserDTO.java +++ /dev/null @@ -1,175 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.OpenUserInfoDTO; -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; - -/** - * OpenNamespaceRoleUserDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenNamespaceRoleUserDTO { - - private String appId; - - private String namespaceName; - - @Valid - private List<@Valid OpenUserInfoDTO> modifyRoleUsers; - - @Valid - private List<@Valid OpenUserInfoDTO> releaseRoleUsers; - - public OpenNamespaceRoleUserDTO 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 OpenNamespaceRoleUserDTO 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 OpenNamespaceRoleUserDTO modifyRoleUsers(List<@Valid OpenUserInfoDTO> modifyRoleUsers) { - this.modifyRoleUsers = modifyRoleUsers; - return this; - } - - public OpenNamespaceRoleUserDTO addModifyRoleUsersItem(OpenUserInfoDTO modifyRoleUsersItem) { - if (this.modifyRoleUsers == null) { - this.modifyRoleUsers = new ArrayList<>(); - } - this.modifyRoleUsers.add(modifyRoleUsersItem); - return this; - } - - /** - * - * @return modifyRoleUsers - */ - @Valid - @Schema(name = "modifyRoleUsers", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("modifyRoleUsers") - public List<@Valid OpenUserInfoDTO> getModifyRoleUsers() { - return modifyRoleUsers; - } - - public void setModifyRoleUsers(List<@Valid OpenUserInfoDTO> modifyRoleUsers) { - this.modifyRoleUsers = modifyRoleUsers; - } - - public OpenNamespaceRoleUserDTO releaseRoleUsers(List<@Valid OpenUserInfoDTO> releaseRoleUsers) { - this.releaseRoleUsers = releaseRoleUsers; - return this; - } - - public OpenNamespaceRoleUserDTO addReleaseRoleUsersItem(OpenUserInfoDTO releaseRoleUsersItem) { - if (this.releaseRoleUsers == null) { - this.releaseRoleUsers = new ArrayList<>(); - } - this.releaseRoleUsers.add(releaseRoleUsersItem); - return this; - } - - /** - * - * @return releaseRoleUsers - */ - @Valid - @Schema(name = "releaseRoleUsers", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("releaseRoleUsers") - public List<@Valid OpenUserInfoDTO> getReleaseRoleUsers() { - return releaseRoleUsers; - } - - public void setReleaseRoleUsers(List<@Valid OpenUserInfoDTO> releaseRoleUsers) { - this.releaseRoleUsers = releaseRoleUsers; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenNamespaceRoleUserDTO openNamespaceRoleUserDTO = (OpenNamespaceRoleUserDTO) o; - return Objects.equals(this.appId, openNamespaceRoleUserDTO.appId) && - Objects.equals(this.namespaceName, openNamespaceRoleUserDTO.namespaceName) && - Objects.equals(this.modifyRoleUsers, openNamespaceRoleUserDTO.modifyRoleUsers) && - Objects.equals(this.releaseRoleUsers, openNamespaceRoleUserDTO.releaseRoleUsers); - } - - @Override - public int hashCode() { - return Objects.hash(appId, namespaceName, modifyRoleUsers, releaseRoleUsers); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenNamespaceRoleUserDTO {\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" modifyRoleUsers: ").append(toIndentedString(modifyRoleUsers)).append("\n"); - sb.append(" releaseRoleUsers: ").append(toIndentedString(releaseRoleUsers)).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/OpenNamespaceSyncDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncDTO.java deleted file mode 100644 index e5d99346..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceSyncDTO.java +++ /dev/null @@ -1,128 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.OpenItemDTO; -import com.apollo.openapi.server.model.OpenNamespaceIdentifier; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import java.util.ArrayList; -import java.util.List; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OpenNamespaceSyncDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenNamespaceSyncDTO { - - @Valid - private List<@Valid OpenNamespaceIdentifier> syncToNamespaces; - - @Valid - private List<@Valid OpenItemDTO> syncItems; - - public OpenNamespaceSyncDTO syncToNamespaces(List<@Valid OpenNamespaceIdentifier> syncToNamespaces) { - this.syncToNamespaces = syncToNamespaces; - return this; - } - - public OpenNamespaceSyncDTO addSyncToNamespacesItem(OpenNamespaceIdentifier syncToNamespacesItem) { - if (this.syncToNamespaces == null) { - this.syncToNamespaces = new ArrayList<>(); - } - this.syncToNamespaces.add(syncToNamespacesItem); - return this; - } - - /** - * 目标命名空间标识列表 - * @return syncToNamespaces - */ - @Valid - @Schema(name = "syncToNamespaces", description = "目标命名空间标识列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("syncToNamespaces") - public List<@Valid OpenNamespaceIdentifier> getSyncToNamespaces() { - return syncToNamespaces; - } - - public void setSyncToNamespaces(List<@Valid OpenNamespaceIdentifier> syncToNamespaces) { - this.syncToNamespaces = syncToNamespaces; - } - - public OpenNamespaceSyncDTO syncItems(List<@Valid OpenItemDTO> syncItems) { - this.syncItems = syncItems; - return this; - } - - public OpenNamespaceSyncDTO addSyncItemsItem(OpenItemDTO syncItemsItem) { - if (this.syncItems == null) { - this.syncItems = new ArrayList<>(); - } - this.syncItems.add(syncItemsItem); - return this; - } - - /** - * 需要修改的配置项列表 - * @return syncItems - */ - @Valid - @Schema(name = "syncItems", description = "需要修改的配置项列表", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("syncItems") - public List<@Valid OpenItemDTO> getSyncItems() { - return syncItems; - } - - public void setSyncItems(List<@Valid OpenItemDTO> syncItems) { - this.syncItems = syncItems; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenNamespaceSyncDTO openNamespaceSyncDTO = (OpenNamespaceSyncDTO) o; - return Objects.equals(this.syncToNamespaces, openNamespaceSyncDTO.syncToNamespaces) && - Objects.equals(this.syncItems, openNamespaceSyncDTO.syncItems); - } - - @Override - public int hashCode() { - return Objects.hash(syncToNamespaces, syncItems); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenNamespaceSyncDTO {\n"); - sb.append(" syncToNamespaces: ").append(toIndentedString(syncToNamespaces)).append("\n"); - sb.append(" syncItems: ").append(toIndentedString(syncItems)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} 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 deleted file mode 100644 index 552cb5cc..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceTextModel.java +++ /dev/null @@ -1,250 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OpenNamespaceTextModel - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -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/OpenNamespaceUsageDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceUsageDTO.java deleted file mode 100644 index 03f54892..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenNamespaceUsageDTO.java +++ /dev/null @@ -1,227 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * 命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 - */ - -@Schema(name = "OpenNamespaceUsageDTO", description = "命名空间使用情况数据传输对象,统计各环境和集群下的使用指标") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenNamespaceUsageDTO { - - private String namespaceName; - - private String appId; - - private String clusterName; - - private String envName; - - private Integer instanceCount; - - private Integer branchInstanceCount; - - private Integer linkedNamespaceCount; - - public OpenNamespaceUsageDTO namespaceName(String namespaceName) { - this.namespaceName = namespaceName; - return this; - } - - /** - * 命名空间名称 - * @return namespaceName - */ - - @Schema(name = "namespaceName", description = "命名空间名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("namespaceName") - public String getNamespaceName() { - return namespaceName; - } - - public void setNamespaceName(String namespaceName) { - this.namespaceName = namespaceName; - } - - public OpenNamespaceUsageDTO appId(String appId) { - this.appId = appId; - return this; - } - - /** - * 所属应用的唯一标识符 - * @return appId - */ - - @Schema(name = "appId", description = "所属应用的唯一标识符", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("appId") - public String getAppId() { - return appId; - } - - public void setAppId(String appId) { - this.appId = appId; - } - - public OpenNamespaceUsageDTO clusterName(String clusterName) { - this.clusterName = clusterName; - return this; - } - - /** - * 所属集群名称 - * @return clusterName - */ - - @Schema(name = "clusterName", description = "所属集群名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("clusterName") - public String getClusterName() { - return clusterName; - } - - public void setClusterName(String clusterName) { - this.clusterName = clusterName; - } - - public OpenNamespaceUsageDTO envName(String envName) { - this.envName = envName; - return this; - } - - /** - * 环境名称 - * @return envName - */ - - @Schema(name = "envName", description = "环境名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("envName") - public String getEnvName() { - return envName; - } - - public void setEnvName(String envName) { - this.envName = envName; - } - - public OpenNamespaceUsageDTO instanceCount(Integer instanceCount) { - this.instanceCount = instanceCount; - return this; - } - - /** - * 该命名空间关联的实例数量 - * @return instanceCount - */ - - @Schema(name = "instanceCount", description = "该命名空间关联的实例数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("instanceCount") - public Integer getInstanceCount() { - return instanceCount; - } - - public void setInstanceCount(Integer instanceCount) { - this.instanceCount = instanceCount; - } - - public OpenNamespaceUsageDTO branchInstanceCount(Integer branchInstanceCount) { - this.branchInstanceCount = branchInstanceCount; - return this; - } - - /** - * 分支命名空间关联的实例数量 - * @return branchInstanceCount - */ - - @Schema(name = "branchInstanceCount", description = "分支命名空间关联的实例数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("branchInstanceCount") - public Integer getBranchInstanceCount() { - return branchInstanceCount; - } - - public void setBranchInstanceCount(Integer branchInstanceCount) { - this.branchInstanceCount = branchInstanceCount; - } - - public OpenNamespaceUsageDTO linkedNamespaceCount(Integer linkedNamespaceCount) { - this.linkedNamespaceCount = linkedNamespaceCount; - return this; - } - - /** - * 关联到该公共命名空间的命名空间数量 - * @return linkedNamespaceCount - */ - - @Schema(name = "linkedNamespaceCount", description = "关联到该公共命名空间的命名空间数量", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("linkedNamespaceCount") - public Integer getLinkedNamespaceCount() { - return linkedNamespaceCount; - } - - public void setLinkedNamespaceCount(Integer linkedNamespaceCount) { - this.linkedNamespaceCount = linkedNamespaceCount; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenNamespaceUsageDTO openNamespaceUsageDTO = (OpenNamespaceUsageDTO) o; - return Objects.equals(this.namespaceName, openNamespaceUsageDTO.namespaceName) && - Objects.equals(this.appId, openNamespaceUsageDTO.appId) && - Objects.equals(this.clusterName, openNamespaceUsageDTO.clusterName) && - Objects.equals(this.envName, openNamespaceUsageDTO.envName) && - Objects.equals(this.instanceCount, openNamespaceUsageDTO.instanceCount) && - Objects.equals(this.branchInstanceCount, openNamespaceUsageDTO.branchInstanceCount) && - Objects.equals(this.linkedNamespaceCount, openNamespaceUsageDTO.linkedNamespaceCount); - } - - @Override - public int hashCode() { - return Objects.hash(namespaceName, appId, clusterName, envName, instanceCount, branchInstanceCount, linkedNamespaceCount); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenNamespaceUsageDTO {\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" envName: ").append(toIndentedString(envName)).append("\n"); - sb.append(" instanceCount: ").append(toIndentedString(instanceCount)).append("\n"); - sb.append(" branchInstanceCount: ").append(toIndentedString(branchInstanceCount)).append("\n"); - sb.append(" linkedNamespaceCount: ").append(toIndentedString(linkedNamespaceCount)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.java deleted file mode 100644 index 7ae21fb9..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenOrganizationDto.java +++ /dev/null @@ -1,106 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OpenOrganizationDto - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenOrganizationDto { - - private String orgId; - - private String orgName; - - public OpenOrganizationDto orgId(String orgId) { - this.orgId = orgId; - return this; - } - - /** - * 组织ID - * @return orgId - */ - - @Schema(name = "orgId", description = "组织ID", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("orgId") - public String getOrgId() { - return orgId; - } - - public void setOrgId(String orgId) { - this.orgId = orgId; - } - - public OpenOrganizationDto orgName(String orgName) { - this.orgName = orgName; - return this; - } - - /** - * 组织名称 - * @return orgName - */ - - @Schema(name = "orgName", description = "组织名称", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("orgName") - public String getOrgName() { - return orgName; - } - - public void setOrgName(String orgName) { - this.orgName = orgName; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenOrganizationDto openOrganizationDto = (OpenOrganizationDto) o; - return Objects.equals(this.orgId, openOrganizationDto.orgId) && - Objects.equals(this.orgName, openOrganizationDto.orgName); - } - - @Override - public int hashCode() { - return Objects.hash(orgId, orgName); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenOrganizationDto {\n"); - sb.append(" orgId: ").append(toIndentedString(orgId)).append("\n"); - sb.append(" orgName: ").append(toIndentedString(orgName)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPermissionConditionDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPermissionConditionDTO.java deleted file mode 100644 index 890c2a51..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenPermissionConditionDTO.java +++ /dev/null @@ -1,82 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OpenPermissionConditionDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenPermissionConditionDTO { - - private Boolean hasPermission; - - public OpenPermissionConditionDTO hasPermission(Boolean hasPermission) { - this.hasPermission = hasPermission; - return this; - } - - /** - * - * @return hasPermission - */ - - @Schema(name = "hasPermission", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("hasPermission") - public Boolean getHasPermission() { - return hasPermission; - } - - public void setHasPermission(Boolean hasPermission) { - this.hasPermission = hasPermission; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenPermissionConditionDTO openPermissionConditionDTO = (OpenPermissionConditionDTO) o; - return Objects.equals(this.hasPermission, openPermissionConditionDTO.hasPermission); - } - - @Override - public int hashCode() { - return Objects.hash(hasPermission); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenPermissionConditionDTO {\n"); - sb.append(" hasPermission: ").append(toIndentedString(hasPermission)).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/OpenReleaseChangeDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseChangeDTO.java deleted file mode 100644 index cf057c65..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseChangeDTO.java +++ /dev/null @@ -1,154 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OpenReleaseChangeDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenReleaseChangeDTO { - - private String changeType; - - private String key; - - private String newValue; - - private String oldValue; - - public OpenReleaseChangeDTO changeType(String changeType) { - this.changeType = changeType; - return this; - } - - /** - * 修改类型 - * @return changeType - */ - - @Schema(name = "changeType", description = "修改类型", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("changeType") - public String getChangeType() { - return changeType; - } - - public void setChangeType(String changeType) { - this.changeType = changeType; - } - - public OpenReleaseChangeDTO key(String key) { - this.key = key; - return this; - } - - /** - * key - * @return key - */ - - @Schema(name = "key", description = "key", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("key") - public String getKey() { - return key; - } - - public void setKey(String key) { - this.key = key; - } - - public OpenReleaseChangeDTO newValue(String newValue) { - this.newValue = newValue; - return this; - } - - /** - * new value - * @return newValue - */ - - @Schema(name = "newValue", description = "new value", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("newValue") - public String getNewValue() { - return newValue; - } - - public void setNewValue(String newValue) { - this.newValue = newValue; - } - - public OpenReleaseChangeDTO oldValue(String oldValue) { - this.oldValue = oldValue; - return this; - } - - /** - * old value - * @return oldValue - */ - - @Schema(name = "oldValue", description = "old value", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("oldValue") - public String getOldValue() { - return oldValue; - } - - public void setOldValue(String oldValue) { - this.oldValue = oldValue; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenReleaseChangeDTO openReleaseChangeDTO = (OpenReleaseChangeDTO) o; - return Objects.equals(this.changeType, openReleaseChangeDTO.changeType) && - Objects.equals(this.key, openReleaseChangeDTO.key) && - Objects.equals(this.newValue, openReleaseChangeDTO.newValue) && - Objects.equals(this.oldValue, openReleaseChangeDTO.oldValue); - } - - @Override - public int hashCode() { - return Objects.hash(changeType, key, newValue, oldValue); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenReleaseChangeDTO {\n"); - sb.append(" changeType: ").append(toIndentedString(changeType)).append("\n"); - sb.append(" key: ").append(toIndentedString(key)).append("\n"); - sb.append(" newValue: ").append(toIndentedString(newValue)).append("\n"); - sb.append(" oldValue: ").append(toIndentedString(oldValue)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseDTO.java deleted file mode 100644 index 9ef1d2b4..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseDTO.java +++ /dev/null @@ -1,382 +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 java.util.HashMap; -import java.util.Map; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * Apollo发布信息数据传输对象,表示一次配置发布的完整信息 - */ - -@Schema(name = "OpenReleaseDTO", description = "Apollo发布信息数据传输对象,表示一次配置发布的完整信息") -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenReleaseDTO { - - private String dataChangeCreatedBy; - - private String dataChangeCreatedByDisplayName; - - private String dataChangeLastModifiedBy; - - private String dataChangeLastModifiedByDisplayName; - - private String dataChangeCreatedTime; - - private String dataChangeLastModifiedTime; - - private Long id; - - private String appId; - - private String clusterName; - - private String namespaceName; - - private String name; - - @Valid - private Map configurations = new HashMap<>(); - - private String comment; - - public OpenReleaseDTO 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 OpenReleaseDTO 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 OpenReleaseDTO 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 OpenReleaseDTO 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 OpenReleaseDTO 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 OpenReleaseDTO 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 OpenReleaseDTO id(Long id) { - this.id = id; - return this; - } - - /** - * 发布记录的唯一标识符,系统自动生成 - * @return id - */ - - @Schema(name = "id", description = "发布记录的唯一标识符,系统自动生成", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("id") - public Long getId() { - return id; - } - - public void setId(Long id) { - this.id = id; - } - - public OpenReleaseDTO 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 OpenReleaseDTO 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 OpenReleaseDTO 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 OpenReleaseDTO name(String name) { - this.name = name; - return this; - } - - /** - * 发布名称,用于标识这次发布的版本或描述 - * @return name - */ - - @Schema(name = "name", description = "发布名称,用于标识这次发布的版本或描述", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("name") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - 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 - */ - - @Schema(name = "configurations", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("configurations") - public Map getConfigurations() { - return configurations; - } - - public void setConfigurations(Map configurations) { - this.configurations = configurations; - } - - public OpenReleaseDTO comment(String comment) { - this.comment = comment; - return this; - } - - /** - * 发布备注,描述本次发布的变更内容和目的 - * @return comment - */ - - @Schema(name = "comment", description = "发布备注,描述本次发布的变更内容和目的", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("comment") - public String getComment() { - return comment; - } - - public void setComment(String comment) { - this.comment = comment; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenReleaseDTO openReleaseDTO = (OpenReleaseDTO) o; - return Objects.equals(this.dataChangeCreatedBy, openReleaseDTO.dataChangeCreatedBy) && - Objects.equals(this.dataChangeCreatedByDisplayName, openReleaseDTO.dataChangeCreatedByDisplayName) && - Objects.equals(this.dataChangeLastModifiedBy, openReleaseDTO.dataChangeLastModifiedBy) && - Objects.equals(this.dataChangeLastModifiedByDisplayName, openReleaseDTO.dataChangeLastModifiedByDisplayName) && - Objects.equals(this.dataChangeCreatedTime, openReleaseDTO.dataChangeCreatedTime) && - Objects.equals(this.dataChangeLastModifiedTime, openReleaseDTO.dataChangeLastModifiedTime) && - Objects.equals(this.id, openReleaseDTO.id) && - Objects.equals(this.appId, openReleaseDTO.appId) && - Objects.equals(this.clusterName, openReleaseDTO.clusterName) && - Objects.equals(this.namespaceName, openReleaseDTO.namespaceName) && - Objects.equals(this.name, openReleaseDTO.name) && - Objects.equals(this.configurations, openReleaseDTO.configurations) && - Objects.equals(this.comment, openReleaseDTO.comment); - } - - @Override - public int hashCode() { - return Objects.hash(dataChangeCreatedBy, dataChangeCreatedByDisplayName, dataChangeLastModifiedBy, dataChangeLastModifiedByDisplayName, dataChangeCreatedTime, dataChangeLastModifiedTime, id, appId, clusterName, namespaceName, name, configurations, comment); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenReleaseDTO {\n"); - sb.append(" dataChangeCreatedBy: ").append(toIndentedString(dataChangeCreatedBy)).append("\n"); - sb.append(" dataChangeCreatedByDisplayName: ").append(toIndentedString(dataChangeCreatedByDisplayName)).append("\n"); - sb.append(" dataChangeLastModifiedBy: ").append(toIndentedString(dataChangeLastModifiedBy)).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(" appId: ").append(toIndentedString(appId)).append("\n"); - sb.append(" clusterName: ").append(toIndentedString(clusterName)).append("\n"); - sb.append(" namespaceName: ").append(toIndentedString(namespaceName)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" configurations: ").append(toIndentedString(configurations)).append("\n"); - sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); - sb.append("}"); - return sb.toString(); - } - - /** - * Convert the given object to string with each line indented by 4 spaces - * (except the first line). - */ - private String toIndentedString(Object o) { - if (o == null) { - return "null"; - } - return o.toString().replace("\n", "\n "); - } -} diff --git a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseDiffDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseDiffDTO.java deleted file mode 100644 index 9c299dd5..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenReleaseDiffDTO.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.apollo.openapi.server.model.OpenReleaseChangeDTO; -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; - -/** - * OpenReleaseDiffDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenReleaseDiffDTO { - - @Valid - private List<@Valid OpenReleaseChangeDTO> changes; - - public OpenReleaseDiffDTO changes(List<@Valid OpenReleaseChangeDTO> changes) { - this.changes = changes; - return this; - } - - public OpenReleaseDiffDTO addChangesItem(OpenReleaseChangeDTO changesItem) { - if (this.changes == null) { - this.changes = new ArrayList<>(); - } - this.changes.add(changesItem); - return this; - } - - /** - * A list of changes, ensuring order if necessary. - * @return changes - */ - @Valid - @Schema(name = "changes", description = "A list of changes, ensuring order if necessary.", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("changes") - public List<@Valid OpenReleaseChangeDTO> getChanges() { - return changes; - } - - public void setChanges(List<@Valid OpenReleaseChangeDTO> changes) { - this.changes = changes; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenReleaseDiffDTO openReleaseDiffDTO = (OpenReleaseDiffDTO) o; - return Objects.equals(this.changes, openReleaseDiffDTO.changes); - } - - @Override - public int hashCode() { - return Objects.hash(changes); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenReleaseDiffDTO {\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/OpenUserDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenUserDTO.java deleted file mode 100644 index 91e9e2d8..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenUserDTO.java +++ /dev/null @@ -1,178 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OpenUserDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenUserDTO { - - private String username; - - private String userDisplayName; - - private String password; - - private String email; - - private Integer enabled; - - public OpenUserDTO username(String username) { - this.username = username; - return this; - } - - /** - * 用户名 - * @return username - */ - - @Schema(name = "username", description = "用户名", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("username") - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } - - public OpenUserDTO userDisplayName(String userDisplayName) { - this.userDisplayName = userDisplayName; - return this; - } - - /** - * 用户显示名 - * @return userDisplayName - */ - - @Schema(name = "userDisplayName", description = "用户显示名", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("userDisplayName") - public String getUserDisplayName() { - return userDisplayName; - } - - public void setUserDisplayName(String userDisplayName) { - this.userDisplayName = userDisplayName; - } - - public OpenUserDTO password(String password) { - this.password = password; - return this; - } - - /** - * 用户密码 - * @return password - */ - - @Schema(name = "password", description = "用户密码", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("password") - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public OpenUserDTO email(String email) { - this.email = email; - return this; - } - - /** - * 用户邮箱 - * @return email - */ - - @Schema(name = "email", description = "用户邮箱", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("email") - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public OpenUserDTO enabled(Integer enabled) { - this.enabled = enabled; - return this; - } - - /** - * 是否启用,1 表示启用,0 表示禁用 - * @return enabled - */ - - @Schema(name = "enabled", description = "是否启用,1 表示启用,0 表示禁用", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("enabled") - public Integer getEnabled() { - return enabled; - } - - public void setEnabled(Integer enabled) { - this.enabled = enabled; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenUserDTO openUserDTO = (OpenUserDTO) o; - return Objects.equals(this.username, openUserDTO.username) && - Objects.equals(this.userDisplayName, openUserDTO.userDisplayName) && - Objects.equals(this.password, openUserDTO.password) && - Objects.equals(this.email, openUserDTO.email) && - Objects.equals(this.enabled, openUserDTO.enabled); - } - - @Override - public int hashCode() { - return Objects.hash(username, userDisplayName, password, email, enabled); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenUserDTO {\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" userDisplayName: ").append(toIndentedString(userDisplayName)).append("\n"); - sb.append(" password: ").append(toIndentedString(password)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).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/OpenUserInfoDTO.java b/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenUserInfoDTO.java deleted file mode 100644 index be847bef..00000000 --- a/spring-boot2/src/main/java/com/apollo/openapi/server/model/OpenUserInfoDTO.java +++ /dev/null @@ -1,154 +0,0 @@ -package com.apollo.openapi.server.model; - -import java.net.URI; -import java.util.Objects; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonCreator; -import org.openapitools.jackson.nullable.JsonNullable; -import java.time.OffsetDateTime; -import javax.validation.Valid; -import javax.validation.constraints.*; -import io.swagger.v3.oas.annotations.media.Schema; - - -import java.util.*; -import javax.annotation.Generated; - -/** - * OpenUserInfoDTO - */ - -@Generated(value = "org.openapitools.codegen.languages.SpringCodegen") -public class OpenUserInfoDTO { - - private String userId; - - private String name; - - private String email; - - private Integer enabled; - - public OpenUserInfoDTO userId(String userId) { - this.userId = userId; - return this; - } - - /** - * - * @return userId - */ - - @Schema(name = "userId", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("userId") - public String getUserId() { - return userId; - } - - public void setUserId(String userId) { - this.userId = userId; - } - - public OpenUserInfoDTO name(String name) { - this.name = name; - return this; - } - - /** - * - * @return name - */ - - @Schema(name = "name", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("name") - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public OpenUserInfoDTO email(String email) { - this.email = email; - return this; - } - - /** - * - * @return email - */ - - @Schema(name = "email", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("email") - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public OpenUserInfoDTO enabled(Integer enabled) { - this.enabled = enabled; - return this; - } - - /** - * - * @return enabled - */ - - @Schema(name = "enabled", description = "", requiredMode = Schema.RequiredMode.NOT_REQUIRED) - @JsonProperty("enabled") - public Integer getEnabled() { - return enabled; - } - - public void setEnabled(Integer enabled) { - this.enabled = enabled; - } - - @Override - public boolean equals(Object o) { - if (this == o) { - return true; - } - if (o == null || getClass() != o.getClass()) { - return false; - } - OpenUserInfoDTO openUserInfoDTO = (OpenUserInfoDTO) o; - return Objects.equals(this.userId, openUserInfoDTO.userId) && - Objects.equals(this.name, openUserInfoDTO.name) && - Objects.equals(this.email, openUserInfoDTO.email) && - Objects.equals(this.enabled, openUserInfoDTO.enabled); - } - - @Override - public int hashCode() { - return Objects.hash(userId, name, email, enabled); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class OpenUserInfoDTO {\n"); - sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); - sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" enabled: ").append(toIndentedString(enabled)).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/application.properties b/spring-boot2/src/main/resources/application.properties deleted file mode 100644 index eaa658d8..00000000 --- a/spring-boot2/src/main/resources/application.properties +++ /dev/null @@ -1,3 +0,0 @@ -server.port=8080 -spring.jackson.date-format=com.apollo.openapi.server.RFC3339DateFormat -spring.jackson.serialization.WRITE_DATES_AS_TIMESTAMPS=false diff --git a/spring-boot2/src/main/resources/openapi.yaml b/spring-boot2/src/main/resources/openapi.yaml deleted file mode 100644 index 9e818da5..00000000 --- a/spring-boot2/src/main/resources/openapi.yaml +++ /dev/null @@ -1,8987 +0,0 @@ -openapi: 3.0.1 -info: - description: | -

Apollo配置中心OpenAPI接口文档

- -

认证方式

-

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

- -

获取 Token 的方式:

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

使用示例

-
curl -X GET "http://localhost:8070/openapi/v1/apps" \
-    -H "Authorization: your_token_here"
- title: Apollo OpenAPI - version: 0.3.8 -servers: -- url: / -security: -- ApiKeyAuth: [] -tags: -- description: 应用管理相关接口,包括应用的创建、查询、更新、删除等操作 - name: App Management -- description: 配置项管理相关接口,包括配置的增删改查、批量操作、同步等功能 - name: Item Management -- description: 发布管理相关接口,包括配置发布、发布历史、灰度发布等功能 - name: Release Management -- description: 集群管理相关接口,包括集群的创建、查询、删除等操作 - name: Cluster Management -- description: 命名空间管理相关接口,包括命名空间的创建、查询、配置等操作 - name: Namespace Management -- description: AppNamespace管理相关接口,包括创建、查询、删除等操作 - name: AppNamespace Management -- description: 命名空间锁管理相关接口 - name: Namespace Lock Management -- description: 命名空间分支管理相关接口,包括分支创建、合并、灰度发布等功能 - name: Namespace Branch Management -- description: 实例管理相关接口,包括实例查询、配置生效状态等功能 - name: Instance Management -- description: 组织管理相关接口,包括组织信息查询等功能 - name: Organization Management -- description: 环境管理相关接口,包括环境查询等功能 - name: Environment Management -- description: AccessKey管理相关接口,包括AccessKey的创建、查询、删除、启用、禁用等操作 - name: AccessKey Management -- description: 权限管理相关接口,包括权限查询等功能 - name: Permission Management -- description: 用户管理相关接口,支持Portal用户登录态和具备用户管理权限的Consumer Token调用 - name: User Management -- description: Portal UI 登录态管理接口,主要供当前版本 Portal 前端调用 - name: Portal Management -paths: - /openapi/v1/apps: - get: - deprecated: false - description: POST /openapi/v1/apps - operationId: findApps - parameters: - - description: 查找应用 - example: "123" - explode: true - in: query - name: appIds - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedByDisplayName: Apollo Admin - dataChangeLastModifiedByDisplayName: Apollo Admin - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - name: Sample Application - appId: sample-app - orgId: default - orgName: Default Organization - ownerName: Apollo Admin - ownerEmail: admin@apollo.com - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedByDisplayName: Apollo Admin - dataChangeLastModifiedByDisplayName: Apollo Admin - dataChangeCreatedTime: 2024-01-10T14:20:00.000Z - dataChangeLastModifiedTime: 2024-01-12T16:45:00.000Z - name: User Service - appId: user-service - orgId: microservices - orgName: Microservices Team - ownerName: Dev Team - ownerEmail: dev@company.com - schema: - items: - $ref: '#/components/schemas/OpenAppDTO' - type: array - description: 成功获取应用列表 - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 未授权访问 - summary: 查找应用 (original openapi) - tags: - - App Management - 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/OpenCreateAppDTO' - required: true - responses: - "200": - description: 应用创建成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - 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 - dataChangeLastModifiedBy: apollo - dataChangeCreatedByDisplayName: Apollo Admin - dataChangeLastModifiedByDisplayName: Apollo Admin - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - name: Sample Application - appId: sample-app - orgId: default - orgName: Default Organization - ownerName: Apollo Admin - ownerEmail: admin@apollo.com - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedByDisplayName: Apollo Admin - dataChangeLastModifiedByDisplayName: Apollo Admin - dataChangeCreatedTime: 2024-01-10T14:20:00.000Z - dataChangeLastModifiedTime: 2024-01-12T16:45:00.000Z - name: User Service - appId: user-service - orgId: microservices - orgName: Microservices Team - ownerName: Dev Team - ownerEmail: dev@company.com - schema: - items: - $ref: '#/components/schemas/OpenAppDTO' - type: array - description: 成功获取授权应用列表 - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 未授权访问 - summary: 获取当前Consumer授权的应用列表 (original openapi) - tags: - - App Management - x-accepts: application/json - x-tags: - - tag: App Management - /openapi/v1/apps/{appId}/envclusters: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/envclusters" - operationId: getEnvClusters - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - - env: DEV - clusters: - - default - - test-cluster - - env: UAT - clusters: - - default - - env: PRO - clusters: - - default - - backup - schema: - items: - $ref: '#/components/schemas/OpenEnvClusterDTO' - type: array - description: 成功获取应用环境集群信息 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 应用不存在 - summary: 获取应用的环境集群信息 (original openapi) - tags: - - App Management - 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: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: 应用删除成功 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足,需要超级管理员权限 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 应用不存在 - summary: 删除应用(new added) - tags: - - App Management - x-accepts: application/json - x-tags: - - tag: App Management - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}" - operationId: getApp - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedByDisplayName: Apollo Admin - dataChangeLastModifiedByDisplayName: Dev User - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T15:45:00.000Z - name: Sample Application - appId: sample-app - orgId: default - orgName: Default Organization - ownerName: Apollo Admin - ownerEmail: admin@apollo.com - schema: - $ref: '#/components/schemas/OpenAppDTO' - description: 成功获取应用信息 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 应用不存在 - summary: 获取单个应用信息(new added) - tags: - - App Management - x-accepts: application/json - x-tags: - - tag: App Management - put: - deprecated: false - description: "PUT /openapi/v1/apps/{appId}" - operationId: updateApp - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAppDTO' - required: true - responses: - "200": - description: 应用更新成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 更新应用(new added) - tags: - - App Management - x-content-type: 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: - application/json: - example: - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedByDisplayName: Apollo Admin - dataChangeLastModifiedByDisplayName: Dev User - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T16:45:00.000Z - name: User Service - appId: user-service - orgId: microservices - orgName: Microservices Team - ownerName: Dev Team - ownerEmail: dev@company.com - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: ops-user - dataChangeCreatedByDisplayName: Apollo Admin - dataChangeLastModifiedByDisplayName: Ops User - dataChangeCreatedTime: 2024-01-10T09:15:00.000Z - dataChangeLastModifiedTime: 2024-01-18T14:30:00.000Z - name: Order Service - appId: order-service - orgId: business - orgName: Business Team - ownerName: Business Team - ownerEmail: business@company.com - schema: - items: - $ref: '#/components/schemas/OpenAppDTO' - type: array - description: 成功获取Consumer的应用列表 - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 未授权访问 - summary: 获取当前Consumer/User的应用列表(分页)(new added) - tags: - - App Management - x-accepts: application/json - x-tags: - - tag: App Management - /openapi/v1/apps/{appId}/env-cluster-info: - get: - deprecated: false - description: "/openapi/v1/apps/{appId}/env-cluster-info" - operationId: getEnvClusterInfo - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - - env: DEV - code: "200" - clusters: - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedByDisplayName: apollo - dataChangeLastModifiedByDisplayName: apollo - dataChangeCreatedTime: 2023-01-01T00:00:00.000Z - dataChangeLastModifiedTime: 2023-01-01T00:00:00.000Z - id: 1 - name: default - appId: sample-app - parentClusterId: 0 - comment: Default cluster - message: "load env: DEV cluster error" - schema: - items: - $ref: '#/components/schemas/OpenEnvClusterInfo' - type: array - description: 成功获取应用环境集群详情 - summary: 获取应用环境集群详情(new added) - tags: - - App Management - 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: 环境标识,例如 DEV、FAT、UAT、PROD - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAppDTO' - required: true - responses: - "200": - description: 应用在指定环境创建成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 在指定环境创建应用(new added) - tags: - - App Management - x-content-type: 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: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - - code: "200" - message: test_NOT_FOUND - - code: "500" - message: load appId:xx from env test_INTERNAL_ERROR error. test ERROR - MESSAGE - schema: - items: - $ref: '#/components/schemas/OpenMissEnvDTO' - type: array - description: 成功获取应用缺失的环境列表 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 应用不存在 - summary: 查找缺失的环境(new added) - tags: - - App Management - 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 /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" - operationId: deleteItem - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 配置项键名 - explode: false - in: path - name: key - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: 配置项删除成功 - summary: 删除配置项 (original openapi) - tags: - - Item Management - x-accepts: application/json - x-tags: - - tag: Item Management - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" - operationId: getItem - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 配置项键名 - explode: false - in: path - name: key - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: server.port - type: 0 - value: "8080" - comment: 服务器端口配置 - schema: - $ref: '#/components/schemas/OpenItemDTO' - description: 成功获取配置项 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 配置项不存在 - summary: 获取单个配置项 (original openapi) - tags: - - Item Management - x-accepts: application/json - x-tags: - - tag: Item Management - put: - deprecated: false - description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key}" - operationId: updateItem - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: key - required: true - schema: - type: string - style: simple - - description: "" - example: "false" - explode: true - in: query - name: createIfNotExists - required: true - schema: - default: false - type: boolean - style: form - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenItemDTO' - required: true - responses: - "200": - description: 配置项更新成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 配置项不存在 - summary: 更新配置项 (original openapi) - tags: - - Item Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: - get: - deprecated: false - description: 获取指定命名空间的配置项列表,支持分页 - operationId: findItemsByNamespace - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 页码,从0开始 - example: 0 - explode: true - in: query - name: page - required: true - schema: - minimum: 0 - type: integer - style: form - - description: 每页数量 - example: 50 - explode: true - in: query - name: size - required: true - schema: - minimum: 0 - type: integer - style: form - responses: - "200": - content: - application/json: - example: - page: 0 - size: 50 - total: 3 - content: - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: server.port - type: 0 - value: "8080" - comment: 服务器端口配置 - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - key: spring.datasource.url - type: 0 - value: jdbc:mysql://localhost:3306/apollo - comment: 数据库连接地址 - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: ops-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-18T09:15:00.000Z - key: logging.level.root - type: 0 - value: INFO - comment: 日志级别配置 - schema: - $ref: '#/components/schemas/OpenItemPageDTO' - description: 成功获取配置项列表 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 命名空间不存在 - summary: 获取命名空间下的配置项列表 (original openapi) - tags: - - Item Management - x-accepts: application/json - x-tags: - - tag: Item Management - post: - deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items" - operationId: createItem - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenItemDTO' - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - key: server.port - type: 0 - value: "8080" - comment: 服务器端口配置 - schema: - $ref: '#/components/schemas/OpenItemDTO' - description: 配置项创建成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 创建新的配置项 (original openapi) - tags: - - Item Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Item Management - put: - deprecated: false - description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items:" - operationId: batchUpdateItemsByText - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenNamespaceTextModel' - required: true - responses: - "200": - description: 批量更新配置项成功 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 通过文本批量修改配置项 (new added) - tags: - - Item Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}: - delete: - deprecated: false - description: "DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" - operationId: deleteItemByEncodedKey - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: key - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: operator - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 通过编码的key删除配置项 (original openapi) - tags: - - Item Management - x-accepts: application/json - x-tags: - - tag: Item Management - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" - operationId: getItemByEncodedKey - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 配置项键名(需要URL编码) - explode: false - in: path - name: key - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: spring.datasource.url - type: 0 - value: jdbc:mysql://localhost:3306/apollo?useUnicode=true&characterEncoding=utf8 - comment: 数据库连接地址,包含特殊字符 - schema: - $ref: '#/components/schemas/OpenItemDTO' - description: 成功获取配置项(支持编码key) - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 配置项不存在 - summary: 通过查询参数获取配置项(支持编码的key) (original openapi) - tags: - - Item Management - x-accepts: application/json - x-tags: - - tag: Item Management - put: - deprecated: false - description: "PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key}" - operationId: updateItemByEncodedKey - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 配置项键名(需要URL编码) - explode: false - in: path - name: key - required: true - schema: - type: string - style: simple - - description: 若不存在则创建(true/false) - example: "false" - explode: true - in: query - name: createIfNotExists - required: true - schema: - default: false - type: boolean - style: form - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenItemDTO' - required: true - responses: - "200": - description: 配置项更新成功(编码key) - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 配置项不存在 - summary: 通过编码的key更新配置项 (original openapi) - tags: - - Item Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items:" - operationId: findBranchItems - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 分支名称 - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: feature.new-feature - type: 0 - value: enabled - comment: 新功能开关,分支测试中 - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: test.debug.level - type: 0 - value: verbose - comment: 测试调试级别 - schema: - items: - $ref: '#/components/schemas/OpenItemDTO' - type: array - description: 成功获取分支下的配置项列表 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 分支不存在 - summary: 获取分支下的配置项 (new added) - tags: - - Item Management - x-accepts: application/json - x-tags: - - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff: - post: - deprecated: false - description: "POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff" - operationId: compareItems - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenNamespaceSyncDTO' - required: true - responses: - "200": - content: - application/json: - example: - - namespace: - appId: "" - env: "" - clusterName: "" - namespaceName: "" - diffs: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedByDisplayName: "" - dataChangeLastModifiedByDisplayName: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - createItems: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedByDisplayName: "" - dataChangeLastModifiedByDisplayName: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - namespaceId: 0 - key: "" - type: 0 - value: "" - comment: "" - lineNum: 0 - updateItems: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedByDisplayName: "" - dataChangeLastModifiedByDisplayName: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - namespaceId: 0 - key: "" - type: 0 - value: "" - comment: "" - lineNum: 0 - deleteItems: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedByDisplayName: "" - dataChangeLastModifiedByDisplayName: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - namespaceId: 0 - key: "" - type: 0 - value: "" - comment: "" - lineNum: 0 - extInfo: "" - schema: - items: - $ref: '#/components/schemas/OpenItemDiffDTO' - type: array - description: 成功对比命名空间配置差异 - summary: 对比命名空间配置差异 (new added) - tags: - - Item Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: - post: - deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize:" - operationId: syncItems - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenNamespaceSyncDTO' - required: true - responses: - "200": - description: 配置项同步成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 同步配置项到多个命名空间 (new added) - tags: - - Item Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation: - post: - deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation" - operationId: syntaxCheck - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenNamespaceTextModel' - required: true - responses: - "200": - description: 配置文本语法验证通过 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 配置文本语法错误 - summary: 验证配置文本语法 (new added) - tags: - - Item Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation: - post: - deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation" - operationId: revertItems - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: 配置项更改撤销成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 撤销配置项更改 (new added) - tags: - - Item Management - x-accepts: application/json - x-tags: - - tag: Item Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}: - delete: - deprecated: false - 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 - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 操作人用户名,openapi外部调用时需传入 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: 集群删除成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 删除失败,集群可能包含配置 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 集群不存在 - summary: 删除集群 (new added) - tags: - - Cluster Management - x-accepts: application/json - x-tags: - - tag: Cluster Management - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}" - operationId: getCluster - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: ops-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-18T09:15:00.000Z - name: production - appId: sample-app - schema: - $ref: '#/components/schemas/OpenClusterDTO' - description: 成功获取集群信息 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 集群不存在 - summary: 获取指定集群信息 (original openapi) - tags: - - Cluster Management - x-accepts: application/json - x-tags: - - tag: Cluster Management - /openapi/v1/envs/{env}/apps/{appId}/clusters: - post: - deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters" - operationId: createCluster - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - explode: false - in: path - 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: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - name: test-cluster - appId: sample-app - schema: - $ref: '#/components/schemas/OpenClusterDTO' - description: 集群创建成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 创建集群 (original openapi) - tags: - - Cluster Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Cluster Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/releases: - post: - deprecated: false - description: 创建发布 - operationId: createRelease - parameters: - - description: app标识 - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NamespaceReleaseDTO' - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - id: 12345 - appId: sample-app - clusterName: default - namespaceName: application - name: Release v1.0.0 - configurations: - server.port: "8080" - spring.datasource.url: jdbc:mysql://localhost:3306/apollo - logging.level.root: INFO - comment: 首次发布,包含基础配置 - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: 发布创建成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 发布参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 创建发布 (original openapi) - tags: - - Release Management - x-content-type: 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: 查询命名空间最新活跃发布 - operationId: loadLatestActiveRelease - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - id: 12345 - appId: sample-app - clusterName: default - namespaceName: application - name: Release v1.2.0 - configurations: - server.port: "8080" - spring.datasource.url: jdbc:mysql://localhost:3306/apollo - logging.level.root: INFO - app.version: 1.2.0 - comment: 最新生产发布版本,包含性能优化 - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: 成功获取最新活跃发布 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 未找到活跃发布 - summary: 获取最新活跃发布 (original openapi) - tags: - - Release Management - 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: 合并灰度分支并可选择删除分支 - operationId: merge - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 分支名称 - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - - description: 合并后是否删除分支(true/false) - example: "true" - explode: true - in: query - name: deleteBranch - required: true - schema: - type: boolean - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NamespaceReleaseDTO' - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - id: 12346 - appId: sample-app - clusterName: default - namespaceName: application - name: Merge from branch feature-123 - configurations: - server.port: "8080" - spring.datasource.url: jdbc:mysql://localhost:3306/apollo - logging.level.root: INFO - feature.new-feature: enabled - comment: 合并功能分支到主分支,包含新功能配置 - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: 分支合并成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 合并参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 合并分支 (original openapi) - tags: - - Namespace Branch Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Namespace Branch Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/releases: - post: - deprecated: false - description: 创建灰度发布 - operationId: createGrayRelease - parameters: - - description: app标识 - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 分支名称 - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NamespaceReleaseDTO' - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: 灰度发布创建成功 - summary: 创建灰度发布 (original openapi) - tags: - - Release Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - 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 - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NamespaceGrayDelReleaseDTO' - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: "" - summary: 创建灰度删除发布 (original openapi) - tags: - - Release Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Release Management - /openapi/v1/envs/{env}/releases/{releaseId}/rollback: - put: - deprecated: false - description: 回滚到指定的发布版本 - operationId: rollback - parameters: - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 发布ID - explode: false - in: path - name: releaseId - required: true - schema: - format: int64 - type: integer - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: 要回滚到的目标发布ID;不传时回滚到上一版本 - explode: true - in: query - name: toReleaseId - required: false - schema: - format: int64 - type: integer - style: form - responses: - "200": - description: 发布回滚成功 - summary: 回滚发布 (original openapi) - tags: - - Release Management - 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: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 发布ID - explode: false - in: path - name: releaseId - required: true - schema: - format: int64 - type: integer - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: 成功获取发布详情 - summary: 获取发布详情 (new added) - tags: - - Release Management - 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: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 页码,从0开始 - example: 0 - explode: true - in: query - name: page - required: true - schema: - type: integer - style: form - - description: 每页数量 - example: 5 - explode: true - in: query - name: size - required: true - schema: - type: integer - style: form - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - schema: - items: - $ref: '#/components/schemas/OpenReleaseDTO' - type: array - description: 成功获取活跃发布列表 - summary: 获取活跃发布(分页) (new added) - tags: - - Release Management - x-accepts: application/json - x-tags: - - tag: Release Management - /openapi/v1/envs/{env}/releases/comparison: - get: - description: Get the configuration differences between two releases. - operationId: compareRelease - parameters: - - description: Environment - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: The base release ID - explode: true - in: query - name: baseReleaseId - required: true - schema: - format: int64 - type: integer - style: form - - description: The release ID to compare against - explode: true - in: query - name: toCompareReleaseId - required: true - schema: - format: int64 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/OpenReleaseDiffDTO' - description: Successful comparison - summary: Compare two releases - tags: - - Release Management - x-accepts: application/json - x-tags: - - tag: Release Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances" - operationId: getInstanceCountByNamespace - parameters: - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - type: integer - description: 成功返回实例数量 - summary: 获取命名空间下的实例数量 (original openapi) - tags: - - Instance Management - x-accepts: application/json - x-tags: - - tag: Instance Management - /openapi/v1/envs/{env}/instances/by-release: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/instances/by-release" - operationId: getByRelease - parameters: - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: releaseId - required: true - schema: - format: int64 - type: integer - style: form - - description: "" - example: 0 - explode: true - in: query - name: page - required: true - schema: - type: integer - style: form - - description: "" - example: 20 - explode: true - in: query - name: size - required: true - schema: - type: integer - style: form - responses: - "200": - content: - application/json: - example: - page: 0 - size: 0 - total: 0 - instances: - - id: 0 - appId: "" - clusterName: "" - dataCenter: "" - ip: "" - configs: - - release: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - releaseDeliveryTime: "" - dataChangeLastModifiedTime: "" - dataChangeCreatedTime: "" - schema: - $ref: '#/components/schemas/OpenInstancePageDTO' - description: "" - summary: 根据发布版本查询实例(支持分页) (new added) - tags: - - Instance Management - x-accepts: application/json - x-tags: - - tag: Instance Management - /openapi/v1/envs/{env}/instances/by-namespace: - get: - deprecated: false - operationId: getByNamespace - parameters: - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 应用ID - explode: true - in: query - name: appId - required: true - schema: - type: string - style: form - - description: 集群名称 - explode: true - in: query - name: clusterName - required: true - schema: - type: string - style: form - - description: 命名空间名称 - explode: true - in: query - name: namespaceName - required: true - schema: - type: string - style: form - - description: Instance表中的AppID - explode: true - in: query - name: instanceAppId - required: false - schema: - type: string - style: form - - description: 页数 - explode: true - in: query - name: page - required: true - schema: - default: 0 - minimum: 0 - type: integer - style: form - - description: 页大小 - explode: true - in: query - name: size - required: true - schema: - default: 0 - minimum: 0 - type: integer - style: form - responses: - "200": - content: - application/json: - example: - page: 0 - size: 0 - total: 0 - instances: - - id: 0 - appId: "" - clusterName: "" - dataCenter: "" - ip: "" - configs: - - release: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - releaseDeliveryTime: "" - dataChangeLastModifiedTime: "" - dataChangeCreatedTime: "" - schema: - $ref: '#/components/schemas/OpenInstancePageDTO' - description: "" - summary: 根据namespaceName查询实例(new added) - tags: - - Instance Management - x-accepts: application/json - x-tags: - - tag: Instance Management - /openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in: - get: - deprecated: false - operationId: getByReleasesAndNamespaceNotIn - parameters: - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 应用ID - explode: true - in: query - name: appId - required: true - schema: - type: string - style: form - - description: 集群名称 - explode: true - in: query - name: clusterName - required: true - schema: - type: string - style: form - - description: 命名空间名称 - explode: true - in: query - name: namespaceName - required: true - schema: - type: string - style: form - - description: 排除的发布ID列表,用逗号分隔 - explode: true - in: query - name: releaseIds - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - - id: 0 - appId: "" - clusterName: "" - dataCenter: "" - ip: "" - configs: - - release: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - releaseDeliveryTime: "" - dataChangeLastModifiedTime: "" - dataChangeCreatedTime: "" - schema: - items: - $ref: '#/components/schemas/OpenInstanceDTO' - type: array - description: "" - summary: 查询不在指定发布版本中的实例 (new added) - tags: - - Instance Management - x-accepts: application/json - x-tags: - - tag: Instance Management - /openapi/v1/namespaces: - post: - deprecated: false - description: "POST /openapi/v1/apps/{appId}/namespaces" - operationId: createNamespaces - parameters: - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - items: - $ref: '#/components/schemas/OpenCreateNamespaceDTO' - type: array - required: true - responses: - "200": - description: Namespace创建成功 - summary: 创建Namespace (new added) - tags: - - Namespace Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Namespace Management - /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage" - operationId: findAppNamespaceUsage - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/OpenNamespaceUsageDTO' - type: array - description: AppNamespaceUsage查询成功 - summary: 查询appnamespace使用情况(new added) - tags: - - AppNamespace Management - x-accepts: application/json - x-tags: - - tag: AppNamespace Management - /openapi/v1/apps/{appId}/appnamespaces: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/appnamespaces" - operationId: getAppNamespacesByAppId - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - name: "" - appId: "" - format: "" - isPublic: false - appendNamespacePrefix: false - comment: "" - schema: - items: - $ref: '#/components/schemas/OpenAppNamespaceDTO' - type: array - description: "" - summary: 获取指定应用的AppNamespace (new added) - tags: - - AppNamespace Management - x-accepts: application/json - x-tags: - - tag: AppNamespace Management - post: - deprecated: false - description: "POST /openapi/v1/apps/{appId}/appnamespaces" - operationId: createAppNamespace - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenAppNamespaceDTO' - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-15T10:30:00.000Z - name: database - appId: sample-app - format: properties - isPublic: false - appendNamespacePrefix: true - comment: 数据库相关配置命名空间 - schema: - $ref: '#/components/schemas/OpenAppNamespaceDTO' - description: AppNamespace创建成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 创建AppNamespace (original openapi) - tags: - - AppNamespace Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: AppNamespace 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 - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - example: "true" - explode: true - in: query - name: fillItemDetail - required: true - schema: - default: true - type: boolean - style: form - - description: "" - explode: true - in: query - name: extendInfo - required: false - schema: - default: false - type: boolean - style: form - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - appId: "" - clusterName: "" - namespaceName: "" - comment: "" - format: "" - isPublic: false - items: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - key: "" - type: 0 - value: "" - comment: "" - schema: - items: - $ref: '#/components/schemas/OpenNamespaceDTO' - type: array - description: "" - summary: 获取指定集群下的所有Namespace (original openapi) - tags: - - Namespace Management - 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: findNamespace - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - example: "true" - explode: true - in: query - name: fillItemDetail - required: true - schema: - default: true - type: boolean - style: form - - description: "" - explode: true - in: query - name: extendInfo - required: false - schema: - default: false - type: boolean - style: form - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - appId: "" - clusterName: "" - namespaceName: "" - comment: "" - format: "" - isPublic: false - items: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - key: "" - type: 0 - value: "" - comment: "" - schema: - $ref: '#/components/schemas/OpenNamespaceDTO' - description: "" - summary: 获取指定的Namespace (original openapi) - tags: - - Namespace Management - x-accepts: application/json - x-tags: - - tag: Namespace Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace" - operationId: findPublicNamespaceForAssociatedNamespace - parameters: - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 关联Namespace名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: extendInfo - required: false - schema: - default: false - type: boolean - style: form - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: apollo - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T11:00:00.000Z - appId: public-owner-app - clusterName: default - namespaceName: public.namespace - comment: 公共 namespace 示例 - format: properties - isPublic: true - parentAppId: public-owner-app - isConfigHidden: false - itemModifiedCnt: 0 - items: - - key: k1 - value: v1 - - key: k2 - value: v2 - schema: - $ref: '#/components/schemas/OpenNamespaceDTO' - description: 成功获取关联的公共Namespace详情 - summary: 查询关联Namespace对应的公共Namespace详情 (new added) - tags: - - Namespace Management - x-accepts: application/json - x-tags: - - tag: Namespace Management - /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock: - get: - deprecated: false - description: "GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock" - operationId: getNamespaceLock - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - namespaceName: "" - isLocked: false - lockedBy: "" - schema: - $ref: '#/components/schemas/OpenNamespaceLockDTO' - description: "" - summary: 获取Namespace的锁状态 (original openapi) - tags: - - Namespace Lock Management - x-accepts: application/json - x-tags: - - tag: Namespace Lock Management - /openapi/v1/appnamespaces: - get: - deprecated: false - description: GET /openapi/v1/appnamespaces/public - operationId: getAppNamespaces - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - name: "" - appId: "" - format: "" - isPublic: false - appendNamespacePrefix: false - comment: "" - schema: - items: - $ref: '#/components/schemas/OpenAppNamespaceDTO' - type: array - description: "" - summary: 获取所有公共AppNamespace (new added) - tags: - - AppNamespace Management - x-accepts: application/json - x-tags: - - tag: AppNamespace Management - /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}: - delete: - deprecated: false - description: "DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" - operationId: deleteAppNamespace - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: AppNamespace删除成功 - summary: 删除AppNamespace (new added) - tags: - - AppNamespace Management - x-accepts: application/json - x-tags: - - tag: AppNamespace Management - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}" - operationId: findAppNamespace - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: extendInfo - required: false - schema: - default: false - type: boolean - style: form - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - name: "" - appId: "" - format: "" - isPublic: false - appendNamespacePrefix: false - comment: "" - schema: - $ref: '#/components/schemas/OpenAppNamespaceDTO' - description: 成功获取AppNamespace - summary: 获取指定的AppNamespace (new added) - tags: - - AppNamespace Management - x-accepts: application/json - x-tags: - - tag: AppNamespace Management - /openapi/v1/apps/{appId}/namespaces/releases/status: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/namespaces/releases/status" - operationId: getNamespacesReleaseStatus - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/StringToStringBoolMap' - description: 成功获取发布状态映射 - summary: 获取应用下所有Namespace的发布状态 (new added) - tags: - - Namespace Management - x-accepts: application/json - x-tags: - - 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: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 公共命名空间名称 - explode: false - in: path - name: publicNamespaceName - required: true - schema: - type: string - style: simple - - description: 页码,从0开始 - example: 0 - explode: true - in: query - name: page - required: true - schema: - type: integer - style: form - - description: 每页数量 - example: 10 - explode: true - in: query - name: size - required: true - schema: - type: integer - style: form - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - appId: "" - clusterName: "" - namespaceName: "" - comment: "" - format: "" - isPublic: false - items: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - key: "" - type: 0 - value: "" - comment: "" - schema: - items: - $ref: '#/components/schemas/OpenNamespaceDTO' - type: array - description: 成功获取实例列表 - summary: 获取公共AppNamespace的所有实例 (new added) - tags: - - AppNamespace Management - x-accepts: application/json - x-tags: - - tag: AppNamespace Management - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage" - operationId: findNamespaceUsage - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/OpenNamespaceUsageDTO' - type: array - description: NamespaceUsage查询成功 - summary: 查询namespace使用情况(new added) - tags: - - Namespace Management - x-accepts: application/json - x-tags: - - tag: Namespace Management - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces" - operationId: findMissingNamespaces - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - - "" - schema: - items: - type: string - type: array - description: 缺失的命名空间名称列表 - summary: 查找缺失的Namespace (new added) - tags: - - Namespace Management - x-accepts: application/json - x-tags: - - tag: Namespace Management - post: - deprecated: false - description: "POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces" - operationId: createMissingNamespaces - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: 缺失的命名空间创建成功 - summary: 创建缺失的Namespace (new added) - tags: - - Namespace Management - x-accepts: application/json - x-tags: - - tag: Namespace Management - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}: - delete: - deprecated: false - description: "DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}" - operationId: deleteNamespace - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: 解除关联成功 - summary: 删除指定的Namespace (new added) - tags: - - Namespace Management - x-accepts: application/json - x-tags: - - tag: Namespace Management - /openapi/v1/organizations: - get: - deprecated: false - description: GET /openapi/v1/organizations - operationId: getOrganization - responses: - "200": - content: - application/json: - example: - - orgId: default - orgName: Default Organization - - orgId: microservices - orgName: Microservices Team - - orgId: infrastructure - orgName: Infrastructure Team - schema: - description: 组织列表 - items: - $ref: '#/components/schemas/OpenOrganizationDto' - type: array - description: 成功获取组织列表 - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 未授权访问 - summary: 获取所有组织信息 (original openapi) - tags: - - Organization Management - 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: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: extendInfo - required: false - schema: - default: false - type: boolean - style: form - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - appId: sample-app - clusterName: default - namespaceName: application - comment: 功能分支,用于测试新特性 - format: properties - isPublic: false - items: - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: feature.new-feature - type: 0 - value: enabled - comment: 新功能开关 - - dataChangeCreatedBy: apollo - dataChangeLastModifiedBy: dev-user - dataChangeCreatedTime: 2024-01-15T10:30:00.000Z - dataChangeLastModifiedTime: 2024-01-20T14:25:00.000Z - key: test.mode - type: 0 - value: debug - comment: 测试模式配置 - schema: - $ref: '#/components/schemas/OpenNamespaceDTO' - description: 成功获取分支信息 - "404": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 分支不存在 - summary: 获取命名空间分支信息 (original openapi) - tags: - - Namespace Branch Management - x-accepts: application/json - x-tags: - - tag: Namespace Branch Management - post: - deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches" - operationId: createBranch - parameters: - - description: app标识 - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - appId: "" - clusterName: "" - namespaceName: "" - comment: "" - format: "" - isPublic: false - items: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - key: "" - type: 0 - value: "" - comment: "" - schema: - $ref: '#/components/schemas/OpenNamespaceDTO' - description: 命名空间分支创建成功 - summary: 创建命名空间分支 (original openapi) - tags: - - Namespace Branch Management - 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: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 分支名称 - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: 分支删除成功 - summary: 删除命名空间分支 (original openapi) - tags: - - Namespace Branch Management - x-accepts: application/json - x-tags: - - tag: Namespace Branch Management - post: - deprecated: false - description: "POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}" - operationId: mergeBranch - parameters: - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 分支名称 - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - - description: 合并后是否删除分支(true/false) - example: "true" - explode: true - in: query - name: deleteBranch - required: true - schema: - type: boolean - style: form - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/NamespaceReleaseDTO' - required: true - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - appId: "" - clusterName: "" - namespaceName: "" - name: "" - configurations: - ? "" - : "" - comment: "" - schema: - $ref: '#/components/schemas/OpenReleaseDTO' - description: 分支合并成功 - summary: 合并分支到主分支 (new added) - tags: - - Namespace Branch Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Namespace Branch Management - /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}/rules" - operationId: getBranchGrayRules - parameters: - - description: app标识 - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 分支名称 - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - appId: "" - clusterName: "" - namespaceName: "" - branchName: "" - ruleItems: - - clientAppId: "" - clientIpList: - - "" - clientLabelList: - - "" - schema: - $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' - description: 成功获取灰度发布规则 - summary: 获取分支灰度发布规则 (original openapi) - tags: - - Namespace Branch Management - 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}/rules" - operationId: updateBranchRules - parameters: - - description: 应用ID - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 环境标识 - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 集群名称 - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 命名空间名称 - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 分支名称 - explode: false - in: path - name: branchName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenGrayReleaseRuleDTO' - required: true - responses: - "200": - description: 灰度规则更新成功 - summary: 更新分支灰度发布规则 (original openapi) - tags: - - Namespace Branch Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Namespace Branch Management - /openapi/v1/envs: - get: - deprecated: false - description: GET /openapi/v1/envs - operationId: getEnvs - responses: - "200": - content: - application/json: - example: - - DEV - - FAT - - UAT - - PRO - schema: - items: - type: string - type: array - description: 成功获取环境列表 - summary: 获取所有环境 - tags: - - Environment Management - x-accepts: application/json - x-tags: - - tag: Environment Management - /openapi/v1/apps/{appId}/namespaces/{namespaceName}/permission-init: - post: - deprecated: false - description: "" - operationId: initAppPermission - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: 初始化成功 - summary: 初始化应用权限 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permission-init: - post: - deprecated: false - description: "" - operationId: initClusterNamespacePermission - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 初始化集群Namespace权限 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - /openapi/v1/apps/{appId}/permissions/{permissionType}: - get: - deprecated: false - description: "" - operationId: hasAppPermission - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: permissionType - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - hasPermission: false - schema: - $ref: '#/components/schemas/OpenPermissionConditionDTO' - description: "" - summary: 校验应用权限 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - /openapi/v1/apps/{appId}/namespaces/{namespaceName}/permissions/{permissionType}: - get: - deprecated: false - description: "" - operationId: hasNamespacePermission - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: permissionType - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - hasPermission: false - schema: - $ref: '#/components/schemas/OpenPermissionConditionDTO' - description: "" - summary: 校验Namespace权限 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/permissions/{permissionType}: - get: - deprecated: false - description: "" - operationId: hasEnvNamespacePermission - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: permissionType - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - hasPermission: false - schema: - $ref: '#/components/schemas/OpenPermissionConditionDTO' - description: "" - summary: 校验环境Namespace权限 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permissions/{permissionType}: - get: - deprecated: false - description: "" - operationId: hasClusterNamespacePermission - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: permissionType - required: true - schema: - type: string - style: simple - - description: "" - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - hasPermission: false - schema: - $ref: '#/components/schemas/OpenPermissionConditionDTO' - description: "" - summary: 校验集群Namespace权限 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - /openapi/v1/permissions/root: - get: - deprecated: false - description: "" - operationId: hasRootPermission - parameters: - - description: "" - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - hasPermission: false - schema: - $ref: '#/components/schemas/OpenPermissionConditionDTO' - description: "" - summary: 校验Root权限 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/role-users: - get: - deprecated: false - description: "" - operationId: getNamespaceEnvRoleUsers - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - appId: "" - namespaceName: "" - modifyRoleUsers: - - userId: "" - name: "" - email: "" - enabled: 0 - releaseRoleUsers: - - userId: "" - name: "" - email: "" - enabled: 0 - env: "" - schema: - $ref: '#/components/schemas/OpenEnvNamespaceRoleUserDTO' - description: "" - summary: 获取环境Namespace用户 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - /openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType}: - delete: - deprecated: false - description: "" - operationId: removeNamespaceEnvRoleFromUser - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: roleType - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: the user which role removed from - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 移除环境Namespace角色 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - post: - deprecated: false - description: "" - operationId: assignNamespaceEnvRoleToUser - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: roleType - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: the user which role assigned to - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 分配环境Namespace角色 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/role-users: - get: - deprecated: false - description: "" - operationId: getClusterNamespaceRoles - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - appId: "" - env: "" - cluster: "" - modifyRoleUsers: - - userId: "" - name: "" - email: "" - enabled: 0 - releaseRoleUsers: - - userId: "" - name: "" - email: "" - enabled: 0 - schema: - $ref: '#/components/schemas/OpenClusterNamespaceRoleUserDTO' - description: "" - summary: 获取集群Namespace用户 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/roles/{roleType}: - delete: - deprecated: false - description: "" - operationId: removeClusterNamespaceRoleFromUser - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: roleType - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: the user which role removed from - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 移除集群Namespace角色 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - post: - deprecated: false - description: "" - operationId: assignClusterNamespaceRoleToUser - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: roleType - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: the user which role assigned to - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 分配集群Namespace角色 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - /openapi/v1/apps/{appId}/namespaces/{namespaceName}/role-users: - get: - deprecated: false - description: "" - operationId: getNamespaceRoles - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - appId: "" - namespaceName: "" - modifyRoleUsers: - - userId: "" - name: "" - email: "" - enabled: 0 - releaseRoleUsers: - - userId: "" - name: "" - email: "" - enabled: 0 - schema: - $ref: '#/components/schemas/OpenNamespaceRoleUserDTO' - description: "" - summary: 获取Namespace用户 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - /openapi/v1/apps/{appId}/namespaces/{namespaceName}/roles/{roleType}: - delete: - deprecated: false - description: "" - operationId: removeNamespaceRoleFromUser - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: roleType - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: the user which role removed from - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 移除Namespace角色 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - post: - deprecated: false - description: "" - operationId: assignNamespaceRoleToUser - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: roleType - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: the user which role assigned to - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 分配Namespace角色 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - /openapi/v1/apps/{appId}/role-users: - get: - deprecated: false - description: "" - operationId: getAppRoles - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - appId: "" - masterUsers: - - userId: "" - name: "" - email: "" - enabled: 0 - schema: - $ref: '#/components/schemas/OpenAppRoleUserDTO' - description: "" - summary: 获取应用角色用户 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - /openapi/v1/apps/{appId}/roles/{roleType}: - delete: - deprecated: false - description: "" - operationId: removeAppRoleFromUser - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: roleType - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: the user which role removed from - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 移除应用角色 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - post: - deprecated: false - description: "" - operationId: assignAppRoleToUser - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: roleType - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: the user which role removed from - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - description: "" - type: string - responses: - "200": - description: "" - summary: 分配应用角色 (new added) - tags: - - Permission Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Permission Management - /openapi/v1/system/roles/create-application: - delete: - deprecated: false - description: "" - operationId: deleteCreateApplicationRoleFromUser - parameters: - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: "" - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 移除建应用角色 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - get: - deprecated: false - description: "" - operationId: hasCreateApplicationPermission - parameters: - - description: "" - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - members: - ? "" - : {} - schema: - additionalProperties: - type: boolean - type: object - description: "" - summary: 校验建应用权限 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - post: - deprecated: false - description: "" - operationId: addCreateApplicationRoleToUsers - parameters: - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - description: "" - items: - type: string - title: userIds - type: array - responses: - "200": - description: "" - summary: 分配建应用角色 (new added) - tags: - - Permission Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Permission Management - /openapi/v1/system/roles/create-application/role-users: - get: - deprecated: false - description: "" - operationId: getCreateApplicationRoleUsers - parameters: [] - responses: - "200": - content: - application/json: - example: - - "" - schema: - items: - type: string - type: array - description: "" - summary: 获取建应用用户 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - /openapi/v1/apps/{appId}/roles/master: - delete: - deprecated: false - description: "" - operationId: removeManageAppMasterRoleFromUser - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: the user which role removed from - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 移除AppMaster (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - post: - deprecated: false - description: "" - operationId: addManageAppMasterRoleToUser - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - - description: the user which role assign to - explode: true - in: query - name: userId - required: true - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 分配AppMaster (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - /openapi/v1/system/role/manage-app-master: - get: - deprecated: false - description: "" - operationId: isManageAppMasterPermissionEnabled - parameters: [] - responses: - "200": - content: - application/json: - example: - members: - ? "" - : {} - schema: - additionalProperties: - type: boolean - type: object - description: "" - summary: 校验AppMaster开关 (new added) - tags: - - Permission Management - x-accepts: application/json - x-tags: - - tag: Permission Management - /openapi/v1/apps/{appId}/envs/{env}/accesskeys: - get: - deprecated: false - description: "" - operationId: findAccessKeys - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - example: - - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedByDisplayName: "" - dataChangeLastModifiedByDisplayName: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - secret: "" - appId: "" - mode: 0 - enabled: false - schema: - items: - $ref: '#/components/schemas/OpenAccessKeyDTO' - type: array - description: "" - summary: 查找AccessKey - tags: - - AccessKey Management - x-accepts: application/json - x-tags: - - tag: AccessKey Management - post: - deprecated: false - description: "" - operationId: createAccessKey - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - example: - dataChangeCreatedBy: "" - dataChangeLastModifiedBy: "" - dataChangeCreatedByDisplayName: "" - dataChangeLastModifiedByDisplayName: "" - dataChangeCreatedTime: "" - dataChangeLastModifiedTime: "" - id: 0 - secret: "" - appId: "" - mode: 0 - enabled: false - schema: - $ref: '#/components/schemas/OpenAccessKeyDTO' - description: "" - summary: 创建AccessKey - tags: - - AccessKey Management - x-accepts: application/json - x-tags: - - tag: AccessKey Management - /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}: - delete: - deprecated: false - description: "" - operationId: deleteAccessKey - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: accessKeyId - required: true - schema: - format: int64 - type: integer - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 删除AccessKey - tags: - - AccessKey Management - x-accepts: application/json - x-tags: - - tag: AccessKey Management - /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/activation: - put: - deprecated: false - description: "" - operationId: enableAccessKey - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: accessKeyId - required: true - schema: - format: int64 - type: integer - style: simple - - description: "" - example: 0 - explode: true - in: query - name: mode - required: false - schema: - default: 0 - type: integer - style: form - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 启用AccessKey - tags: - - AccessKey Management - x-accepts: application/json - x-tags: - - tag: AccessKey Management - /openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/deactivation: - put: - deprecated: false - description: "" - operationId: disableAccessKey - parameters: - - description: "" - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - description: "" - explode: false - in: path - name: accessKeyId - required: true - schema: - format: int64 - type: integer - style: simple - - description: 操作人用户名 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - responses: - "200": - description: "" - summary: 禁用AccessKey - tags: - - AccessKey Management - x-accepts: application/json - x-tags: - - tag: AccessKey Management - /openapi/v1/user: - get: - deprecated: false - description: GET /openapi/v1/user - operationId: getCurrentUser - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/OpenUserInfoDTO' - description: 成功获取当前用户 - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 未登录或未授权访问 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 仅支持Portal用户登录态访问 - summary: 获取当前Portal用户(new added) - tags: - - User Management - x-accepts: application/json - x-tags: - - tag: User Management - /openapi/v1/users: - get: - deprecated: false - description: GET /openapi/v1/users,支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - operationId: searchUsers - parameters: - - description: 用户名、显示名或邮箱关键字 - explode: true - in: query - name: keyword - required: true - schema: - type: string - style: form - - description: 是否包含禁用用户 - explode: true - in: query - name: includeInactiveUsers - required: false - schema: - default: false - type: boolean - style: form - - description: 偏移量 - explode: true - in: query - name: offset - required: false - schema: - default: 0 - minimum: 0 - type: integer - style: form - - description: 返回数量 - explode: true - in: query - name: limit - required: false - schema: - default: 10 - minimum: 1 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - items: - $ref: '#/components/schemas/OpenUserInfoDTO' - type: array - description: 成功获取用户列表 - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 未登录或未授权访问 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 搜索用户(new added) - tags: - - User Management - x-accepts: application/json - x-tags: - - tag: User Management - post: - deprecated: false - description: POST /openapi/v1/users,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - operationId: createOrUpdateUser - parameters: - - description: true 表示创建用户,false 表示更新用户 - explode: true - in: query - name: isCreate - required: false - schema: - default: false - type: boolean - style: form - - description: 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenUserDTO' - required: true - responses: - "200": - description: 用户创建或更新成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 创建或更新用户(new added) - tags: - - User Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: User Management - /openapi/v1/users/{userId}: - get: - deprecated: false - description: "GET /openapi/v1/users/{userId},支持Portal用户登录态或具备ManageUsers权限的\ - Consumer Token访问" - operationId: getUserByUserId - parameters: - - description: 用户ID - explode: false - in: path - name: userId - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/OpenUserInfoDTO' - description: 成功获取用户 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误或用户不存在 - "401": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 未登录或未认证 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 获取指定用户(new added) - tags: - - User Management - x-accepts: application/json - x-tags: - - tag: User Management - /openapi/v1/users/enabled: - put: - deprecated: false - description: PUT /openapi/v1/users/enabled,Portal用户登录态使用当前登录用户作为operator;Consumer - Token访问时需要具备ManageUsers权限并传入有效operator - operationId: changeUserEnabled - parameters: - - description: 操作人用户名,Consumer Token访问时必填且必须是已存在用户;Portal用户登录态会忽略该参数 - explode: true - in: query - name: operator - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OpenUserDTO' - required: true - responses: - "200": - description: 用户状态修改成功 - "400": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 请求参数错误 - "403": - content: - application/json: - schema: - $ref: '#/components/schemas/ExceptionResponse' - description: 权限不足 - summary: 修改用户启用状态(new added) - tags: - - User Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: User Management - /openapi/v1/apollo/audit/properties: - get: - deprecated: false - description: GET /openapi/v1/apollo/audit/properties - operationId: getAuditProperties - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功获取审计配置 - summary: 获取审计配置(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/apollo/audit/logs: - get: - deprecated: false - description: GET /openapi/v1/apollo/audit/logs - operationId: findAuditLogs - parameters: - - explode: true - in: query - name: page - required: false - schema: - default: 0 - type: integer - style: form - - explode: true - in: query - name: size - required: false - schema: - default: 10 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功获取审计日志 - summary: 查询审计日志(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/apollo/audit/logs/opName: - get: - deprecated: false - description: GET /openapi/v1/apollo/audit/logs/opName - operationId: findAuditLogsByOpName - parameters: - - explode: true - in: query - name: opName - required: true - schema: - type: string - style: form - - explode: true - in: query - name: page - required: false - schema: - default: 0 - type: integer - style: form - - explode: true - in: query - name: size - required: false - schema: - default: 10 - type: integer - style: form - - explode: true - in: query - name: startDate - required: false - schema: - type: string - style: form - - explode: true - in: query - name: endDate - required: false - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功获取审计日志 - summary: 按操作名查询审计日志(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/apollo/audit/trace: - get: - deprecated: false - description: GET /openapi/v1/apollo/audit/trace - operationId: findAuditTraceDetails - parameters: - - explode: true - in: query - name: traceId - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功获取审计链路详情 - summary: 查询审计链路详情(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/apollo/audit/logs/dataInfluences/field: - get: - deprecated: false - description: GET /openapi/v1/apollo/audit/logs/dataInfluences/field - operationId: findAuditDataInfluencesByField - parameters: - - explode: true - in: query - name: entityName - required: true - schema: - type: string - style: form - - explode: true - in: query - name: entityId - required: true - schema: - type: string - style: form - - explode: true - in: query - name: fieldName - required: true - schema: - type: string - style: form - - explode: true - in: query - name: page - required: false - schema: - default: 0 - type: integer - style: form - - explode: true - in: query - name: size - required: false - schema: - default: 10 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功获取审计数据影响 - summary: 查询审计数据影响(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator: - get: - deprecated: false - description: GET /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator - operationId: searchAuditLogs - parameters: - - explode: true - in: query - name: query - required: true - schema: - type: string - style: form - - explode: true - in: query - name: page - required: false - schema: - default: 0 - type: integer - style: form - - explode: true - in: query - name: size - required: false - schema: - default: 10 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功搜索审计日志 - summary: 搜索审计日志(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits" - operationId: findCommits - parameters: - - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - explode: true - in: query - name: key - required: false - schema: - type: string - style: form - - explode: true - in: query - name: page - required: false - schema: - default: 0 - type: integer - style: form - - explode: true - in: query - name: size - required: false - schema: - default: 10 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功获取提交记录 - summary: 查询命名空间提交记录(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/page-settings: - get: - deprecated: false - description: GET /openapi/v1/page-settings - operationId: getPageSettings - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功获取页面配置 - summary: 获取Portal页面配置(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/consumers: - get: - deprecated: false - description: GET /openapi/v1/consumers - operationId: getConsumerList - parameters: - - explode: true - in: query - name: page - required: false - schema: - default: 0 - type: integer - style: form - - explode: true - in: query - name: size - required: false - schema: - default: 10 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功获取消费者列表 - summary: 查询开放平台消费者列表(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - post: - deprecated: false - description: POST /openapi/v1/consumers - operationId: createConsumer - parameters: - - explode: true - in: query - name: expires - required: false - schema: - description: yyyyMMddHHmmss - type: string - style: form - requestBody: - content: - application/json: - schema: - type: object - required: true - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功创建消费者 - summary: 创建开放平台消费者(new added) - tags: - - Portal Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/consumer-tokens/by-appId: - get: - deprecated: false - description: GET /openapi/v1/consumer-tokens/by-appId - operationId: getConsumerTokenByAppId - parameters: - - explode: true - in: query - name: appId - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功获取消费者Token - summary: 按应用ID查询消费者Token(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/consumers/{token}/assign-role: - post: - deprecated: false - description: "POST /openapi/v1/consumers/{token}/assign-role" - operationId: assignRoleToConsumer - parameters: - - explode: false - in: path - name: token - required: true - schema: - type: string - style: simple - - explode: true - in: query - name: type - required: true - schema: - type: string - style: form - - explode: true - in: query - name: envs - required: false - schema: - type: string - style: form - requestBody: - content: - application/json: - schema: - type: object - required: true - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功授权 - summary: 给消费者授权(new added) - tags: - - Portal Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/consumers/by-appId: - delete: - deprecated: false - description: DELETE /openapi/v1/consumers/by-appId - operationId: deleteConsumer - parameters: - - explode: true - in: query - name: appId - required: true - schema: - type: string - style: form - responses: - "200": - description: 成功删除消费者 - summary: 按应用ID删除消费者(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/import: - post: - deprecated: false - description: POST /openapi/v1/import - operationId: importConfig - parameters: - - explode: true - in: query - name: envs - required: true - schema: - type: string - style: form - - explode: true - in: query - name: conflictAction - required: false - schema: - default: ignore - type: string - style: form - requestBody: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/importConfig_request' - required: true - responses: - "200": - description: 导入成功 - summary: 导入配置兼容入口(new added) - tags: - - Portal Management - x-content-type: multipart/form-data - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/favorites: - get: - deprecated: false - description: GET /openapi/v1/favorites - operationId: findFavorites - parameters: - - explode: true - in: query - name: userId - required: false - schema: - type: string - style: form - - explode: true - in: query - name: appId - required: false - schema: - type: string - style: form - - explode: true - in: query - name: page - required: false - schema: - default: 0 - type: integer - style: form - - explode: true - in: query - name: size - required: false - schema: - default: 10 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功获取收藏 - summary: 查询收藏(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - post: - deprecated: false - description: POST /openapi/v1/favorites - operationId: addFavorite - requestBody: - content: - application/json: - schema: - type: object - required: true - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功添加收藏 - summary: 添加收藏(new added) - tags: - - Portal Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/favorites/{favoriteId}: - delete: - deprecated: false - description: "DELETE /openapi/v1/favorites/{favoriteId}" - operationId: deleteFavorite - parameters: - - explode: false - in: path - name: favoriteId - required: true - schema: - format: int64 - type: integer - style: simple - responses: - "200": - description: 成功删除收藏 - summary: 删除收藏(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - put: - deprecated: false - description: "PUT /openapi/v1/favorites/{favoriteId}" - operationId: topFavorite - parameters: - - explode: false - in: path - name: favoriteId - required: true - schema: - format: int64 - type: integer - style: simple - responses: - "200": - description: 成功置顶收藏 - summary: 收藏置顶(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/global-search/item-info/by-key-or-value: - get: - deprecated: false - description: GET /openapi/v1/global-search/item-info/by-key-or-value - operationId: searchItemInfoByKeyOrValue - parameters: - - explode: true - in: query - name: key - required: false - schema: - default: "" - type: string - style: form - - explode: true - in: query - name: value - required: false - schema: - default: "" - type: string - style: form - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功搜索配置 - summary: 按Key或Value全局搜索配置(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories" - operationId: findReleaseHistoriesByNamespace - parameters: - - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - - explode: true - in: query - name: page - required: false - schema: - default: 0 - type: integer - style: form - - explode: true - in: query - name: size - required: false - schema: - default: 10 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功获取发布历史 - summary: 查询命名空间发布历史(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/server/portal-db/config: - delete: - deprecated: false - description: DELETE /openapi/v1/server/portal-db/config - operationId: deletePortalDBConfig - parameters: - - explode: true - in: query - name: key - required: true - schema: - type: string - style: form - responses: - "200": - description: 成功删除配置 - summary: 删除Portal DB配置(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - post: - deprecated: false - description: POST /openapi/v1/server/portal-db/config - operationId: createOrUpdatePortalDBConfig - requestBody: - content: - application/json: - schema: - type: object - required: true - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功创建或更新配置 - summary: 创建或更新Portal DB配置(new added) - tags: - - Portal Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/server/envs/{env}/config-db/config: - delete: - deprecated: false - description: "DELETE /openapi/v1/server/envs/{env}/config-db/config" - operationId: deleteConfigDBConfig - parameters: - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - explode: true - in: query - name: key - required: true - schema: - type: string - style: form - - explode: true - in: query - name: cluster - required: true - schema: - type: string - style: form - responses: - "200": - description: 成功删除配置 - summary: 删除Config DB配置(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - post: - deprecated: false - description: "POST /openapi/v1/server/envs/{env}/config-db/config" - operationId: createOrUpdateConfigDBConfig - parameters: - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - requestBody: - content: - application/json: - schema: - type: object - required: true - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功创建或更新配置 - summary: 创建或更新Config DB配置(new added) - tags: - - Portal Management - x-content-type: application/json - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/server/portal-db/config/find-all-config: - get: - deprecated: false - description: GET /openapi/v1/server/portal-db/config/find-all-config - operationId: findAllPortalDBConfig - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功获取配置列表 - summary: 查询全部Portal DB配置(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/server/envs/{env}/config-db/config/find-all-config: - get: - deprecated: false - description: "GET /openapi/v1/server/envs/{env}/config-db/config/find-all-config" - operationId: findAllConfigDBConfig - parameters: - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/json: - schema: - items: - type: object - type: array - description: 成功获取配置列表 - summary: 查询指定环境全部Config DB配置(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/system-info: - get: - deprecated: false - description: GET /openapi/v1/system-info - operationId: getSystemInfo - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功获取系统信息 - summary: 获取系统信息(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/system-info/health: - get: - deprecated: false - description: GET /openapi/v1/system-info/health - operationId: checkSystemHealth - parameters: - - explode: true - in: query - name: instanceId - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功获取健康状态 - summary: 检查系统实例健康状态(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/configs/export: - get: - deprecated: false - description: GET /openapi/v1/configs/export - operationId: exportAllConfigs - parameters: - - explode: true - in: query - name: envs - required: true - schema: - type: string - style: form - responses: - "200": - content: - application/octet-stream: - schema: - format: binary - type: string - description: 成功导出配置 - summary: 导出所有配置(new added) - tags: - - Portal Management - x-accepts: application/octet-stream - x-tags: - - tag: Portal Management - /openapi/v1/configs/import: - post: - deprecated: false - description: POST /openapi/v1/configs/import - operationId: importAllConfigs - parameters: - - explode: true - in: query - name: envs - required: true - schema: - type: string - style: form - - explode: true - in: query - name: conflictAction - required: false - schema: - default: ignore - type: string - style: form - requestBody: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/importConfig_request' - required: true - responses: - "200": - description: 导入成功 - summary: 导入所有配置(new added) - tags: - - Portal Management - x-content-type: multipart/form-data - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export" - operationId: exportAppConfig - parameters: - - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/octet-stream: - schema: - format: binary - type: string - description: 成功导出应用配置 - summary: 导出应用配置(new added) - tags: - - Portal Management - x-accepts: application/octet-stream - x-tags: - - tag: Portal Management - head: - deprecated: false - description: "HEAD /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export" - operationId: checkExportAppConfig - parameters: - - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - responses: - "200": - description: 可导出 - summary: 检查应用配置导出权限(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import: - post: - deprecated: false - description: "POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import" - operationId: importAppConfig - parameters: - - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - explode: true - in: query - name: conflictAction - required: false - schema: - default: ignore - type: string - style: form - requestBody: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/importConfig_request' - required: true - responses: - "200": - description: 导入成功 - summary: 导入应用配置(new added) - tags: - - Portal Management - x-content-type: multipart/form-data - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export: - get: - deprecated: false - description: "GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export" - operationId: exportNamespaceItems - parameters: - - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - responses: - "200": - content: - application/octet-stream: - schema: - format: binary - type: string - description: 成功导出命名空间配置项 - summary: 导出命名空间配置项(new added) - tags: - - Portal Management - x-accepts: application/octet-stream - x-tags: - - tag: Portal Management - /openapi/v1/apps/search/by-appid-or-name: - get: - deprecated: false - description: GET /openapi/v1/apps/search/by-appid-or-name - operationId: searchAppsByAppIdOrName - parameters: - - explode: true - in: query - name: query - required: false - schema: - type: string - style: form - - explode: true - in: query - name: page - required: false - schema: - default: 0 - type: integer - style: form - - explode: true - in: query - name: size - required: false - schema: - default: 20 - type: integer - style: form - responses: - "200": - content: - application/json: - schema: - type: object - description: 成功搜索应用 - summary: 按应用ID或名称搜索应用(new added) - tags: - - Portal Management - x-accepts: application/json - x-tags: - - tag: Portal Management - /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import: - post: - deprecated: false - description: "POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import" - operationId: importNamespaceItems - parameters: - - explode: false - in: path - name: appId - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: env - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: clusterName - required: true - schema: - type: string - style: simple - - explode: false - in: path - name: namespaceName - required: true - schema: - type: string - style: simple - requestBody: - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/importConfig_request' - required: true - responses: - "200": - description: 导入成功 - summary: 导入命名空间配置项(new added) - tags: - - Portal Management - x-content-type: multipart/form-data - x-accepts: application/json - x-tags: - - tag: Portal Management -components: - schemas: - OpenAppDTO: - description: Apollo应用信息数据传输对象,包含应用的基本信息和元数据 - example: - dataChangeCreatedTime: 2025-09-29T12:34:56Z - orgName: orgName - dataChangeCreatedBy: dataChangeCreatedBy - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - orgId: orgId - ownerEmail: ownerEmail - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - ownerName: ownerName - ownerDisplayName: ownerDisplayName - appId: appId - name: name - properties: - dataChangeCreatedBy: - description: 数据创建者用户名,记录是谁创建了这个应用 - type: string - dataChangeCreatedByDisplayName: - description: 数据创建者显示名称,用于展示创建者的友好名称 - type: string - dataChangeLastModifiedBy: - description: 数据最后修改者用户名,记录最后一次修改应用信息的用户 - type: string - dataChangeLastModifiedByDisplayName: - description: 数据最后修改者显示名称,用于展示最后修改者的友好名称 - type: string - dataChangeCreatedTime: - description: 数据创建时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - dataChangeLastModifiedTime: - description: 数据最后修改时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - name: - description: 应用名称,用于显示的友好名称 - type: string - appId: - description: 应用唯一标识符,全局唯一的应用ID - type: string - orgId: - description: 组织ID,应用所属组织的唯一标识 - type: string - orgName: - description: 组织名称,应用所属组织的显示名称 - type: string - ownerName: - description: 应用负责人姓名,应用的主要负责人 - type: string - ownerEmail: - description: 应用负责人邮箱地址,用于接收应用相关通知 - type: string - ownerDisplayName: - type: string - type: object - OpenCreateAppDTO: - description: 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 - example: - app: - dataChangeCreatedTime: 2025-09-29T12:34:56Z - orgName: orgName - dataChangeCreatedBy: dataChangeCreatedBy - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - orgId: orgId - ownerEmail: ownerEmail - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - ownerName: ownerName - ownerDisplayName: ownerDisplayName - appId: appId - name: name - assignAppRoleToSelf: true - admins: - - admins - - admins - properties: - assignAppRoleToSelf: - description: 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 - type: boolean - admins: - description: 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 - items: - type: string - type: array - uniqueItems: true - app: - $ref: '#/components/schemas/OpenAppDTO' - type: object - OpenItemDTO: - description: Apollo配置项核心数据对象,仅包含键值及基础审计信息 - example: - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - properties: - key: - description: 配置项的键名,在同一命名空间内唯一标识一个配置项 - type: string - value: - description: 配置项的值,可以是字符串、数字、JSON等格式 - type: string - type: - description: 配置项类型 - type: integer - comment: - description: 配置项的注释说明,用于描述配置项的用途和含义 - type: string - lineNum: - description: 配置项在命名空间中的行号,用于保持和旧版 Portal 配置项列表一致的默认展示顺序 - format: int32 - type: integer - extendInfo: - $ref: '#/components/schemas/OpenItemExtendDTO' - dataChangeCreatedBy: - description: 配置项创建者用户名,记录是谁创建了这个配置项 - type: string - dataChangeCreatedByDisplayName: - description: 配置项创建者显示名称,用于展示创建者的友好名称 - type: string - dataChangeLastModifiedBy: - description: 配置项最后修改者用户名,记录最后一次修改配置的用户 - type: string - dataChangeLastModifiedByDisplayName: - description: 配置项最后修改者显示名称,用于展示最后修改者的友好名称 - type: string - dataChangeCreatedTime: - description: 配置项创建时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - dataChangeLastModifiedTime: - description: 配置项最后修改时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - type: object - OpenItemExtendDTO: - description: Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 - example: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - properties: - namespaceId: - description: 所属命名空间的ID - format: int64 - type: integer - isModified: - description: 是否有未发布的修改 - type: boolean - isDeleted: - description: 是否被标记为删除(未发布) - type: boolean - isNewlyAdded: - description: 是否为新添加的配置项(未发布) - type: boolean - newValue: - description: 新的值 - type: string - oldValue: - description: 上一次发布的值,用于对比变更 - type: string - type: object - OpenItemPageDTO: - description: 分页配置项数据传输对象,用于返回分页查询的配置项列表结果 - example: - total: 1 - size: 6 - page: 0 - content: - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - properties: - page: - description: 当前页码,从0开始计数 - type: integer - size: - description: 每页显示的记录数量 - type: integer - total: - description: 总记录数,符合查询条件的配置项总数量 - format: int64 - type: integer - content: - description: 当前页的配置项列表,包含具体的配置项数据 - items: - $ref: '#/components/schemas/OpenItemDTO' - type: array - type: object - OpenClusterDTO: - description: Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 - example: - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - name: name - parentClusterId: 1 - comment: comment - id: 6 - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - properties: - dataChangeCreatedBy: - description: 集群创建者用户名,记录是谁创建了这个集群 - type: string - dataChangeCreatedByDisplayName: - description: 集群创建者显示名称,用于展示创建者的友好名称 - type: string - dataChangeLastModifiedBy: - description: 集群最后修改者用户名,记录最后一次修改集群信息的用户 - type: string - dataChangeLastModifiedByDisplayName: - description: 集群最后修改者显示名称,用于展示最后修改者的友好名称 - type: string - dataChangeCreatedTime: - description: 集群创建时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - dataChangeLastModifiedTime: - description: 集群最后修改时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - name: - description: 集群名称,在同一应用和环境下唯一标识一个集群 - type: string - appId: - description: 所属应用的唯一标识符 - type: string - id: - description: 集群的唯一标识符 - format: int64 - type: integer - parentClusterId: - description: 父集群的ID - format: int64 - type: integer - comment: - description: 集群的备注说明 - type: string - type: object - MapString: - additionalProperties: - type: string - type: object - OpenReleaseDTO: - description: Apollo发布信息数据传输对象,表示一次配置发布的完整信息 - example: - dataChangeCreatedTime: 2025-09-29T12:34:56Z - configurations: - key: configurations - dataChangeCreatedBy: dataChangeCreatedBy - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - namespaceName: namespaceName - properties: - dataChangeCreatedBy: - description: 发布创建者用户名,记录是谁创建了这次发布 - type: string - dataChangeCreatedByDisplayName: - description: 发布创建者显示名称,用于展示创建者的友好名称 - type: string - dataChangeLastModifiedBy: - description: 发布最后修改者用户名,记录最后一次修改发布信息的用户 - type: string - dataChangeLastModifiedByDisplayName: - description: 发布最后修改者显示名称,用于展示最后修改者的友好名称 - type: string - dataChangeCreatedTime: - description: 发布创建时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - dataChangeLastModifiedTime: - description: 发布最后修改时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - id: - description: 发布记录的唯一标识符,系统自动生成 - format: int64 - type: integer - appId: - description: 所属应用的唯一标识符 - type: string - clusterName: - description: 所属集群的名称 - type: string - namespaceName: - description: 所属命名空间的名称 - type: string - name: - description: 发布名称,用于标识这次发布的版本或描述 - type: string - configurations: - additionalProperties: - type: string - type: object - comment: - description: 发布备注,描述本次发布的变更内容和目的 - type: string - type: object - NamespaceReleaseDTO: - description: 命名空间发布请求数据传输对象,用于创建新的配置发布 - example: - releaseComment: releaseComment - releasedBy: releasedBy - releaseTitle: releaseTitle - isEmergencyPublish: true - properties: - releaseTitle: - description: 发布标题,用于标识这次发布的名称或版本号 - type: string - releaseComment: - description: 发布备注,详细描述本次发布的变更内容和目的 - type: string - releasedBy: - description: 发布操作者用户名,记录是谁执行了这次发布操作 - type: string - isEmergencyPublish: - description: 是否为紧急发布,紧急发布可能会跳过某些审核流程 - type: boolean - type: object - NamespaceGrayDelReleaseDTO: - description: 命名空间灰度删除发布请求数据传输对象,用于创建删除特定配置项的灰度发布 - example: - releaseComment: releaseComment - releasedBy: releasedBy - grayDelKeys: - - grayDelKeys - - grayDelKeys - releaseTitle: releaseTitle - isEmergencyPublish: true - properties: - releaseTitle: - description: 发布标题,用于标识这次灰度删除发布的名称或版本号 - type: string - releaseComment: - description: 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 - type: string - releasedBy: - description: 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 - type: string - isEmergencyPublish: - description: 是否为紧急发布,紧急发布可能会跳过某些审核流程 - type: boolean - grayDelKeys: - description: 需要在灰度发布中删除的配置项键名列表 - items: - type: string - type: array - type: object - OpenAppNamespaceDTO: - description: Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 - example: - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - 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 - properties: - dataChangeCreatedBy: - description: 命名空间创建者用户名,记录是谁创建了这个应用命名空间 - type: string - dataChangeCreatedByDisplayName: - description: 命名空间创建者显示名称,用于展示创建者的友好名称 - type: string - dataChangeLastModifiedBy: - description: 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 - type: string - dataChangeLastModifiedByDisplayName: - description: 命名空间最后修改者显示名称,用于展示最后修改者的友好名称 - type: string - dataChangeCreatedTime: - description: 命名空间创建时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - dataChangeLastModifiedTime: - description: 命名空间最后修改时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - name: - description: 命名空间名称,在同一应用内唯一标识一个命名空间 - type: string - appId: - description: 所属应用的唯一标识符 - type: string - format: - description: 命名空间格式类型,如properties、xml、json、yml等 - type: string - isPublic: - description: 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - type: boolean - appendNamespacePrefix: - default: true - description: 对于公共命名空间,是否在命名空间名称前添加前缀 - type: boolean - comment: - description: 命名空间备注说明,描述命名空间的用途和包含的配置类型 - type: string - type: object - OpenNamespaceUsageDTO: - description: 命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 - example: - branchInstanceCount: 6 - envName: envName - instanceCount: 0 - appId: appId - clusterName: clusterName - linkedNamespaceCount: 1 - namespaceName: namespaceName - properties: - namespaceName: - description: 命名空间名称 - type: string - appId: - description: 所属应用的唯一标识符 - type: string - clusterName: - description: 所属集群名称 - type: string - envName: - description: 环境名称 - type: string - instanceCount: - description: 该命名空间关联的实例数量 - type: integer - branchInstanceCount: - description: 分支命名空间关联的实例数量 - type: integer - linkedNamespaceCount: - description: 关联到该公共命名空间的命名空间数量 - type: integer - type: object - OpenGrayReleaseRuleItemDTO: - description: Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 - example: - clientIpList: - - clientIpList - - clientIpList - clientLabelList: - - clientLabelList - - clientLabelList - clientAppId: clientAppId - properties: - clientAppId: - description: 客户端应用ID,指定哪个应用可以获取灰度配置 - type: string - clientIpList: - description: 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 - items: - type: string - type: array - uniqueItems: true - clientLabelList: - description: 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 - items: - type: string - type: array - uniqueItems: true - type: object - OpenGrayReleaseRuleDTO: - description: Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 - example: - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - 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 - properties: - dataChangeCreatedBy: - description: 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 - type: string - dataChangeCreatedByDisplayName: - description: 灰度规则创建者显示名称,用于展示创建者的友好名称 - type: string - dataChangeLastModifiedBy: - description: 灰度规则最后修改者用户名,记录最后一次修改规则的用户 - type: string - dataChangeLastModifiedByDisplayName: - description: 灰度规则最后修改者显示名称,用于展示最后修改者的友好名称 - type: string - dataChangeCreatedTime: - description: 灰度规则创建时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - dataChangeLastModifiedTime: - description: 灰度规则最后修改时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - appId: - description: 所属应用的唯一标识符 - type: string - clusterName: - description: 所属集群的名称 - type: string - namespaceName: - description: 所属命名空间的名称 - type: string - branchName: - description: 灰度分支名称,标识灰度发布的分支 - type: string - ruleItems: - description: 灰度发布规则项列表,包含具体的灰度规则条件 - items: - $ref: '#/components/schemas/OpenGrayReleaseRuleItemDTO' - type: array - uniqueItems: true - type: object - OpenCreateNamespaceDTO: - description: Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - example: - appNamespaceName: appNamespaceName - appId: appId - clusterName: clusterName - env: env - properties: - appId: - description: 所属应用的唯一标识符 - type: string - env: - description: 所在那个环境创建 - type: string - clusterName: - description: 所属集群的名称 - type: string - appNamespaceName: - description: 根据已创建的appnamespace来实例化namespace - type: string - type: object - OpenNamespaceDTO: - description: Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - example: - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeCreatedBy: dataChangeCreatedBy - format: format - extendInfo: - parentAppId: parentAppId - isConfigHidden: true - itemModifiedCnt: 0 - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - isPublic: true - comment: comment - items: - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - namespaceName: namespaceName - properties: - dataChangeCreatedBy: - description: 命名空间创建者用户名,记录是谁创建了这个命名空间 - type: string - dataChangeCreatedByDisplayName: - description: 命名空间创建者显示名称,用于展示创建者的友好名称 - type: string - dataChangeLastModifiedBy: - description: 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 - type: string - dataChangeLastModifiedByDisplayName: - description: 命名空间最后修改者显示名称,用于展示最后修改者的友好名称 - type: string - dataChangeCreatedTime: - description: 命名空间创建时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - dataChangeLastModifiedTime: - description: 命名空间最后修改时间,ISO 8601格式的时间戳 - example: 2025-09-29T12:34:56Z - type: string - appId: - description: 所属应用的唯一标识符 - type: string - clusterName: - description: 所属集群的名称 - type: string - namespaceName: - description: 命名空间名称,在同一应用和集群下唯一标识一个命名空间 - type: string - comment: - description: 命名空间备注说明,描述命名空间的用途 - type: string - format: - description: 命名空间格式类型,如properties、xml、json、yml等 - type: string - isPublic: - description: 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - type: boolean - items: - description: 命名空间包含的配置项列表 - items: - $ref: '#/components/schemas/OpenItemDTO' - type: array - extendInfo: - $ref: '#/components/schemas/OpenNamespaceExtendDTO' - type: object - OpenNamespaceExtendDTO: - example: - parentAppId: parentAppId - isConfigHidden: true - itemModifiedCnt: 0 - properties: - isConfigHidden: - description: 当当前用户无权限查看配置时置为 true - type: boolean - parentAppId: - description: 公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转 - type: string - itemModifiedCnt: - description: 未发布变更数 - type: integer - type: object - OpenNamespaceLockDTO: - description: Apollo命名空间锁状态数据传输对象 - example: - lockedBy: lockedBy - isLocked: true - namespaceName: namespaceName - isEmergencyPublishAllowed: true - properties: - namespaceName: - description: 命名空间名称 - type: string - isLocked: - description: 是否被锁定 - type: boolean - lockedBy: - description: 锁定者用户名 - type: string - isEmergencyPublishAllowed: - description: 是否允许紧急发布 - type: boolean - type: object - OpenInstancePageDTO: - description: 分页实例数据传输对象,用于返回分页查询的实例列表结果 - example: - total: 1 - size: 6 - instances: - - configs: - - releaseDeliveryTime: 2025-09-29T12:34:56Z - release: - dataChangeCreatedTime: 2025-09-29T12:34:56Z - configurations: - key: configurations - dataChangeCreatedBy: dataChangeCreatedBy - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - namespaceName: namespaceName - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - - releaseDeliveryTime: 2025-09-29T12:34:56Z - release: - dataChangeCreatedTime: 2025-09-29T12:34:56Z - configurations: - key: configurations - dataChangeCreatedBy: dataChangeCreatedBy - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - 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 - configurations: - key: configurations - dataChangeCreatedBy: dataChangeCreatedBy - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - namespaceName: namespaceName - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - - releaseDeliveryTime: 2025-09-29T12:34:56Z - release: - dataChangeCreatedTime: 2025-09-29T12:34:56Z - configurations: - key: configurations - dataChangeCreatedBy: dataChangeCreatedBy - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - namespaceName: namespaceName - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataCenter: dataCenter - appId: appId - clusterName: clusterName - ip: ip - id: 5 - page: 0 - properties: - page: - description: 当前页码,从0开始计数 - type: integer - size: - description: 每页显示的记录数量 - type: integer - total: - description: 总记录数,符合查询条件的实例总数量 - format: int64 - type: integer - instances: - description: 当前页的实例列表,包含具体的实例数据 - items: - $ref: '#/components/schemas/OpenInstanceDTO' - type: array - type: object - OpenEnvClusterDTO: - example: - env: env - clusters: - - clusters - - clusters - properties: - env: - description: 环境标识,例如 DEV、FAT、UAT、PROD - type: string - clusters: - description: 该环境下的集群名称列表 - items: - type: string - type: array - type: object - OpenEnvClusterInfo: - example: - code: 0 - message: message - env: env - clusters: - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - name: name - parentClusterId: 1 - comment: comment - id: 6 - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - name: name - parentClusterId: 1 - comment: comment - id: 6 - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - properties: - code: - description: 查询状态码 - type: integer - message: - description: 相关信息 - type: string - env: - description: 环境标识 - type: string - clusters: - description: 集群信息列表 - items: - $ref: '#/components/schemas/OpenClusterDTO' - type: array - type: object - OpenMissEnvDTO: - example: - code: 0 - message: message - properties: - code: - description: 查询状态码 - type: integer - message: - type: string - type: object - OpenNamespaceTextModel: - example: - configText: configText - namespaceId: 0 - appId: appId - clusterName: clusterName - format: format - env: env - namespaceName: namespaceName - operator: operator - properties: - appId: - description: 应用唯一标识 - type: string - env: - description: 环境标识 - type: string - clusterName: - description: 集群名称 - type: string - namespaceName: - description: 命名空间名称 - type: string - namespaceId: - description: 命名空间ID - format: int64 - type: integer - format: - description: 命名空间格式类型(properties/xml/json/yml等) - type: string - configText: - description: 配置内容的原始文本 - type: string - operator: - description: 操作者用户名 - type: string - type: object - OpenNamespaceIdentifier: - example: - appId: appId - clusterName: clusterName - env: env - namespaceName: namespaceName - properties: - appId: - description: 应用唯一标识 - type: string - env: - description: 环境标识 - type: string - clusterName: - description: 集群名称 - type: string - namespaceName: - description: 命名空间名称 - type: string - type: object - OpenItemDiffDTO: - example: - code: 0 - namespace: - appId: appId - clusterName: clusterName - env: env - namespaceName: namespaceName - deleteItems: - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - createItems: - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - message: message - updateItems: - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - properties: - code: - description: 查找结果 - type: integer - message: - description: 查找结果信息 - type: string - namespace: - $ref: '#/components/schemas/OpenNamespaceIdentifier' - createItems: - items: - $ref: '#/components/schemas/OpenItemDTO' - type: array - deleteItems: - items: - $ref: '#/components/schemas/OpenItemDTO' - type: array - updateItems: - items: - $ref: '#/components/schemas/OpenItemDTO' - type: array - type: object - OpenNamespaceSyncDTO: - example: - syncItems: - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedBy: dataChangeLastModifiedBy - dataChangeCreatedBy: dataChangeCreatedBy - lineNum: 6 - comment: comment - type: 0 - extendInfo: - newValue: newValue - isModified: true - isDeleted: true - namespaceId: 1 - oldValue: oldValue - isNewlyAdded: true - value: value - key: key - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - syncToNamespaces: - - appId: appId - clusterName: clusterName - env: env - namespaceName: namespaceName - - appId: appId - clusterName: clusterName - env: env - namespaceName: namespaceName - properties: - syncToNamespaces: - description: 目标命名空间标识列表 - items: - $ref: '#/components/schemas/OpenNamespaceIdentifier' - type: array - syncItems: - description: 需要修改的配置项列表 - items: - $ref: '#/components/schemas/OpenItemDTO' - type: array - type: object - OpenInstanceConfigDTO: - example: - releaseDeliveryTime: 2025-09-29T12:34:56Z - release: - dataChangeCreatedTime: 2025-09-29T12:34:56Z - configurations: - key: configurations - dataChangeCreatedBy: dataChangeCreatedBy - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - namespaceName: namespaceName - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - properties: - release: - $ref: '#/components/schemas/OpenReleaseDTO' - releaseDeliveryTime: - description: 配置下发时间(ISO 8601) - example: 2025-09-29T12:34:56Z - type: string - dataChangeLastModifiedTime: - description: 最后修改时间(ISO 8601) - example: 2025-09-29T12:34:56Z - type: string - type: object - OpenInstanceDTO: - example: - configs: - - releaseDeliveryTime: 2025-09-29T12:34:56Z - release: - dataChangeCreatedTime: 2025-09-29T12:34:56Z - configurations: - key: configurations - dataChangeCreatedBy: dataChangeCreatedBy - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - namespaceName: namespaceName - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - - releaseDeliveryTime: 2025-09-29T12:34:56Z - release: - dataChangeCreatedTime: 2025-09-29T12:34:56Z - configurations: - key: configurations - dataChangeCreatedBy: dataChangeCreatedBy - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - clusterName: clusterName - name: name - comment: comment - id: 0 - namespaceName: namespaceName - dataChangeLastModifiedTime: 2025-09-29T12:34:56Z - dataChangeCreatedTime: 2025-09-29T12:34:56Z - dataCenter: dataCenter - appId: appId - clusterName: clusterName - ip: ip - id: 5 - properties: - id: - description: 实例ID - format: int64 - type: integer - appId: - description: 实例所属应用ID - type: string - clusterName: - description: 实例所属集群名称 - type: string - dataCenter: - description: 数据中心/机房标识 - type: string - ip: - description: 实例IP地址 - type: string - configs: - description: 实例当前生效的配置列表 - items: - $ref: '#/components/schemas/OpenInstanceConfigDTO' - type: array - dataChangeCreatedTime: - description: 数据创建时间(ISO 8601) - example: 2025-09-29T12:34:56Z - type: string - type: object - OpenOrganizationDto: - example: - orgName: orgName - orgId: orgId - properties: - orgId: - description: 组织ID - type: string - orgName: - description: 组织名称 - type: string - type: object - ExceptionResponse: - example: - status: 404 - message: Resource not found - timestamp: 2025-09-29T12:34:56Z - exception: NotFoundException - properties: - status: - description: HTTP 状态码 - type: integer - message: - description: 错误信息 - type: string - timestamp: - description: 时间戳 - format: date-time - type: string - exception: - description: 错误类名 - type: string - type: object - OpenPermissionConditionDTO: - example: - hasPermission: true - properties: - hasPermission: - description: "" - type: boolean - type: object - OpenUserInfoDTO: - example: - name: name - userId: userId - email: email - enabled: 0 - properties: - userId: - description: "" - type: string - name: - description: "" - type: string - email: - description: "" - type: string - enabled: - description: "" - type: integer - type: object - OpenUserDTO: - example: - password: password - userDisplayName: userDisplayName - email: email - enabled: 0 - username: username - properties: - username: - description: 用户名 - type: string - userDisplayName: - description: 用户显示名 - type: string - password: - description: 用户密码 - type: string - email: - description: 用户邮箱 - type: string - enabled: - description: 是否启用,1 表示启用,0 表示禁用 - type: integer - type: object - OpenEnvNamespaceRoleUserDTO: - example: - releaseRoleUsers: - - name: name - userId: userId - email: email - enabled: 0 - - name: name - userId: userId - email: email - enabled: 0 - appId: appId - modifyRoleUsers: - - name: name - userId: userId - email: email - enabled: 0 - - name: name - userId: userId - email: email - enabled: 0 - env: env - namespaceName: namespaceName - properties: - appId: - description: "" - type: string - namespaceName: - description: "" - type: string - modifyRoleUsers: - description: "" - items: - $ref: '#/components/schemas/OpenUserInfoDTO' - type: array - releaseRoleUsers: - description: "" - items: - $ref: '#/components/schemas/OpenUserInfoDTO' - type: array - env: - description: "" - type: string - type: object - OpenClusterNamespaceRoleUserDTO: - example: - cluster: cluster - releaseRoleUsers: - - name: name - userId: userId - email: email - enabled: 0 - - name: name - userId: userId - email: email - enabled: 0 - appId: appId - modifyRoleUsers: - - name: name - userId: userId - email: email - enabled: 0 - - name: name - userId: userId - email: email - enabled: 0 - env: env - properties: - appId: - description: "" - type: string - env: - description: "" - type: string - cluster: - description: "" - type: string - modifyRoleUsers: - description: "" - items: - $ref: '#/components/schemas/OpenUserInfoDTO' - type: array - releaseRoleUsers: - description: "" - items: - $ref: '#/components/schemas/OpenUserInfoDTO' - type: array - type: object - OpenNamespaceRoleUserDTO: - example: - releaseRoleUsers: - - name: name - userId: userId - email: email - enabled: 0 - - name: name - userId: userId - email: email - enabled: 0 - appId: appId - modifyRoleUsers: - - name: name - userId: userId - email: email - enabled: 0 - - name: name - userId: userId - email: email - enabled: 0 - namespaceName: namespaceName - properties: - appId: - description: "" - type: string - namespaceName: - description: "" - type: string - modifyRoleUsers: - description: "" - items: - $ref: '#/components/schemas/OpenUserInfoDTO' - type: array - releaseRoleUsers: - description: "" - items: - $ref: '#/components/schemas/OpenUserInfoDTO' - type: array - type: object - OpenAppRoleUserDTO: - example: - appId: appId - masterUsers: - - name: name - userId: userId - email: email - enabled: 0 - - name: name - userId: userId - email: email - enabled: 0 - properties: - appId: - description: "" - type: string - masterUsers: - description: "" - items: - $ref: '#/components/schemas/OpenUserInfoDTO' - type: array - type: object - OpenReleaseDiffDTO: - example: - changes: - - newValue: newValue - changeType: changeType - oldValue: oldValue - key: key - - newValue: newValue - changeType: changeType - oldValue: oldValue - key: key - properties: - changes: - description: "A list of changes, ensuring order if necessary." - items: - $ref: '#/components/schemas/OpenReleaseChangeDTO' - type: array - type: object - OpenReleaseChangeDTO: - example: - newValue: newValue - changeType: changeType - oldValue: oldValue - key: key - properties: - changeType: - description: 修改类型 - type: string - key: - description: key - type: string - newValue: - description: new value - type: string - oldValue: - description: old value - type: string - type: object - OpenAccessKeyDTO: - example: - mode: 6 - dataChangeLastModifiedByDisplayName: dataChangeLastModifiedByDisplayName - dataChangeCreatedByDisplayName: dataChangeCreatedByDisplayName - dataChangeCreatedTime: dataChangeCreatedTime - dataChangeLastModifiedBy: dataChangeLastModifiedBy - appId: appId - dataChangeCreatedBy: dataChangeCreatedBy - id: 0 - secret: secret - dataChangeLastModifiedTime: dataChangeLastModifiedTime - enabled: true - 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 - secret: - description: "" - type: string - appId: - description: "" - type: string - mode: - description: "" - type: integer - enabled: - description: "" - type: boolean - type: object - StringToStringBoolMap: - additionalProperties: - additionalProperties: - type: boolean - type: object - example: - projectA: - featureX: true - featureY: false - projectB: - darkMode: true - type: object - importConfig_request: - properties: - file: - format: binary - type: string - type: object - securitySchemes: - ApiKeyAuth: - description: | - Apollo OpenAPI访问令牌 - **获取方式:** - 1. 登录Apollo Portal管理界面 - 2. 进入"管理员工具" -> "开放平台授权管理" - 3. 创建第三方应用,获取Token - **使用格式:** - ``` - Authorization: your_token_here - ``` - **权限说明:** - - Token具有对应应用的读写权限 - - 不同Token可能有不同的环境和命名空间权限 - - 建议为不同用途创建不同的Token - in: header - name: Authorization - type: apiKey diff --git a/spring-boot2/src/test/java/com/apollo/openapi/server/OpenApiGeneratorApplicationTests.java b/spring-boot2/src/test/java/com/apollo/openapi/server/OpenApiGeneratorApplicationTests.java deleted file mode 100644 index b268fc82..00000000 --- a/spring-boot2/src/test/java/com/apollo/openapi/server/OpenApiGeneratorApplicationTests.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.apollo.openapi.server; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -@SpringBootTest -class OpenApiGeneratorApplicationTests { - - @Test - void contextLoads() { - } - -} diff --git a/templates/python/api_client.handlebars b/templates/python/api_client.handlebars deleted file mode 100644 index eed75c94..00000000 --- a/templates/python/api_client.handlebars +++ /dev/null @@ -1,1509 +0,0 @@ -# coding: utf-8 -{{>partial_header}} - -from dataclasses import dataclass -from decimal import Decimal -import enum -import email -import json -import os -import io -import atexit -from multiprocessing.pool import ThreadPool -import re -import tempfile -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 - -{{#if tornado}} -import tornado.gen -{{/if}} -import frozendict - -from {{packageName}} import rest -from {{packageName}}.configuration import Configuration -from {{packageName}}.exceptions import ApiTypeError, ApiValueError -from {{packageName}}.schemas import ( - NoneClass, - BoolClass, - Schema, - FileIO, - BinarySchema, - date, - datetime, - none_type, - Unset, - unset, -) - - -class RequestField(RequestFieldBase): - def __eq__(self, other): - if not isinstance(other, RequestField): - return False - return self.__dict__ == other.__dict__ - - -class JSONEncoder(json.JSONEncoder): - compact_separators = (',', ':') - - 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 __iter__(self): - return self - - def __next__(self): - if self.first: - self.first = False - return self.prefix - return self.separator - - -class ParameterSerializerBase: - @classmethod - def _get_default_explode(cls, style: ParameterStyle) -> bool: - return False - - @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} - - @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 __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] - ) - - @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()] - ) - - @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 - """ - 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 _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 - ) - - -class StyleSimpleSerializer(ParameterSerializerBase): - - def _serialize_simple( - self, - 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 - ) - - -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);?.*") - - @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() - - @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 - ) - ) - - 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) - - -class PathParameter(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.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 __serialize_matrix( - 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 __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): - - 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 - ) - - 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 __serialize_pipe_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 __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) - - 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('', '|') - - 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)) - - -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 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 - ) - - @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 - - -@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 - - -@dataclass -class ApiResponse: - response: urllib3.HTTPResponse - body: typing.Union[Unset, Schema] = unset - headers: typing.Union[Unset, typing.Dict[str, Schema]] = unset - - 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 - - -@dataclass -class ApiResponseWithoutDeserialization(ApiResponse): - response: urllib3.HTTPResponse - body: typing.Union[Unset, typing.Type[Schema]] = unset - headers: typing.Union[Unset, typing.List[HeaderParameter]] = unset - - -class OpenApiResponse(JSONDetector): - __filename_content_disposition_pattern = re.compile('filename="(.+?)"') - - 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) - - 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: - 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 response.data - - @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() - } - - 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: - 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 - ) - - -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. - - 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. - """ - - _pool = None - - def __init__( - self, - 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 - ): - if configuration is None: - configuration = Configuration() - self.configuration = configuration - self.pool_threads = pool_threads - - 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 = '{{#if httpUserAgent}}{{{httpUserAgent}}}{{/if}}{{#unless httpUserAgent}}OpenAPI-Generator/{{{packageVersion}}}/python{{/unless}}' - - def __enter__(self): - return self - - def __exit__(self, exc_type, exc_value, traceback): - self.close() - - def close(self): - if self._pool: - self._pool.close() - self._pool.join() - self._pool = None - if hasattr(atexit, 'unregister'): - atexit.unregister(self.close) - - @property - def pool(self): - """Create thread pool on first request - avoids instantiating unused threadpool for blocking clients. - """ - 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'] - - @user_agent.setter - def user_agent(self, value): - self.default_headers['User-Agent'] = value - - def set_default_header(self, header_name, header_value): - self.default_headers[header_name] = header_value - - {{#if tornado}} - @tornado.gen.coroutine - {{/if}} - {{#if asyncio}}async {{/if}}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: - - # header parameters - used_headers = HTTPHeaderDict(self.default_headers) - if self.cookie: - headers['Cookie'] = self.cookie - - # auth setting - self.update_params_for_auth(used_headers, - auth_settings, resource_path, method, body) - - # must happen after cookie setting and auth setting in case user is overriding those - if headers: - used_headers.update(headers) - - # 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 = {{#if asyncio}}await {{/if}}{{#if tornado}}yield {{/if}}self.request( - method, - url, - headers=used_headers, - fields=fields, - body=body, - stream=stream, - timeout=timeout, - ) - return response - - 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, - 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 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 async_req: - return self.__call_api( - resource_path, - method, - headers, - body, - fields, - auth_settings, - stream, - timeout, - host, - ) - - return self.pool.apply_async( - self.__call_api, - ( - resource_path, - method, - headers, - body, - json, - fields, - auth_settings, - stream, - timeout, - host, - ) - ) - - 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( - "http method must be `GET`, `HEAD`, `OPTIONS`," - " `POST`, `PATCH`, `PUT` or `DELETE`." - ) - - def update_params_for_auth(self, headers, auth_settings, - resource_path, method, body): - """Updates header and query params based on authentication setting. - - :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(). - """ - if not auth_settings: - return - - 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']) -{{#if hasHttpSignatureMethods}} - else: - # The HTTP signature scheme requires multiple HTTP headers - # that are calculated dynamically. - signing_info = self.configuration.signing_info - queries = tuple() - auth_headers = signing_info.get_http_signature_headers( - resource_path, method, headers, body, queries) - for key, value in auth_headers.items(): - headers.add(key, value) -{{/if}} - 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`' - ) - - -class Api: - """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: typing.Optional[ApiClient] = None): - if api_client is None: - api_client = ApiClient() - self.api_client = api_client - - @staticmethod - def _verify_typed_dict_inputs_oapg(cls: typing.Type[typing_extensions.TypedDict], data: typing.Dict[str, typing.Any]): - """ - 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 - """ - 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 - ) - ) - - 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 - ) - ) - - 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: - 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]], ...] - - -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') - """ - 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. - - 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: - - 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 - - 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/tests/test_audit_display_name_fields.py b/tests/test_audit_display_name_fields.py index d24a6c1d..d2bf3837 100644 --- a/tests/test_audit_display_name_fields.py +++ b/tests/test_audit_display_name_fields.py @@ -21,8 +21,6 @@ SPEC_FILES = ( "apollo-openapi.yaml", - "java-client/api/openapi.yaml", - "spring-boot2/src/main/resources/openapi.yaml", ) diff --git a/tests/test_generation_workflow.py b/tests/test_generation_workflow.py new file mode 100644 index 00000000..adac245a --- /dev/null +++ b/tests/test_generation_workflow.py @@ -0,0 +1,48 @@ +import subprocess +import unittest +from pathlib import Path + + +GENERATED_PREFIXES = ( + "java-client/", + "python/", + "typescript/", + "rust/", + "spring-boot2/", + "templates/python/", +) + + +class GenerationWorkflowTest(unittest.TestCase): + + def setUp(self): + self.repo_root = Path(__file__).resolve().parents[1] + + def test_generated_source_trees_are_not_tracked(self): + tracked_files = subprocess.check_output( + ["git", "ls-files"], cwd=self.repo_root, text=True).splitlines() + + tracked_generated_files = [ + path for path in tracked_files + if path.startswith(GENERATED_PREFIXES) + ] + + self.assertEqual([], tracked_generated_files) + + def test_generate_script_uses_ignored_portal_generation_output(self): + generate_script = (self.repo_root / "generate.sh").read_text(encoding="utf-8") + clean_script = (self.repo_root / "clean.sh").read_text(encoding="utf-8") + gitignore = (self.repo_root / ".gitignore").read_text(encoding="utf-8") + + self.assertIn("OPENAPI_GENERATOR_VERSION=\"7.20.0\"", generate_script) + self.assertIn("GENERATED_ROOT=\"build/generated\"", generate_script) + self.assertIn("PORTAL_OUTPUT_DIR=\"$GENERATED_ROOT/portal\"", generate_script) + self.assertIn("--verify", generate_script) + self.assertIn("build/generated/", clean_script) + self.assertIn("build/generated/", gitignore) + self.assertNotIn("java-client", clean_script) + self.assertNotIn("typescript", clean_script) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_user_management_contract.py b/tests/test_user_management_contract.py index e6011887..4cd45a39 100644 --- a/tests/test_user_management_contract.py +++ b/tests/test_user_management_contract.py @@ -6,8 +6,6 @@ SPEC_FILES = ( "apollo-openapi.yaml", - "java-client/api/openapi.yaml", - "spring-boot2/src/main/resources/openapi.yaml", ) @@ -94,36 +92,6 @@ def test_portal_consumer_management_keeps_internal_object_contract(self): self.assertNotIn("OpenConsumerSummaryDTO", schemas) self.assertNotIn("OpenConsumerTokenDTO", schemas) - def test_spring_server_api_uses_user_management_name(self): - api_dir = self.repo_root / "spring-boot2/src/main/java/com/apollo/openapi/server/api" - - self.assertTrue((api_dir / "UserManagementApi.java").exists()) - self.assertFalse((api_dir / "PortalUserManagementApi.java").exists()) - - def test_java_client_preserves_optional_operator_overloads(self): - api_file = self.repo_root / ( - "java-client/src/main/java/org/openapitools/client/api/UserManagementApi.java") - content = api_file.read_text(encoding="utf-8") - - self.assertIn("changeUserEnabled(OpenUserDTO openUserDTO) throws ApiException", content) - self.assertIn( - "createOrUpdateUser(OpenUserDTO openUserDTO, Boolean isCreate) throws ApiException", - content) - - def test_portal_consumer_models_are_not_generated(self): - model_dir = self.repo_root / "java-client/src/main/java/org/openapitools/client/model" - spring_model_dir = self.repo_root / ( - "spring-boot2/src/main/java/com/apollo/openapi/server/model") - for model_name in ( - "OpenConsumerCreateRequestDTO", - "OpenConsumerInfoDTO", - "OpenConsumerSummaryDTO", - "OpenConsumerTokenDTO", - ): - with self.subTest(model=model_name): - self.assertFalse((model_dir / f"{model_name}.java").exists()) - self.assertFalse((spring_model_dir / f"{model_name}.java").exists()) - def _find_parameter(self, operation, name): for parameter in operation.get("parameters", ()): if parameter.get("name") == name: diff --git a/typescript/.gitignore b/typescript/.gitignore deleted file mode 100644 index 149b5765..00000000 --- a/typescript/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -wwwroot/*.js -node_modules -typings -dist diff --git a/typescript/.npmignore b/typescript/.npmignore deleted file mode 100644 index b43bf86b..00000000 --- a/typescript/.npmignore +++ /dev/null @@ -1 +0,0 @@ -README.md diff --git a/typescript/.openapi-generator-ignore b/typescript/.openapi-generator-ignore deleted file mode 100644 index 7484ee59..00000000 --- a/typescript/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/typescript/.openapi-generator/FILES b/typescript/.openapi-generator/FILES deleted file mode 100644 index 227ec6c5..00000000 --- a/typescript/.openapi-generator/FILES +++ /dev/null @@ -1,64 +0,0 @@ -.gitignore -.npmignore -.openapi-generator-ignore -README.md -package.json -src/apis/AccessKeyManagementApi.ts -src/apis/AppManagementApi.ts -src/apis/AppNamespaceManagementApi.ts -src/apis/ClusterManagementApi.ts -src/apis/EnvironmentManagementApi.ts -src/apis/InstanceManagementApi.ts -src/apis/ItemManagementApi.ts -src/apis/NamespaceBranchManagementApi.ts -src/apis/NamespaceLockManagementApi.ts -src/apis/NamespaceManagementApi.ts -src/apis/OrganizationManagementApi.ts -src/apis/PermissionManagementApi.ts -src/apis/PortalManagementApi.ts -src/apis/ReleaseManagementApi.ts -src/apis/UserManagementApi.ts -src/apis/index.ts -src/index.ts -src/models/ExceptionResponse.ts -src/models/NamespaceGrayDelReleaseDTO.ts -src/models/NamespaceReleaseDTO.ts -src/models/OpenAccessKeyDTO.ts -src/models/OpenAppDTO.ts -src/models/OpenAppNamespaceDTO.ts -src/models/OpenAppRoleUserDTO.ts -src/models/OpenClusterDTO.ts -src/models/OpenClusterNamespaceRoleUserDTO.ts -src/models/OpenCreateAppDTO.ts -src/models/OpenCreateNamespaceDTO.ts -src/models/OpenEnvClusterDTO.ts -src/models/OpenEnvClusterInfo.ts -src/models/OpenEnvNamespaceRoleUserDTO.ts -src/models/OpenGrayReleaseRuleDTO.ts -src/models/OpenGrayReleaseRuleItemDTO.ts -src/models/OpenInstanceConfigDTO.ts -src/models/OpenInstanceDTO.ts -src/models/OpenInstancePageDTO.ts -src/models/OpenItemDTO.ts -src/models/OpenItemDiffDTO.ts -src/models/OpenItemExtendDTO.ts -src/models/OpenItemPageDTO.ts -src/models/OpenMissEnvDTO.ts -src/models/OpenNamespaceDTO.ts -src/models/OpenNamespaceExtendDTO.ts -src/models/OpenNamespaceIdentifier.ts -src/models/OpenNamespaceLockDTO.ts -src/models/OpenNamespaceRoleUserDTO.ts -src/models/OpenNamespaceSyncDTO.ts -src/models/OpenNamespaceTextModel.ts -src/models/OpenNamespaceUsageDTO.ts -src/models/OpenOrganizationDto.ts -src/models/OpenPermissionConditionDTO.ts -src/models/OpenReleaseChangeDTO.ts -src/models/OpenReleaseDTO.ts -src/models/OpenReleaseDiffDTO.ts -src/models/OpenUserDTO.ts -src/models/OpenUserInfoDTO.ts -src/models/index.ts -src/runtime.ts -tsconfig.json diff --git a/typescript/.openapi-generator/VERSION b/typescript/.openapi-generator/VERSION deleted file mode 100644 index 826f5ce0..00000000 --- a/typescript/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -6.6.0 diff --git a/typescript/README.md b/typescript/README.md deleted file mode 100644 index 826a3720..00000000 --- a/typescript/README.md +++ /dev/null @@ -1,45 +0,0 @@ -## apollo-openapi@0.3.8 - -This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments: - -Environment -* Node.js -* Webpack -* Browserify - -Language level -* ES5 - you must have a Promises/A+ library installed -* ES6 - -Module system -* CommonJS -* ES6 module system - -It can be used in both TypeScript and JavaScript. In TypeScript, the definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html)) - -### Building - -To build and compile the typescript sources to javascript use: -``` -npm install -npm run build -``` - -### Publishing - -First build the package then run ```npm publish``` - -### Consuming - -navigate to the folder of your consuming project and run one of the following commands. - -_published:_ - -``` -npm install apollo-openapi@0.3.8 --save -``` - -_unPublished (not recommended):_ - -``` -npm install PATH_TO_GENERATED_PACKAGE --save diff --git a/typescript/package.json b/typescript/package.json deleted file mode 100644 index 598e05be..00000000 --- a/typescript/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "apollo-openapi", - "version": "0.3.8", - "description": "OpenAPI client for apollo-openapi", - "author": "OpenAPI-Generator", - "repository": { - "type": "git", - "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git" - }, - "main": "./dist/index.js", - "typings": "./dist/index.d.ts", - "scripts": { - "build": "tsc", - "prepare": "npm run build" - }, - "devDependencies": { - "typescript": "^4.0" - } -} diff --git a/typescript/src/apis/AccessKeyManagementApi.ts b/typescript/src/apis/AccessKeyManagementApi.ts deleted file mode 100644 index c21cc446..00000000 --- a/typescript/src/apis/AccessKeyManagementApi.ts +++ /dev/null @@ -1,291 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - OpenAccessKeyDTO, -} from '../models'; -import { - OpenAccessKeyDTOFromJSON, - OpenAccessKeyDTOToJSON, -} from '../models'; - -export interface CreateAccessKeyRequest { - appId: string; - env: string; - operator?: string; -} - -export interface DeleteAccessKeyRequest { - appId: string; - env: string; - accessKeyId: number; - operator?: string; -} - -export interface DisableAccessKeyRequest { - appId: string; - env: string; - accessKeyId: number; - operator?: string; -} - -export interface EnableAccessKeyRequest { - appId: string; - env: string; - accessKeyId: number; - mode?: number; - operator?: string; -} - -export interface FindAccessKeysRequest { - appId: string; - env: string; -} - -/** - * - */ -export class AccessKeyManagementApi extends runtime.BaseAPI { - - /** - * - * 创建AccessKey - */ - async createAccessKeyRaw(requestParameters: CreateAccessKeyRequest, 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 createAccessKey.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling createAccessKey.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/accesskeys`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenAccessKeyDTOFromJSON(jsonValue)); - } - - /** - * - * 创建AccessKey - */ - async createAccessKey(requestParameters: CreateAccessKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createAccessKeyRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 删除AccessKey - */ - async deleteAccessKeyRaw(requestParameters: DeleteAccessKeyRequest, 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 deleteAccessKey.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling deleteAccessKey.'); - } - - if (requestParameters.accessKeyId === null || requestParameters.accessKeyId === undefined) { - throw new runtime.RequiredError('accessKeyId','Required parameter requestParameters.accessKeyId was null or undefined when calling deleteAccessKey.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"accessKeyId"}}`, encodeURIComponent(String(requestParameters.accessKeyId))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * - * 删除AccessKey - */ - async deleteAccessKey(requestParameters: DeleteAccessKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteAccessKeyRaw(requestParameters, initOverrides); - } - - /** - * - * 禁用AccessKey - */ - async disableAccessKeyRaw(requestParameters: DisableAccessKeyRequest, 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 disableAccessKey.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling disableAccessKey.'); - } - - if (requestParameters.accessKeyId === null || requestParameters.accessKeyId === undefined) { - throw new runtime.RequiredError('accessKeyId','Required parameter requestParameters.accessKeyId was null or undefined when calling disableAccessKey.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/deactivation`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"accessKeyId"}}`, encodeURIComponent(String(requestParameters.accessKeyId))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * - * 禁用AccessKey - */ - async disableAccessKey(requestParameters: DisableAccessKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.disableAccessKeyRaw(requestParameters, initOverrides); - } - - /** - * - * 启用AccessKey - */ - async enableAccessKeyRaw(requestParameters: EnableAccessKeyRequest, 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 enableAccessKey.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling enableAccessKey.'); - } - - if (requestParameters.accessKeyId === null || requestParameters.accessKeyId === undefined) { - throw new runtime.RequiredError('accessKeyId','Required parameter requestParameters.accessKeyId was null or undefined when calling enableAccessKey.'); - } - - const queryParameters: any = {}; - - if (requestParameters.mode !== undefined) { - queryParameters['mode'] = requestParameters.mode; - } - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/accesskeys/{accessKeyId}/activation`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"accessKeyId"}}`, encodeURIComponent(String(requestParameters.accessKeyId))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * - * 启用AccessKey - */ - async enableAccessKey(requestParameters: EnableAccessKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.enableAccessKeyRaw(requestParameters, initOverrides); - } - - /** - * - * 查找AccessKey - */ - async findAccessKeysRaw(requestParameters: FindAccessKeysRequest, 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 findAccessKeys.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findAccessKeys.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/accesskeys`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAccessKeyDTOFromJSON)); - } - - /** - * - * 查找AccessKey - */ - async findAccessKeys(requestParameters: FindAccessKeysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.findAccessKeysRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript/src/apis/AppManagementApi.ts b/typescript/src/apis/AppManagementApi.ts deleted file mode 100644 index f764fad8..00000000 --- a/typescript/src/apis/AppManagementApi.ts +++ /dev/null @@ -1,519 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - ExceptionResponse, - OpenAppDTO, - OpenCreateAppDTO, - OpenEnvClusterDTO, - OpenEnvClusterInfo, - OpenMissEnvDTO, -} from '../models'; -import { - ExceptionResponseFromJSON, - ExceptionResponseToJSON, - OpenAppDTOFromJSON, - OpenAppDTOToJSON, - OpenCreateAppDTOFromJSON, - OpenCreateAppDTOToJSON, - OpenEnvClusterDTOFromJSON, - OpenEnvClusterDTOToJSON, - OpenEnvClusterInfoFromJSON, - OpenEnvClusterInfoToJSON, - OpenMissEnvDTOFromJSON, - OpenMissEnvDTOToJSON, -} from '../models'; - -export interface CreateAppRequest { - openCreateAppDTO: OpenCreateAppDTO; -} - -export interface CreateAppInEnvRequest { - env: string; - openAppDTO: OpenAppDTO; - operator?: string; -} - -export interface DeleteAppRequest { - appId: string; - operator?: string; -} - -export interface FindAppsRequest { - appIds?: string; -} - -export interface FindMissEnvsRequest { - appId: string; -} - -export interface GetAppRequest { - appId: string; -} - -export interface GetAppsBySelfRequest { - page: number; - size: number; -} - -export interface GetEnvClusterInfoRequest { - appId: string; -} - -export interface GetEnvClustersRequest { - appId: string; -} - -export interface UpdateAppRequest { - appId: string; - openAppDTO: OpenAppDTO; - operator?: string; -} - -/** - * - */ -export class AppManagementApi extends runtime.BaseAPI { - - /** - * POST /openapi/v1/apps - * 创建应用 (original openapi) - */ - 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"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: OpenCreateAppDTOToJSON(requestParameters.openCreateAppDTO), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * POST /openapi/v1/apps - * 创建应用 (original openapi) - */ - async createApp(requestParameters: CreateAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.createAppRaw(requestParameters, initOverrides); - } - - /** - * POST /openapi/v1/apps/envs/{env} - * 在指定环境创建应用(new added) - */ - 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.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"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - 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.VoidApiResponse(response); - } - - /** - * POST /openapi/v1/apps/envs/{env} - * 在指定环境创建应用(new added) - */ - async createAppInEnv(requestParameters: CreateAppInEnvRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.createAppInEnvRaw(requestParameters, initOverrides); - } - - /** - * DELETE /openapi/v1/apps/{appId} - * 删除应用(new added) - */ - 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.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * DELETE /openapi/v1/apps/{appId} - * 删除应用(new added) - */ - async deleteApp(requestParameters: DeleteAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteAppRaw(requestParameters, initOverrides); - } - - /** - * POST /openapi/v1/apps - * 查找应用 (original openapi) - */ - async findAppsRaw(requestParameters: FindAppsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters.appIds !== undefined) { - queryParameters['appIds'] = requestParameters.appIds; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppDTOFromJSON)); - } - - /** - * POST /openapi/v1/apps - * 查找应用 (original openapi) - */ - async findApps(requestParameters: FindAppsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.findAppsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/authorized - * 获取当前Consumer授权的应用列表 (original openapi) - */ - async findAppsAuthorizedRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/authorized`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppDTOFromJSON)); - } - - /** - * GET /openapi/v1/apps/authorized - * 获取当前Consumer授权的应用列表 (original openapi) - */ - 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 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 = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/miss-envs`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenMissEnvDTOFromJSON)); - } - - /** - * GET /openapi/v1/apps/{appId}/miss-envs - * 查找缺失的环境(new added) - */ - 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} - * 获取单个应用信息(new added) - */ - 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 = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/apps/{appId} - * 获取单个应用信息(new added) - */ - async getApp(requestParameters: GetAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getAppRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/by-self - * 获取当前Consumer/User的应用列表(分页)(new added) - */ - async getAppsBySelfRaw(requestParameters: GetAppsBySelfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters.page === null || requestParameters.page === undefined) { - throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling getAppsBySelf.'); - } - - if (requestParameters.size === null || requestParameters.size === undefined) { - throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling getAppsBySelf.'); - } - - const queryParameters: any = {}; - - if (requestParameters.page !== undefined) { - queryParameters['page'] = requestParameters.page; - } - - if (requestParameters.size !== undefined) { - queryParameters['size'] = requestParameters.size; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/by-self`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppDTOFromJSON)); - } - - /** - * GET /openapi/v1/apps/by-self - * 获取当前Consumer/User的应用列表(分页)(new added) - */ - async getAppsBySelf(requestParameters: GetAppsBySelfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getAppsBySelfRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * /openapi/v1/apps/{appId}/env-cluster-info - * 获取应用环境集群详情(new added) - */ - 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 = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/env-cluster-info`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenEnvClusterInfoFromJSON)); - } - - /** - * /openapi/v1/apps/{appId}/env-cluster-info - * 获取应用环境集群详情(new added) - */ - async getEnvClusterInfo(requestParameters: GetEnvClusterInfoRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getEnvClusterInfoRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/{appId}/envclusters - * 获取应用的环境集群信息 (original openapi) - */ - async getEnvClustersRaw(requestParameters: GetEnvClustersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getEnvClusters.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envclusters`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenEnvClusterDTOFromJSON)); - } - - /** - * GET /openapi/v1/apps/{appId}/envclusters - * 获取应用的环境集群信息 (original openapi) - */ - async getEnvClusters(requestParameters: GetEnvClustersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getEnvClustersRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * PUT /openapi/v1/apps/{appId} - * 更新应用(new added) - */ - async updateAppRaw(requestParameters: UpdateAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling updateApp.'); - } - - if (requestParameters.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"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: OpenAppDTOToJSON(requestParameters.openAppDTO), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * PUT /openapi/v1/apps/{appId} - * 更新应用(new added) - */ - async updateApp(requestParameters: UpdateAppRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.updateAppRaw(requestParameters, initOverrides); - } - -} diff --git a/typescript/src/apis/AppNamespaceManagementApi.ts b/typescript/src/apis/AppNamespaceManagementApi.ts deleted file mode 100644 index e7b0b6dd..00000000 --- a/typescript/src/apis/AppNamespaceManagementApi.ts +++ /dev/null @@ -1,370 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - ExceptionResponse, - OpenAppNamespaceDTO, - OpenNamespaceDTO, - OpenNamespaceUsageDTO, -} from '../models'; -import { - ExceptionResponseFromJSON, - ExceptionResponseToJSON, - OpenAppNamespaceDTOFromJSON, - OpenAppNamespaceDTOToJSON, - OpenNamespaceDTOFromJSON, - OpenNamespaceDTOToJSON, - OpenNamespaceUsageDTOFromJSON, - OpenNamespaceUsageDTOToJSON, -} from '../models'; - -export interface CreateAppNamespaceRequest { - appId: string; - openAppNamespaceDTO: OpenAppNamespaceDTO; - operator?: string; -} - -export interface DeleteAppNamespaceRequest { - appId: string; - namespaceName: string; - operator?: string; -} - -export interface FindAppNamespaceRequest { - appId: string; - namespaceName: string; - extendInfo?: boolean; -} - -export interface FindAppNamespaceUsageRequest { - appId: string; - namespaceName: string; -} - -export interface GetAppNamespacesByAppIdRequest { - appId: string; -} - -export interface GetPublicAppNamespaceInstancesRequest { - env: string; - publicNamespaceName: string; - page: number; - size: number; -} - -/** - * - */ -export class AppNamespaceManagementApi extends runtime.BaseAPI { - - /** - * POST /openapi/v1/apps/{appId}/appnamespaces - * 创建AppNamespace (original openapi) - */ - async createAppNamespaceRaw(requestParameters: CreateAppNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling createAppNamespace.'); - } - - if (requestParameters.openAppNamespaceDTO === null || requestParameters.openAppNamespaceDTO === undefined) { - throw new runtime.RequiredError('openAppNamespaceDTO','Required parameter requestParameters.openAppNamespaceDTO was null or undefined when calling createAppNamespace.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/appnamespaces`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: OpenAppNamespaceDTOToJSON(requestParameters.openAppNamespaceDTO), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppNamespaceDTOFromJSON(jsonValue)); - } - - /** - * POST /openapi/v1/apps/{appId}/appnamespaces - * 创建AppNamespace (original openapi) - */ - async createAppNamespace(requestParameters: CreateAppNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createAppNamespaceRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * 删除AppNamespace (new added) - */ - async deleteAppNamespaceRaw(requestParameters: DeleteAppNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling deleteAppNamespace.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling deleteAppNamespace.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * DELETE /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * 删除AppNamespace (new added) - */ - async deleteAppNamespace(requestParameters: DeleteAppNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteAppNamespaceRaw(requestParameters, initOverrides); - } - - /** - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * 获取指定的AppNamespace (new added) - */ - async findAppNamespaceRaw(requestParameters: FindAppNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling findAppNamespace.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findAppNamespace.'); - } - - const queryParameters: any = {}; - - if (requestParameters.extendInfo !== undefined) { - queryParameters['extendInfo'] = requestParameters.extendInfo; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppNamespaceDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName} - * 获取指定的AppNamespace (new added) - */ - async findAppNamespace(requestParameters: FindAppNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.findAppNamespaceRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage - * 查询appnamespace使用情况(new added) - */ - async findAppNamespaceUsageRaw(requestParameters: FindAppNamespaceUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling findAppNamespaceUsage.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findAppNamespaceUsage.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenNamespaceUsageDTOFromJSON)); - } - - /** - * GET /openapi/v1/apps/{appId}/appnamespaces/{namespaceName}/usage - * 查询appnamespace使用情况(new added) - */ - async findAppNamespaceUsage(requestParameters: FindAppNamespaceUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.findAppNamespaceUsageRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/appnamespaces/public - * 获取所有公共AppNamespace (new added) - */ - async getAppNamespacesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/appnamespaces`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppNamespaceDTOFromJSON)); - } - - /** - * GET /openapi/v1/appnamespaces/public - * 获取所有公共AppNamespace (new added) - */ - async getAppNamespaces(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getAppNamespacesRaw(initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/{appId}/appnamespaces - * 获取指定应用的AppNamespace (new added) - */ - async getAppNamespacesByAppIdRaw(requestParameters: GetAppNamespacesByAppIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getAppNamespacesByAppId.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/appnamespaces`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenAppNamespaceDTOFromJSON)); - } - - /** - * GET /openapi/v1/apps/{appId}/appnamespaces - * 获取指定应用的AppNamespace (new added) - */ - async getAppNamespacesByAppId(requestParameters: GetAppNamespacesByAppIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getAppNamespacesByAppIdRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * 获取公共AppNamespace的所有实例 (new added) - */ - async getPublicAppNamespaceInstancesRaw(requestParameters: GetPublicAppNamespaceInstancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getPublicAppNamespaceInstances.'); - } - - if (requestParameters.publicNamespaceName === null || requestParameters.publicNamespaceName === undefined) { - throw new runtime.RequiredError('publicNamespaceName','Required parameter requestParameters.publicNamespaceName was null or undefined when calling getPublicAppNamespaceInstances.'); - } - - if (requestParameters.page === null || requestParameters.page === undefined) { - throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling getPublicAppNamespaceInstances.'); - } - - if (requestParameters.size === null || requestParameters.size === undefined) { - throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling getPublicAppNamespaceInstances.'); - } - - const queryParameters: any = {}; - - if (requestParameters.page !== undefined) { - queryParameters['page'] = requestParameters.page; - } - - if (requestParameters.size !== undefined) { - queryParameters['size'] = requestParameters.size; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"publicNamespaceName"}}`, encodeURIComponent(String(requestParameters.publicNamespaceName))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenNamespaceDTOFromJSON)); - } - - /** - * GET /openapi/v1/envs/{env}/appnamespaces/{publicNamespaceName}/instances - * 获取公共AppNamespace的所有实例 (new added) - */ - async getPublicAppNamespaceInstances(requestParameters: GetPublicAppNamespaceInstancesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getPublicAppNamespaceInstancesRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript/src/apis/ClusterManagementApi.ts b/typescript/src/apis/ClusterManagementApi.ts deleted file mode 100644 index 3225d08f..00000000 --- a/typescript/src/apis/ClusterManagementApi.ts +++ /dev/null @@ -1,189 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - ExceptionResponse, - OpenClusterDTO, -} from '../models'; -import { - ExceptionResponseFromJSON, - ExceptionResponseToJSON, - OpenClusterDTOFromJSON, - OpenClusterDTOToJSON, -} from '../models'; - -export interface CreateClusterRequest { - appId: string; - env: string; - openClusterDTO: OpenClusterDTO; -} - -export interface DeleteClusterRequest { - env: string; - appId: string; - clusterName: string; - operator?: string; -} - -export interface GetClusterRequest { - appId: string; - clusterName: string; - env: string; -} - -/** - * - */ -export class ClusterManagementApi extends runtime.BaseAPI { - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters - * 创建集群 (original openapi) - */ - 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.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling createCluster.'); - } - - 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 = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: OpenClusterDTOToJSON(requestParameters.openClusterDTO), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenClusterDTOFromJSON(jsonValue)); - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters - * 创建集群 (original openapi) - */ - 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 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.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling deleteCluster.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling deleteCluster.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/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.VoidApiResponse(response); - } - - /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - * 删除集群 (new added) - */ - async deleteCluster(requestParameters: DeleteClusterRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteClusterRaw(requestParameters, initOverrides); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - * 获取指定集群信息 (original openapi) - */ - 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.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getCluster.'); - } - - 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 = {}; - - 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}`.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) => OpenClusterDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName} - * 获取指定集群信息 (original openapi) - */ - 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/EnvironmentManagementApi.ts b/typescript/src/apis/EnvironmentManagementApi.ts deleted file mode 100644 index 1e019349..00000000 --- a/typescript/src/apis/EnvironmentManagementApi.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; - -/** - * - */ -export class EnvironmentManagementApi extends runtime.BaseAPI { - - /** - * GET /openapi/v1/envs - * 获取所有环境 - */ - async getEnvsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/envs`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/envs - * 获取所有环境 - */ - async getEnvs(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getEnvsRaw(initOverrides); - return await response.value(); - } - -} diff --git a/typescript/src/apis/InstanceManagementApi.ts b/typescript/src/apis/InstanceManagementApi.ts deleted file mode 100644 index 273124f0..00000000 --- a/typescript/src/apis/InstanceManagementApi.ts +++ /dev/null @@ -1,320 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - OpenInstanceDTO, - OpenInstancePageDTO, -} from '../models'; -import { - OpenInstanceDTOFromJSON, - OpenInstanceDTOToJSON, - OpenInstancePageDTOFromJSON, - OpenInstancePageDTOToJSON, -} from '../models'; - -export interface GetByNamespaceRequest { - env: string; - appId: string; - clusterName: string; - namespaceName: string; - page: number; - size: number; - instanceAppId?: string; -} - -export interface GetByReleaseRequest { - env: string; - releaseId: number; - page: number; - size: number; -} - -export interface GetByReleasesAndNamespaceNotInRequest { - env: string; - appId: string; - clusterName: string; - namespaceName: string; - releaseIds: string; -} - -export interface GetInstanceCountByNamespaceRequest { - env: string; - appId: string; - clusterName: string; - namespaceName: string; -} - -/** - * - */ -export class InstanceManagementApi extends runtime.BaseAPI { - - /** - * 根据namespaceName查询实例(new added) - */ - async getByNamespaceRaw(requestParameters: GetByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getByNamespace.'); - } - - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getByNamespace.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getByNamespace.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getByNamespace.'); - } - - if (requestParameters.page === null || requestParameters.page === undefined) { - throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling getByNamespace.'); - } - - if (requestParameters.size === null || requestParameters.size === undefined) { - throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling getByNamespace.'); - } - - const queryParameters: any = {}; - - if (requestParameters.appId !== undefined) { - queryParameters['appId'] = requestParameters.appId; - } - - if (requestParameters.clusterName !== undefined) { - queryParameters['clusterName'] = requestParameters.clusterName; - } - - if (requestParameters.namespaceName !== undefined) { - queryParameters['namespaceName'] = requestParameters.namespaceName; - } - - if (requestParameters.instanceAppId !== undefined) { - queryParameters['instanceAppId'] = requestParameters.instanceAppId; - } - - if (requestParameters.page !== undefined) { - queryParameters['page'] = requestParameters.page; - } - - if (requestParameters.size !== undefined) { - queryParameters['size'] = requestParameters.size; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/envs/{env}/instances/by-namespace`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenInstancePageDTOFromJSON(jsonValue)); - } - - /** - * 根据namespaceName查询实例(new added) - */ - async getByNamespace(requestParameters: GetByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getByNamespaceRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/envs/{env}/instances/by-release - * 根据发布版本查询实例(支持分页) (new added) - */ - async getByReleaseRaw(requestParameters: GetByReleaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getByRelease.'); - } - - 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.page === null || requestParameters.page === undefined) { - throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling getByRelease.'); - } - - 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.releaseId !== undefined) { - queryParameters['releaseId'] = requestParameters.releaseId; - } - - if (requestParameters.page !== undefined) { - queryParameters['page'] = requestParameters.page; - } - - if (requestParameters.size !== undefined) { - queryParameters['size'] = requestParameters.size; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/envs/{env}/instances/by-release`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenInstancePageDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/envs/{env}/instances/by-release - * 根据发布版本查询实例(支持分页) (new added) - */ - async getByRelease(requestParameters: GetByReleaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getByReleaseRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 查询不在指定发布版本中的实例 (new added) - */ - async getByReleasesAndNamespaceNotInRaw(requestParameters: GetByReleasesAndNamespaceNotInRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getByReleasesAndNamespaceNotIn.'); - } - - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getByReleasesAndNamespaceNotIn.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getByReleasesAndNamespaceNotIn.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getByReleasesAndNamespaceNotIn.'); - } - - if (requestParameters.releaseIds === null || requestParameters.releaseIds === undefined) { - throw new runtime.RequiredError('releaseIds','Required parameter requestParameters.releaseIds was null or undefined when calling getByReleasesAndNamespaceNotIn.'); - } - - const queryParameters: any = {}; - - if (requestParameters.appId !== undefined) { - queryParameters['appId'] = requestParameters.appId; - } - - if (requestParameters.clusterName !== undefined) { - queryParameters['clusterName'] = requestParameters.clusterName; - } - - if (requestParameters.namespaceName !== undefined) { - queryParameters['namespaceName'] = requestParameters.namespaceName; - } - - if (requestParameters.releaseIds !== undefined) { - queryParameters['releaseIds'] = requestParameters.releaseIds; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/envs/{env}/instances/by-namespace-and-releases-not-in`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenInstanceDTOFromJSON)); - } - - /** - * 查询不在指定发布版本中的实例 (new added) - */ - async getByReleasesAndNamespaceNotIn(requestParameters: GetByReleasesAndNamespaceNotInRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getByReleasesAndNamespaceNotInRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - * 获取命名空间下的实例数量 (original openapi) - */ - 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.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getInstanceCountByNamespace.'); - } - - 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 = {}; - - 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}/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); - - 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}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances - * 获取命名空间下的实例数量 (original openapi) - */ - 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/apis/ItemManagementApi.ts b/typescript/src/apis/ItemManagementApi.ts deleted file mode 100644 index 507a558c..00000000 --- a/typescript/src/apis/ItemManagementApi.ts +++ /dev/null @@ -1,977 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - ExceptionResponse, - OpenItemDTO, - OpenItemDiffDTO, - OpenItemPageDTO, - OpenNamespaceSyncDTO, - OpenNamespaceTextModel, -} from '../models'; -import { - ExceptionResponseFromJSON, - ExceptionResponseToJSON, - OpenItemDTOFromJSON, - OpenItemDTOToJSON, - OpenItemDiffDTOFromJSON, - OpenItemDiffDTOToJSON, - OpenItemPageDTOFromJSON, - OpenItemPageDTOToJSON, - OpenNamespaceSyncDTOFromJSON, - OpenNamespaceSyncDTOToJSON, - OpenNamespaceTextModelFromJSON, - OpenNamespaceTextModelToJSON, -} from '../models'; - -export interface BatchUpdateItemsByTextRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - openNamespaceTextModel: OpenNamespaceTextModel; - operator?: string; -} - -export interface CompareItemsRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - openNamespaceSyncDTO: OpenNamespaceSyncDTO; -} - -export interface CreateItemRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - openItemDTO: OpenItemDTO; - operator?: string; -} - -export interface DeleteItemRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - key: string; - operator?: string; -} - -export interface DeleteItemByEncodedKeyRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - key: string; - operator: string; -} - -export interface FindBranchItemsRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - branchName: string; -} - -export interface FindItemsByNamespaceRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - page: number; - size: number; -} - -export interface GetItemRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - key: string; -} - -export interface GetItemByEncodedKeyRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - key: string; -} - -export interface RevertItemsRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - operator?: string; -} - -export interface SyncItemsRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - openNamespaceSyncDTO: OpenNamespaceSyncDTO; - operator?: string; -} - -export interface SyntaxCheckRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - openNamespaceTextModel: OpenNamespaceTextModel; -} - -export interface UpdateItemRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - key: string; - createIfNotExists: boolean; - openItemDTO: OpenItemDTO; - operator?: string; -} - -export interface UpdateItemByEncodedKeyRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - key: string; - createIfNotExists: boolean; - openItemDTO: OpenItemDTO; - operator?: string; -} - -/** - * - */ -export class ItemManagementApi extends runtime.BaseAPI { - - /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: - * 通过文本批量修改配置项 (new added) - */ - 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 || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling batchUpdateItemsByText.'); - } - - 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 || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling batchUpdateItemsByText.'); - } - - if (requestParameters.openNamespaceTextModel === null || requestParameters.openNamespaceTextModel === undefined) { - throw new runtime.RequiredError('openNamespaceTextModel','Required parameter requestParameters.openNamespaceTextModel was null or undefined when calling batchUpdateItemsByText.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: OpenNamespaceTextModelToJSON(requestParameters.openNamespaceTextModel), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items: - * 通过文本批量修改配置项 (new added) - */ - async batchUpdateItemsByText(requestParameters: BatchUpdateItemsByTextRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.batchUpdateItemsByTextRaw(requestParameters, initOverrides); - } - - /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff - * 对比命名空间配置差异 (new added) - */ - 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 || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling compareItems.'); - } - - 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 || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling compareItems.'); - } - - if (requestParameters.openNamespaceSyncDTO === null || requestParameters.openNamespaceSyncDTO === undefined) { - throw new runtime.RequiredError('openNamespaceSyncDTO','Required parameter requestParameters.openNamespaceSyncDTO was null or undefined when calling compareItems.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: OpenNamespaceSyncDTOToJSON(requestParameters.openNamespaceSyncDTO), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenItemDiffDTOFromJSON)); - } - - /** - * POST /apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/diff - * 对比命名空间配置差异 (new added) - */ - async compareItems(requestParameters: CompareItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.compareItemsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - * 创建新的配置项 (original openapi) - */ - 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.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling createItem.'); - } - - 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.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling createItem.'); - } - - if (requestParameters.openItemDTO === null || requestParameters.openItemDTO === undefined) { - throw new runtime.RequiredError('openItemDTO','Required parameter requestParameters.openItemDTO was null or undefined when calling createItem.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/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), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenItemDTOFromJSON(jsonValue)); - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items - * 创建新的配置项 (original openapi) - */ - async createItem(requestParameters: CreateItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createItemRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * 删除配置项 (original openapi) - */ - 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.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling deleteItem.'); - } - - 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.key === null || requestParameters.key === undefined) { - throw new runtime.RequiredError('key','Required parameter requestParameters.key was null or undefined when calling deleteItem.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/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, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * 删除配置项 (original openapi) - */ - async deleteItem(requestParameters: DeleteItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteItemRaw(requestParameters, initOverrides); - } - - /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * 通过编码的key删除配置项 (original openapi) - */ - async deleteItemByEncodedKeyRaw(requestParameters: DeleteItemByEncodedKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - 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 || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling deleteItemByEncodedKey.'); - } - - 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 || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling deleteItemByEncodedKey.'); - } - - 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 = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/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, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * 通过编码的key删除配置项 (original openapi) - */ - async deleteItemByEncodedKey(requestParameters: DeleteItemByEncodedKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteItemByEncodedKeyRaw(requestParameters, initOverrides); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: - * 获取分支下的配置项 (new added) - */ - async findBranchItemsRaw(requestParameters: FindBranchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling findBranchItems.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findBranchItems.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findBranchItems.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findBranchItems.'); - } - - if (requestParameters.branchName === null || requestParameters.branchName === undefined) { - throw new runtime.RequiredError('branchName','Required parameter requestParameters.branchName was null or undefined when calling findBranchItems.'); - } - - const queryParameters: any = {}; - - 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}/branches/{branchName}/items`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters.branchName))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenItemDTOFromJSON)); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/items: - * 获取分支下的配置项 (new added) - */ - async findBranchItems(requestParameters: FindBranchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.findBranchItemsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 获取指定命名空间的配置项列表,支持分页 - * 获取命名空间下的配置项列表 (original openapi) - */ - 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 || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findItemsByNamespace.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findItemsByNamespace.'); - } - - 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 || requestParameters.page === undefined) { - throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling findItemsByNamespace.'); - } - - if (requestParameters.size === null || requestParameters.size === undefined) { - throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling findItemsByNamespace.'); - } - - const queryParameters: any = {}; - - if (requestParameters.page !== undefined) { - queryParameters['page'] = requestParameters.page; - } - - if (requestParameters.size !== undefined) { - queryParameters['size'] = requestParameters.size; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenItemPageDTOFromJSON(jsonValue)); - } - - /** - * 获取指定命名空间的配置项列表,支持分页 - * 获取命名空间下的配置项列表 (original openapi) - */ - async findItemsByNamespace(requestParameters: FindItemsByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.findItemsByNamespaceRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * 获取单个配置项 (original openapi) - */ - 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 || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getItem.'); - } - - 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 || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getItem.'); - } - - 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 = {}; - - 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}/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, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenItemDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * 获取单个配置项 (original openapi) - */ - async getItem(requestParameters: GetItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getItemRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * 通过查询参数获取配置项(支持编码的key) (original openapi) - */ - 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.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getItemByEncodedKey.'); - } - - 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/revocation - * 撤销配置项更改 (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.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling revertItems.'); - } - - 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.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling revertItems.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/revocation - * 撤销配置项更改 (new added) - */ - async revertItems(requestParameters: RevertItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.revertItemsRaw(requestParameters, initOverrides); - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: - * 同步配置项到多个命名空间 (new added) - */ - 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 || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling syncItems.'); - } - - 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 || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling syncItems.'); - } - - if (requestParameters.openNamespaceSyncDTO === null || requestParameters.openNamespaceSyncDTO === undefined) { - throw new runtime.RequiredError('openNamespaceSyncDTO','Required parameter requestParameters.openNamespaceSyncDTO was null or undefined when calling syncItems.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: OpenNamespaceSyncDTOToJSON(requestParameters.openNamespaceSyncDTO), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/synchronize: - * 同步配置项到多个命名空间 (new added) - */ - async syncItems(requestParameters: SyncItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.syncItemsRaw(requestParameters, initOverrides); - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation - * 验证配置文本语法 (new added) - */ - async syntaxCheckRaw(requestParameters: SyntaxCheckRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling syntaxCheck.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling syntaxCheck.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling syntaxCheck.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling syntaxCheck.'); - } - - if (requestParameters.openNamespaceTextModel === null || requestParameters.openNamespaceTextModel === undefined) { - throw new runtime.RequiredError('openNamespaceTextModel','Required parameter requestParameters.openNamespaceTextModel was null or undefined when calling syntaxCheck.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: OpenNamespaceTextModelToJSON(requestParameters.openNamespaceTextModel), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/validation - * 验证配置文本语法 (new added) - */ - async syntaxCheck(requestParameters: SyntaxCheckRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.syntaxCheckRaw(requestParameters, initOverrides); - } - - /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * 更新配置项 (original openapi) - */ - 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 || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling updateItem.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling updateItem.'); - } - - 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; - } - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/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.VoidApiResponse(response); - } - - /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/items/{key} - * 更新配置项 (original openapi) - */ - async updateItem(requestParameters: UpdateItemRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.updateItemRaw(requestParameters, initOverrides); - } - - /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * 通过编码的key更新配置项 (original openapi) - */ - 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 || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling updateItemByEncodedKey.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling updateItemByEncodedKey.'); - } - - 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.key === null || requestParameters.key === undefined) { - throw new runtime.RequiredError('key','Required parameter requestParameters.key was null or undefined when calling updateItemByEncodedKey.'); - } - - if (requestParameters.createIfNotExists === null || requestParameters.createIfNotExists === undefined) { - throw new runtime.RequiredError('createIfNotExists','Required parameter requestParameters.createIfNotExists was null or undefined when calling updateItemByEncodedKey.'); - } - - if (requestParameters.openItemDTO === null || requestParameters.openItemDTO === undefined) { - throw new runtime.RequiredError('openItemDTO','Required parameter requestParameters.openItemDTO was null or undefined when calling updateItemByEncodedKey.'); - } - - const queryParameters: any = {}; - - if (requestParameters.createIfNotExists !== undefined) { - queryParameters['createIfNotExists'] = requestParameters.createIfNotExists; - } - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - 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: 'PUT', - headers: headerParameters, - query: queryParameters, - body: OpenItemDTOToJSON(requestParameters.openItemDTO), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/encodedItems/{key} - * 通过编码的key更新配置项 (original openapi) - */ - async updateItemByEncodedKey(requestParameters: UpdateItemByEncodedKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.updateItemByEncodedKeyRaw(requestParameters, initOverrides); - } - -} diff --git a/typescript/src/apis/NamespaceBranchManagementApi.ts b/typescript/src/apis/NamespaceBranchManagementApi.ts deleted file mode 100644 index c13f9b81..00000000 --- a/typescript/src/apis/NamespaceBranchManagementApi.ts +++ /dev/null @@ -1,516 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - ExceptionResponse, - NamespaceReleaseDTO, - OpenGrayReleaseRuleDTO, - OpenNamespaceDTO, - OpenReleaseDTO, -} from '../models'; -import { - ExceptionResponseFromJSON, - ExceptionResponseToJSON, - NamespaceReleaseDTOFromJSON, - NamespaceReleaseDTOToJSON, - OpenGrayReleaseRuleDTOFromJSON, - OpenGrayReleaseRuleDTOToJSON, - OpenNamespaceDTOFromJSON, - OpenNamespaceDTOToJSON, - OpenReleaseDTOFromJSON, - OpenReleaseDTOToJSON, -} from '../models'; - -export interface CreateBranchRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - operator?: string; -} - -export interface DeleteBranchRequest { - env: string; - appId: string; - clusterName: string; - namespaceName: string; - branchName: string; - operator?: string; -} - -export interface FindBranchRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - extendInfo?: boolean; -} - -export interface GetBranchGrayRulesRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - branchName: string; -} - -export interface MergeRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - branchName: string; - deleteBranch: boolean; - namespaceReleaseDTO: NamespaceReleaseDTO; -} - -export interface MergeBranchRequest { - env: string; - appId: string; - clusterName: string; - namespaceName: string; - branchName: string; - deleteBranch: boolean; - namespaceReleaseDTO: NamespaceReleaseDTO; - operator?: string; -} - -export interface UpdateBranchRulesRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - branchName: string; - openGrayReleaseRuleDTO: OpenGrayReleaseRuleDTO; - operator?: string; -} - -/** - * - */ -export class NamespaceBranchManagementApi extends runtime.BaseAPI { - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - * 创建命名空间分支 (original openapi) - */ - 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 || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling createBranch.'); - } - - 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 || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling createBranch.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/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, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceDTOFromJSON(jsonValue)); - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - * 创建命名空间分支 (original openapi) - */ - 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 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 || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling deleteBranch.'); - } - - 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 || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling deleteBranch.'); - } - - if (requestParameters.branchName === null || requestParameters.branchName === undefined) { - throw new runtime.RequiredError('branchName','Required parameter requestParameters.branchName was null or undefined when calling deleteBranch.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/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, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * DELETE /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * 删除命名空间分支 (original openapi) - */ - async deleteBranch(requestParameters: DeleteBranchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteBranchRaw(requestParameters, initOverrides); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - * 获取命名空间分支信息 (original openapi) - */ - 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.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findBranch.'); - } - - 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.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findBranch.'); - } - - const queryParameters: any = {}; - - if (requestParameters.extendInfo !== undefined) { - queryParameters['extendInfo'] = requestParameters.extendInfo; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/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, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches - * 获取命名空间分支信息 (original openapi) - */ - 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}/rules - * 获取分支灰度发布规则 (original openapi) - */ - 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 || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getBranchGrayRules.'); - } - - 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 || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getBranchGrayRules.'); - } - - 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 = {}; - - 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}/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, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenGrayReleaseRuleDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules - * 获取分支灰度发布规则 (original openapi) - */ - async getBranchGrayRules(requestParameters: GetBranchGrayRulesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getBranchGrayRulesRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 合并灰度分支并可选择删除分支 - * 合并分支 (original openapi) - */ - async mergeRaw(requestParameters: MergeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling merge.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling merge.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling merge.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling merge.'); - } - - if (requestParameters.branchName === null || requestParameters.branchName === undefined) { - throw new runtime.RequiredError('branchName','Required parameter requestParameters.branchName was null or undefined when calling merge.'); - } - - if (requestParameters.deleteBranch === null || requestParameters.deleteBranch === undefined) { - throw new runtime.RequiredError('deleteBranch','Required parameter requestParameters.deleteBranch was null or undefined when calling merge.'); - } - - if (requestParameters.namespaceReleaseDTO === null || requestParameters.namespaceReleaseDTO === undefined) { - throw new runtime.RequiredError('namespaceReleaseDTO','Required parameter requestParameters.namespaceReleaseDTO was null or undefined when calling merge.'); - } - - const queryParameters: any = {}; - - if (requestParameters.deleteBranch !== undefined) { - queryParameters['deleteBranch'] = requestParameters.deleteBranch; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/merge`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"branchName"}}`, encodeURIComponent(String(requestParameters.branchName))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: NamespaceReleaseDTOToJSON(requestParameters.namespaceReleaseDTO), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); - } - - /** - * 合并灰度分支并可选择删除分支 - * 合并分支 (original openapi) - */ - async merge(requestParameters: MergeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.mergeRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * 合并分支到主分支 (new added) - */ - 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.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 || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling mergeBranch.'); - } - - 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 || requestParameters.branchName === undefined) { - throw new runtime.RequiredError('branchName','Required parameter requestParameters.branchName was null or undefined when calling mergeBranch.'); - } - - 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.namespaceReleaseDTO === null || requestParameters.namespaceReleaseDTO === undefined) { - throw new runtime.RequiredError('namespaceReleaseDTO','Required parameter requestParameters.namespaceReleaseDTO was null or undefined when calling mergeBranch.'); - } - - const queryParameters: any = {}; - - if (requestParameters.deleteBranch !== undefined) { - queryParameters['deleteBranch'] = requestParameters.deleteBranch; - } - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/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: 'POST', - headers: headerParameters, - query: queryParameters, - body: NamespaceReleaseDTOToJSON(requestParameters.namespaceReleaseDTO), - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); - } - - /** - * POST /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName} - * 合并分支到主分支 (new added) - */ - async mergeBranch(requestParameters: MergeBranchRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.mergeBranchRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules - * 更新分支灰度发布规则 (original openapi) - */ - async updateBranchRulesRaw(requestParameters: UpdateBranchRulesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - 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.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 || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling updateBranchRules.'); - } - - 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 || requestParameters.branchName === undefined) { - throw new runtime.RequiredError('branchName','Required parameter requestParameters.branchName was null or undefined when calling updateBranchRules.'); - } - - 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.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/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: OpenGrayReleaseRuleDTOToJSON(requestParameters.openGrayReleaseRuleDTO), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * PUT /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/branches/{branchName}/rules - * 更新分支灰度发布规则 (original openapi) - */ - async updateBranchRules(requestParameters: UpdateBranchRulesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.updateBranchRulesRaw(requestParameters, initOverrides); - } - -} diff --git a/typescript/src/apis/NamespaceLockManagementApi.ts b/typescript/src/apis/NamespaceLockManagementApi.ts deleted file mode 100644 index dfe2a3c6..00000000 --- a/typescript/src/apis/NamespaceLockManagementApi.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - OpenNamespaceLockDTO, -} from '../models'; -import { - OpenNamespaceLockDTOFromJSON, - OpenNamespaceLockDTOToJSON, -} from '../models'; - -export interface GetNamespaceLockRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; -} - -/** - * - */ -export class NamespaceLockManagementApi extends runtime.BaseAPI { - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - * 获取Namespace的锁状态 (original openapi) - */ - async getNamespaceLockRaw(requestParameters: GetNamespaceLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling getNamespaceLock.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getNamespaceLock.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getNamespaceLock.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getNamespaceLock.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceLockDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/lock - * 获取Namespace的锁状态 (original openapi) - */ - async getNamespaceLock(requestParameters: GetNamespaceLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getNamespaceLockRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript/src/apis/NamespaceManagementApi.ts b/typescript/src/apis/NamespaceManagementApi.ts deleted file mode 100644 index 1cac8133..00000000 --- a/typescript/src/apis/NamespaceManagementApi.ts +++ /dev/null @@ -1,533 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - OpenCreateNamespaceDTO, - OpenNamespaceDTO, - OpenNamespaceUsageDTO, -} from '../models'; -import { - OpenCreateNamespaceDTOFromJSON, - OpenCreateNamespaceDTOToJSON, - OpenNamespaceDTOFromJSON, - OpenNamespaceDTOToJSON, - OpenNamespaceUsageDTOFromJSON, - OpenNamespaceUsageDTOToJSON, -} from '../models'; - -export interface CreateMissingNamespacesRequest { - appId: string; - env: string; - clusterName: string; - operator?: string; -} - -export interface CreateNamespacesRequest { - openCreateNamespaceDTO: Array; - operator?: string; -} - -export interface DeleteNamespaceRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - operator?: string; -} - -export interface FindMissingNamespacesRequest { - appId: string; - env: string; - clusterName: string; -} - -export interface FindNamespaceRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - fillItemDetail: boolean; - extendInfo?: boolean; -} - -export interface FindNamespaceUsageRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; -} - -export interface FindNamespacesRequest { - appId: string; - env: string; - clusterName: string; - fillItemDetail: boolean; - extendInfo?: boolean; -} - -export interface FindPublicNamespaceForAssociatedNamespaceRequest { - env: string; - appId: string; - clusterName: string; - namespaceName: string; - extendInfo?: boolean; -} - -export interface GetNamespacesReleaseStatusRequest { - appId: string; -} - -/** - * - */ -export class NamespaceManagementApi extends runtime.BaseAPI { - - /** - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces - * 创建缺失的Namespace (new added) - */ - async createMissingNamespacesRaw(requestParameters: CreateMissingNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling createMissingNamespaces.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling createMissingNamespaces.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling createMissingNamespaces.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces - * 创建缺失的Namespace (new added) - */ - async createMissingNamespaces(requestParameters: CreateMissingNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.createMissingNamespacesRaw(requestParameters, initOverrides); - } - - /** - * POST /openapi/v1/apps/{appId}/namespaces - * 创建Namespace (new added) - */ - async createNamespacesRaw(requestParameters: CreateNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.openCreateNamespaceDTO === null || requestParameters.openCreateNamespaceDTO === undefined) { - throw new runtime.RequiredError('openCreateNamespaceDTO','Required parameter requestParameters.openCreateNamespaceDTO was null or undefined when calling createNamespaces.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/namespaces`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters.openCreateNamespaceDTO.map(OpenCreateNamespaceDTOToJSON), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * POST /openapi/v1/apps/{appId}/namespaces - * 创建Namespace (new added) - */ - async createNamespaces(requestParameters: CreateNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.createNamespacesRaw(requestParameters, initOverrides); - } - - /** - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} - * 删除指定的Namespace (new added) - */ - async deleteNamespaceRaw(requestParameters: DeleteNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling deleteNamespace.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling deleteNamespace.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling deleteNamespace.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling deleteNamespace.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * DELETE /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName} - * 删除指定的Namespace (new added) - */ - async deleteNamespace(requestParameters: DeleteNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteNamespaceRaw(requestParameters, initOverrides); - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces - * 查找缺失的Namespace (new added) - */ - async findMissingNamespacesRaw(requestParameters: FindMissingNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling findMissingNamespaces.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findMissingNamespaces.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findMissingNamespaces.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/missing-namespaces - * 查找缺失的Namespace (new added) - */ - async findMissingNamespaces(requestParameters: FindMissingNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.findMissingNamespacesRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - * 获取指定的Namespace (original openapi) - */ - async findNamespaceRaw(requestParameters: FindNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling findNamespace.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findNamespace.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findNamespace.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findNamespace.'); - } - - if (requestParameters.fillItemDetail === null || requestParameters.fillItemDetail === undefined) { - throw new runtime.RequiredError('fillItemDetail','Required parameter requestParameters.fillItemDetail was null or undefined when calling findNamespace.'); - } - - const queryParameters: any = {}; - - if (requestParameters.fillItemDetail !== undefined) { - queryParameters['fillItemDetail'] = requestParameters.fillItemDetail; - } - - if (requestParameters.extendInfo !== undefined) { - queryParameters['extendInfo'] = requestParameters.extendInfo; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/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) => OpenNamespaceDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName} - * 获取指定的Namespace (original openapi) - */ - async findNamespace(requestParameters: FindNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.findNamespaceRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage - * 查询namespace使用情况(new added) - */ - async findNamespaceUsageRaw(requestParameters: FindNamespaceUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling findNamespaceUsage.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findNamespaceUsage.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findNamespaceUsage.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findNamespaceUsage.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenNamespaceUsageDTOFromJSON)); - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/usage - * 查询namespace使用情况(new added) - */ - async findNamespaceUsage(requestParameters: FindNamespaceUsageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.findNamespaceUsageRaw(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; - } - - if (requestParameters.extendInfo !== undefined) { - queryParameters['extendInfo'] = requestParameters.extendInfo; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/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) => jsonValue.map(OpenNamespaceDTOFromJSON)); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces - * 获取指定集群下的所有Namespace (original openapi) - */ - async findNamespaces(requestParameters: FindNamespacesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.findNamespacesRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace - * 查询关联Namespace对应的公共Namespace详情 (new added) - */ - async findPublicNamespaceForAssociatedNamespaceRaw(requestParameters: FindPublicNamespaceForAssociatedNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findPublicNamespaceForAssociatedNamespace.'); - } - - if (requestParameters.appId === null || requestParameters.appId === undefined) { - throw new runtime.RequiredError('appId','Required parameter requestParameters.appId was null or undefined when calling findPublicNamespaceForAssociatedNamespace.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findPublicNamespaceForAssociatedNamespace.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findPublicNamespaceForAssociatedNamespace.'); - } - - const queryParameters: any = {}; - - if (requestParameters.extendInfo !== undefined) { - queryParameters['extendInfo'] = requestParameters.extendInfo; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/associated-public-namespace - * 查询关联Namespace对应的公共Namespace详情 (new added) - */ - async findPublicNamespaceForAssociatedNamespace(requestParameters: FindPublicNamespaceForAssociatedNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.findPublicNamespaceForAssociatedNamespaceRaw(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 = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/namespaces/releases/status`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/apps/{appId}/namespaces/releases/status - * 获取应用下所有Namespace的发布状态 (new added) - */ - async getNamespacesReleaseStatus(requestParameters: GetNamespacesReleaseStatusRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: { [key: string]: boolean; }; }> { - const response = await this.getNamespacesReleaseStatusRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript/src/apis/OrganizationManagementApi.ts b/typescript/src/apis/OrganizationManagementApi.ts deleted file mode 100644 index 6ac458a1..00000000 --- a/typescript/src/apis/OrganizationManagementApi.ts +++ /dev/null @@ -1,64 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - ExceptionResponse, - OpenOrganizationDto, -} from '../models'; -import { - ExceptionResponseFromJSON, - ExceptionResponseToJSON, - OpenOrganizationDtoFromJSON, - OpenOrganizationDtoToJSON, -} from '../models'; - -/** - * - */ -export class OrganizationManagementApi extends runtime.BaseAPI { - - /** - * GET /openapi/v1/organizations - * 获取所有组织信息 (original openapi) - */ - async getOrganizationRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/organizations`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenOrganizationDtoFromJSON)); - } - - /** - * GET /openapi/v1/organizations - * 获取所有组织信息 (original openapi) - */ - async getOrganization(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getOrganizationRaw(initOverrides); - return await response.value(); - } - -} diff --git a/typescript/src/apis/PermissionManagementApi.ts b/typescript/src/apis/PermissionManagementApi.ts deleted file mode 100644 index 3fb2a593..00000000 --- a/typescript/src/apis/PermissionManagementApi.ts +++ /dev/null @@ -1,1437 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - OpenAppRoleUserDTO, - OpenClusterNamespaceRoleUserDTO, - OpenEnvNamespaceRoleUserDTO, - OpenNamespaceRoleUserDTO, - OpenPermissionConditionDTO, -} from '../models'; -import { - OpenAppRoleUserDTOFromJSON, - OpenAppRoleUserDTOToJSON, - OpenClusterNamespaceRoleUserDTOFromJSON, - OpenClusterNamespaceRoleUserDTOToJSON, - OpenEnvNamespaceRoleUserDTOFromJSON, - OpenEnvNamespaceRoleUserDTOToJSON, - OpenNamespaceRoleUserDTOFromJSON, - OpenNamespaceRoleUserDTOToJSON, - OpenPermissionConditionDTOFromJSON, - OpenPermissionConditionDTOToJSON, -} from '../models'; - -export interface AddCreateApplicationRoleToUsersRequest { - operator?: string; - requestBody?: Array; -} - -export interface AddManageAppMasterRoleToUserRequest { - appId: string; - userId: string; - operator?: string; -} - -export interface AssignAppRoleToUserRequest { - appId: string; - roleType: string; - userId: string; - operator?: string; - body?: string; -} - -export interface AssignClusterNamespaceRoleToUserRequest { - appId: string; - env: string; - clusterName: string; - roleType: string; - userId: string; - operator?: string; -} - -export interface AssignNamespaceEnvRoleToUserRequest { - appId: string; - env: string; - namespaceName: string; - roleType: string; - userId: string; - operator?: string; -} - -export interface AssignNamespaceRoleToUserRequest { - appId: string; - namespaceName: string; - roleType: string; - userId: string; - operator?: string; -} - -export interface DeleteCreateApplicationRoleFromUserRequest { - userId: string; - operator?: string; -} - -export interface GetAppRolesRequest { - appId: string; -} - -export interface GetClusterNamespaceRolesRequest { - appId: string; - env: string; - clusterName: string; -} - -export interface GetNamespaceEnvRoleUsersRequest { - appId: string; - env: string; - namespaceName: string; -} - -export interface GetNamespaceRolesRequest { - appId: string; - namespaceName: string; -} - -export interface HasAppPermissionRequest { - appId: string; - permissionType: string; - userId: string; -} - -export interface HasClusterNamespacePermissionRequest { - appId: string; - env: string; - clusterName: string; - permissionType: string; - userId: string; -} - -export interface HasCreateApplicationPermissionRequest { - userId: string; -} - -export interface HasEnvNamespacePermissionRequest { - appId: string; - env: string; - namespaceName: string; - permissionType: string; - userId: string; -} - -export interface HasNamespacePermissionRequest { - appId: string; - namespaceName: string; - permissionType: string; - userId: string; -} - -export interface HasRootPermissionRequest { - userId: string; -} - -export interface InitAppPermissionRequest { - appId: string; - namespaceName: string; - operator?: string; -} - -export interface InitClusterNamespacePermissionRequest { - appId: string; - env: string; - clusterName: string; - operator?: string; -} - -export interface RemoveAppRoleFromUserRequest { - appId: string; - roleType: string; - userId: string; - operator?: string; -} - -export interface RemoveClusterNamespaceRoleFromUserRequest { - appId: string; - env: string; - clusterName: string; - roleType: string; - userId: string; - operator?: string; -} - -export interface RemoveManageAppMasterRoleFromUserRequest { - appId: string; - userId: string; - operator?: string; -} - -export interface RemoveNamespaceEnvRoleFromUserRequest { - appId: string; - env: string; - namespaceName: string; - roleType: string; - userId: string; - operator?: string; -} - -export interface RemoveNamespaceRoleFromUserRequest { - appId: string; - namespaceName: string; - roleType: string; - userId: string; - operator?: string; -} - -/** - * - */ -export class PermissionManagementApi extends runtime.BaseAPI { - - /** - * - * 分配建应用角色 (new added) - */ - async addCreateApplicationRoleToUsersRaw(requestParameters: AddCreateApplicationRoleToUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/system/roles/create-application`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters.requestBody, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * - * 分配建应用角色 (new added) - */ - async addCreateApplicationRoleToUsers(requestParameters: AddCreateApplicationRoleToUsersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.addCreateApplicationRoleToUsersRaw(requestParameters, initOverrides); - } - - /** - * - * 分配AppMaster (new added) - */ - async addManageAppMasterRoleToUserRaw(requestParameters: AddManageAppMasterRoleToUserRequest, 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 addManageAppMasterRoleToUser.'); - } - - if (requestParameters.userId === null || requestParameters.userId === undefined) { - throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling addManageAppMasterRoleToUser.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - if (requestParameters.userId !== undefined) { - queryParameters['userId'] = requestParameters.userId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/roles/master`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * - * 分配AppMaster (new added) - */ - async addManageAppMasterRoleToUser(requestParameters: AddManageAppMasterRoleToUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.addManageAppMasterRoleToUserRaw(requestParameters, initOverrides); - } - - /** - * - * 分配应用角色 (new added) - */ - async assignAppRoleToUserRaw(requestParameters: AssignAppRoleToUserRequest, 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 assignAppRoleToUser.'); - } - - if (requestParameters.roleType === null || requestParameters.roleType === undefined) { - throw new runtime.RequiredError('roleType','Required parameter requestParameters.roleType was null or undefined when calling assignAppRoleToUser.'); - } - - if (requestParameters.userId === null || requestParameters.userId === undefined) { - throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling assignAppRoleToUser.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - if (requestParameters.userId !== undefined) { - queryParameters['userId'] = requestParameters.userId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/roles/{roleType}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"roleType"}}`, encodeURIComponent(String(requestParameters.roleType))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters.body as any, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * - * 分配应用角色 (new added) - */ - async assignAppRoleToUser(requestParameters: AssignAppRoleToUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.assignAppRoleToUserRaw(requestParameters, initOverrides); - } - - /** - * - * 分配集群Namespace角色 (new added) - */ - async assignClusterNamespaceRoleToUserRaw(requestParameters: AssignClusterNamespaceRoleToUserRequest, 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 assignClusterNamespaceRoleToUser.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling assignClusterNamespaceRoleToUser.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling assignClusterNamespaceRoleToUser.'); - } - - if (requestParameters.roleType === null || requestParameters.roleType === undefined) { - throw new runtime.RequiredError('roleType','Required parameter requestParameters.roleType was null or undefined when calling assignClusterNamespaceRoleToUser.'); - } - - if (requestParameters.userId === null || requestParameters.userId === undefined) { - throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling assignClusterNamespaceRoleToUser.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - if (requestParameters.userId !== undefined) { - queryParameters['userId'] = requestParameters.userId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/roles/{roleType}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"roleType"}}`, encodeURIComponent(String(requestParameters.roleType))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * - * 分配集群Namespace角色 (new added) - */ - async assignClusterNamespaceRoleToUser(requestParameters: AssignClusterNamespaceRoleToUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.assignClusterNamespaceRoleToUserRaw(requestParameters, initOverrides); - } - - /** - * - * 分配环境Namespace角色 (new added) - */ - async assignNamespaceEnvRoleToUserRaw(requestParameters: AssignNamespaceEnvRoleToUserRequest, 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 assignNamespaceEnvRoleToUser.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling assignNamespaceEnvRoleToUser.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling assignNamespaceEnvRoleToUser.'); - } - - if (requestParameters.roleType === null || requestParameters.roleType === undefined) { - throw new runtime.RequiredError('roleType','Required parameter requestParameters.roleType was null or undefined when calling assignNamespaceEnvRoleToUser.'); - } - - if (requestParameters.userId === null || requestParameters.userId === undefined) { - throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling assignNamespaceEnvRoleToUser.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - if (requestParameters.userId !== undefined) { - queryParameters['userId'] = requestParameters.userId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"roleType"}}`, encodeURIComponent(String(requestParameters.roleType))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * - * 分配环境Namespace角色 (new added) - */ - async assignNamespaceEnvRoleToUser(requestParameters: AssignNamespaceEnvRoleToUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.assignNamespaceEnvRoleToUserRaw(requestParameters, initOverrides); - } - - /** - * - * 分配Namespace角色 (new added) - */ - async assignNamespaceRoleToUserRaw(requestParameters: AssignNamespaceRoleToUserRequest, 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 assignNamespaceRoleToUser.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling assignNamespaceRoleToUser.'); - } - - if (requestParameters.roleType === null || requestParameters.roleType === undefined) { - throw new runtime.RequiredError('roleType','Required parameter requestParameters.roleType was null or undefined when calling assignNamespaceRoleToUser.'); - } - - if (requestParameters.userId === null || requestParameters.userId === undefined) { - throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling assignNamespaceRoleToUser.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - if (requestParameters.userId !== undefined) { - queryParameters['userId'] = requestParameters.userId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/namespaces/{namespaceName}/roles/{roleType}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"roleType"}}`, encodeURIComponent(String(requestParameters.roleType))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * - * 分配Namespace角色 (new added) - */ - async assignNamespaceRoleToUser(requestParameters: AssignNamespaceRoleToUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.assignNamespaceRoleToUserRaw(requestParameters, initOverrides); - } - - /** - * - * 移除建应用角色 (new added) - */ - async deleteCreateApplicationRoleFromUserRaw(requestParameters: DeleteCreateApplicationRoleFromUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.userId === null || requestParameters.userId === undefined) { - throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling deleteCreateApplicationRoleFromUser.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - if (requestParameters.userId !== undefined) { - queryParameters['userId'] = requestParameters.userId; - } - - 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/system/roles/create-application`, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * - * 移除建应用角色 (new added) - */ - async deleteCreateApplicationRoleFromUser(requestParameters: DeleteCreateApplicationRoleFromUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteCreateApplicationRoleFromUserRaw(requestParameters, initOverrides); - } - - /** - * - * 获取应用角色用户 (new added) - */ - async getAppRolesRaw(requestParameters: GetAppRolesRequest, 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 getAppRoles.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/role-users`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenAppRoleUserDTOFromJSON(jsonValue)); - } - - /** - * - * 获取应用角色用户 (new added) - */ - async getAppRoles(requestParameters: GetAppRolesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getAppRolesRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 获取集群Namespace用户 (new added) - */ - async getClusterNamespaceRolesRaw(requestParameters: GetClusterNamespaceRolesRequest, 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 getClusterNamespaceRoles.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getClusterNamespaceRoles.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling getClusterNamespaceRoles.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/role-users`.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) => OpenClusterNamespaceRoleUserDTOFromJSON(jsonValue)); - } - - /** - * - * 获取集群Namespace用户 (new added) - */ - async getClusterNamespaceRoles(requestParameters: GetClusterNamespaceRolesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getClusterNamespaceRolesRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 获取建应用用户 (new added) - */ - async getCreateApplicationRoleUsersRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/system/roles/create-application/role-users`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * - * 获取建应用用户 (new added) - */ - async getCreateApplicationRoleUsers(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getCreateApplicationRoleUsersRaw(initOverrides); - return await response.value(); - } - - /** - * - * 获取环境Namespace用户 (new added) - */ - async getNamespaceEnvRoleUsersRaw(requestParameters: GetNamespaceEnvRoleUsersRequest, 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 getNamespaceEnvRoleUsers.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling getNamespaceEnvRoleUsers.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getNamespaceEnvRoleUsers.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/role-users`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenEnvNamespaceRoleUserDTOFromJSON(jsonValue)); - } - - /** - * - * 获取环境Namespace用户 (new added) - */ - async getNamespaceEnvRoleUsers(requestParameters: GetNamespaceEnvRoleUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getNamespaceEnvRoleUsersRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 获取Namespace用户 (new added) - */ - async getNamespaceRolesRaw(requestParameters: GetNamespaceRolesRequest, 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 getNamespaceRoles.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling getNamespaceRoles.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/namespaces/{namespaceName}/role-users`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenNamespaceRoleUserDTOFromJSON(jsonValue)); - } - - /** - * - * 获取Namespace用户 (new added) - */ - async getNamespaceRoles(requestParameters: GetNamespaceRolesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getNamespaceRolesRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 校验应用权限 (new added) - */ - async hasAppPermissionRaw(requestParameters: HasAppPermissionRequest, 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 hasAppPermission.'); - } - - if (requestParameters.permissionType === null || requestParameters.permissionType === undefined) { - throw new runtime.RequiredError('permissionType','Required parameter requestParameters.permissionType was null or undefined when calling hasAppPermission.'); - } - - if (requestParameters.userId === null || requestParameters.userId === undefined) { - throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling hasAppPermission.'); - } - - const queryParameters: any = {}; - - if (requestParameters.userId !== undefined) { - queryParameters['userId'] = requestParameters.userId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/permissions/{permissionType}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"permissionType"}}`, encodeURIComponent(String(requestParameters.permissionType))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenPermissionConditionDTOFromJSON(jsonValue)); - } - - /** - * - * 校验应用权限 (new added) - */ - async hasAppPermission(requestParameters: HasAppPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.hasAppPermissionRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 校验集群Namespace权限 (new added) - */ - async hasClusterNamespacePermissionRaw(requestParameters: HasClusterNamespacePermissionRequest, 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 hasClusterNamespacePermission.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling hasClusterNamespacePermission.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling hasClusterNamespacePermission.'); - } - - if (requestParameters.permissionType === null || requestParameters.permissionType === undefined) { - throw new runtime.RequiredError('permissionType','Required parameter requestParameters.permissionType was null or undefined when calling hasClusterNamespacePermission.'); - } - - if (requestParameters.userId === null || requestParameters.userId === undefined) { - throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling hasClusterNamespacePermission.'); - } - - const queryParameters: any = {}; - - if (requestParameters.userId !== undefined) { - queryParameters['userId'] = requestParameters.userId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permissions/{permissionType}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"permissionType"}}`, encodeURIComponent(String(requestParameters.permissionType))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenPermissionConditionDTOFromJSON(jsonValue)); - } - - /** - * - * 校验集群Namespace权限 (new added) - */ - async hasClusterNamespacePermission(requestParameters: HasClusterNamespacePermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.hasClusterNamespacePermissionRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 校验建应用权限 (new added) - */ - async hasCreateApplicationPermissionRaw(requestParameters: HasCreateApplicationPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.userId === null || requestParameters.userId === undefined) { - throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling hasCreateApplicationPermission.'); - } - - const queryParameters: any = {}; - - if (requestParameters.userId !== undefined) { - queryParameters['userId'] = requestParameters.userId; - } - - 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/system/roles/create-application`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * - * 校验建应用权限 (new added) - */ - async hasCreateApplicationPermission(requestParameters: HasCreateApplicationPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: boolean; }> { - const response = await this.hasCreateApplicationPermissionRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 校验环境Namespace权限 (new added) - */ - async hasEnvNamespacePermissionRaw(requestParameters: HasEnvNamespacePermissionRequest, 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 hasEnvNamespacePermission.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling hasEnvNamespacePermission.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling hasEnvNamespacePermission.'); - } - - if (requestParameters.permissionType === null || requestParameters.permissionType === undefined) { - throw new runtime.RequiredError('permissionType','Required parameter requestParameters.permissionType was null or undefined when calling hasEnvNamespacePermission.'); - } - - if (requestParameters.userId === null || requestParameters.userId === undefined) { - throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling hasEnvNamespacePermission.'); - } - - const queryParameters: any = {}; - - if (requestParameters.userId !== undefined) { - queryParameters['userId'] = requestParameters.userId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/permissions/{permissionType}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"permissionType"}}`, encodeURIComponent(String(requestParameters.permissionType))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenPermissionConditionDTOFromJSON(jsonValue)); - } - - /** - * - * 校验环境Namespace权限 (new added) - */ - async hasEnvNamespacePermission(requestParameters: HasEnvNamespacePermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.hasEnvNamespacePermissionRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 校验Namespace权限 (new added) - */ - async hasNamespacePermissionRaw(requestParameters: HasNamespacePermissionRequest, 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 hasNamespacePermission.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling hasNamespacePermission.'); - } - - if (requestParameters.permissionType === null || requestParameters.permissionType === undefined) { - throw new runtime.RequiredError('permissionType','Required parameter requestParameters.permissionType was null or undefined when calling hasNamespacePermission.'); - } - - if (requestParameters.userId === null || requestParameters.userId === undefined) { - throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling hasNamespacePermission.'); - } - - const queryParameters: any = {}; - - if (requestParameters.userId !== undefined) { - queryParameters['userId'] = requestParameters.userId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/namespaces/{namespaceName}/permissions/{permissionType}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"permissionType"}}`, encodeURIComponent(String(requestParameters.permissionType))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenPermissionConditionDTOFromJSON(jsonValue)); - } - - /** - * - * 校验Namespace权限 (new added) - */ - async hasNamespacePermission(requestParameters: HasNamespacePermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.hasNamespacePermissionRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 校验Root权限 (new added) - */ - async hasRootPermissionRaw(requestParameters: HasRootPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.userId === null || requestParameters.userId === undefined) { - throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling hasRootPermission.'); - } - - const queryParameters: any = {}; - - if (requestParameters.userId !== undefined) { - queryParameters['userId'] = requestParameters.userId; - } - - 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/permissions/root`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenPermissionConditionDTOFromJSON(jsonValue)); - } - - /** - * - * 校验Root权限 (new added) - */ - async hasRootPermission(requestParameters: HasRootPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.hasRootPermissionRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 初始化应用权限 (new added) - */ - async initAppPermissionRaw(requestParameters: InitAppPermissionRequest, 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 initAppPermission.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling initAppPermission.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/namespaces/{namespaceName}/permission-init`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * - * 初始化应用权限 (new added) - */ - async initAppPermission(requestParameters: InitAppPermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.initAppPermissionRaw(requestParameters, initOverrides); - } - - /** - * - * 初始化集群Namespace权限 (new added) - */ - async initClusterNamespacePermissionRaw(requestParameters: InitClusterNamespacePermissionRequest, 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 initClusterNamespacePermission.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling initClusterNamespacePermission.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling initClusterNamespacePermission.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/permission-init`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * - * 初始化集群Namespace权限 (new added) - */ - async initClusterNamespacePermission(requestParameters: InitClusterNamespacePermissionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.initClusterNamespacePermissionRaw(requestParameters, initOverrides); - } - - /** - * - * 校验AppMaster开关 (new added) - */ - async isManageAppMasterPermissionEnabledRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/system/role/manage-app-master`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * - * 校验AppMaster开关 (new added) - */ - async isManageAppMasterPermissionEnabled(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: boolean; }> { - const response = await this.isManageAppMasterPermissionEnabledRaw(initOverrides); - return await response.value(); - } - - /** - * - * 移除应用角色 (new added) - */ - async removeAppRoleFromUserRaw(requestParameters: RemoveAppRoleFromUserRequest, 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 removeAppRoleFromUser.'); - } - - if (requestParameters.roleType === null || requestParameters.roleType === undefined) { - throw new runtime.RequiredError('roleType','Required parameter requestParameters.roleType was null or undefined when calling removeAppRoleFromUser.'); - } - - if (requestParameters.userId === null || requestParameters.userId === undefined) { - throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling removeAppRoleFromUser.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - if (requestParameters.userId !== undefined) { - queryParameters['userId'] = requestParameters.userId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/roles/{roleType}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"roleType"}}`, encodeURIComponent(String(requestParameters.roleType))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * - * 移除应用角色 (new added) - */ - async removeAppRoleFromUser(requestParameters: RemoveAppRoleFromUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.removeAppRoleFromUserRaw(requestParameters, initOverrides); - } - - /** - * - * 移除集群Namespace角色 (new added) - */ - async removeClusterNamespaceRoleFromUserRaw(requestParameters: RemoveClusterNamespaceRoleFromUserRequest, 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 removeClusterNamespaceRoleFromUser.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling removeClusterNamespaceRoleFromUser.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling removeClusterNamespaceRoleFromUser.'); - } - - if (requestParameters.roleType === null || requestParameters.roleType === undefined) { - throw new runtime.RequiredError('roleType','Required parameter requestParameters.roleType was null or undefined when calling removeClusterNamespaceRoleFromUser.'); - } - - if (requestParameters.userId === null || requestParameters.userId === undefined) { - throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling removeClusterNamespaceRoleFromUser.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - if (requestParameters.userId !== undefined) { - queryParameters['userId'] = requestParameters.userId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/roles/{roleType}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))).replace(`{${"roleType"}}`, encodeURIComponent(String(requestParameters.roleType))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * - * 移除集群Namespace角色 (new added) - */ - async removeClusterNamespaceRoleFromUser(requestParameters: RemoveClusterNamespaceRoleFromUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.removeClusterNamespaceRoleFromUserRaw(requestParameters, initOverrides); - } - - /** - * - * 移除AppMaster (new added) - */ - async removeManageAppMasterRoleFromUserRaw(requestParameters: RemoveManageAppMasterRoleFromUserRequest, 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 removeManageAppMasterRoleFromUser.'); - } - - if (requestParameters.userId === null || requestParameters.userId === undefined) { - throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling removeManageAppMasterRoleFromUser.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - if (requestParameters.userId !== undefined) { - queryParameters['userId'] = requestParameters.userId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/roles/master`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * - * 移除AppMaster (new added) - */ - async removeManageAppMasterRoleFromUser(requestParameters: RemoveManageAppMasterRoleFromUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.removeManageAppMasterRoleFromUserRaw(requestParameters, initOverrides); - } - - /** - * - * 移除环境Namespace角色 (new added) - */ - async removeNamespaceEnvRoleFromUserRaw(requestParameters: RemoveNamespaceEnvRoleFromUserRequest, 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 removeNamespaceEnvRoleFromUser.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling removeNamespaceEnvRoleFromUser.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling removeNamespaceEnvRoleFromUser.'); - } - - if (requestParameters.roleType === null || requestParameters.roleType === undefined) { - throw new runtime.RequiredError('roleType','Required parameter requestParameters.roleType was null or undefined when calling removeNamespaceEnvRoleFromUser.'); - } - - if (requestParameters.userId === null || requestParameters.userId === undefined) { - throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling removeNamespaceEnvRoleFromUser.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - if (requestParameters.userId !== undefined) { - queryParameters['userId'] = requestParameters.userId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/namespaces/{namespaceName}/roles/{roleType}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"roleType"}}`, encodeURIComponent(String(requestParameters.roleType))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * - * 移除环境Namespace角色 (new added) - */ - async removeNamespaceEnvRoleFromUser(requestParameters: RemoveNamespaceEnvRoleFromUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.removeNamespaceEnvRoleFromUserRaw(requestParameters, initOverrides); - } - - /** - * - * 移除Namespace角色 (new added) - */ - async removeNamespaceRoleFromUserRaw(requestParameters: RemoveNamespaceRoleFromUserRequest, 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 removeNamespaceRoleFromUser.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling removeNamespaceRoleFromUser.'); - } - - if (requestParameters.roleType === null || requestParameters.roleType === undefined) { - throw new runtime.RequiredError('roleType','Required parameter requestParameters.roleType was null or undefined when calling removeNamespaceRoleFromUser.'); - } - - if (requestParameters.userId === null || requestParameters.userId === undefined) { - throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling removeNamespaceRoleFromUser.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - if (requestParameters.userId !== undefined) { - queryParameters['userId'] = requestParameters.userId; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/namespaces/{namespaceName}/roles/{roleType}`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"namespaceName"}}`, encodeURIComponent(String(requestParameters.namespaceName))).replace(`{${"roleType"}}`, encodeURIComponent(String(requestParameters.roleType))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * - * 移除Namespace角色 (new added) - */ - async removeNamespaceRoleFromUser(requestParameters: RemoveNamespaceRoleFromUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.removeNamespaceRoleFromUserRaw(requestParameters, initOverrides); - } - -} diff --git a/typescript/src/apis/PortalManagementApi.ts b/typescript/src/apis/PortalManagementApi.ts deleted file mode 100644 index 3cfbf916..00000000 --- a/typescript/src/apis/PortalManagementApi.ts +++ /dev/null @@ -1,1842 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; - -export interface AddFavoriteRequest { - body: object; -} - -export interface AssignRoleToConsumerRequest { - token: string; - type: string; - body: object; - envs?: string; -} - -export interface CheckExportAppConfigRequest { - appId: string; - env: string; - clusterName: string; -} - -export interface CheckSystemHealthRequest { - instanceId: string; -} - -export interface CreateConsumerRequest { - body: object; - expires?: string; -} - -export interface CreateOrUpdateConfigDBConfigRequest { - env: string; - body: object; -} - -export interface CreateOrUpdatePortalDBConfigRequest { - body: object; -} - -export interface DeleteConfigDBConfigRequest { - env: string; - key: string; - cluster: string; -} - -export interface DeleteConsumerRequest { - appId: string; -} - -export interface DeleteFavoriteRequest { - favoriteId: number; -} - -export interface DeletePortalDBConfigRequest { - key: string; -} - -export interface ExportAllConfigsRequest { - envs: string; -} - -export interface ExportAppConfigRequest { - appId: string; - env: string; - clusterName: string; -} - -export interface ExportNamespaceItemsRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; -} - -export interface FindAllConfigDBConfigRequest { - env: string; -} - -export interface FindAuditDataInfluencesByFieldRequest { - entityName: string; - entityId: string; - fieldName: string; - page?: number; - size?: number; -} - -export interface FindAuditLogsRequest { - page?: number; - size?: number; -} - -export interface FindAuditLogsByOpNameRequest { - opName: string; - page?: number; - size?: number; - startDate?: string; - endDate?: string; -} - -export interface FindAuditTraceDetailsRequest { - traceId: string; -} - -export interface FindCommitsRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - key?: string; - page?: number; - size?: number; -} - -export interface FindFavoritesRequest { - userId?: string; - appId?: string; - page?: number; - size?: number; -} - -export interface FindReleaseHistoriesByNamespaceRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - page?: number; - size?: number; -} - -export interface GetConsumerListRequest { - page?: number; - size?: number; -} - -export interface GetConsumerTokenByAppIdRequest { - appId: string; -} - -export interface ImportAllConfigsRequest { - envs: string; - conflictAction?: string; - file?: Blob; -} - -export interface ImportAppConfigRequest { - appId: string; - env: string; - clusterName: string; - conflictAction?: string; - file?: Blob; -} - -export interface ImportConfigRequest { - envs: string; - conflictAction?: string; - file?: Blob; -} - -export interface ImportNamespaceItemsRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - file?: Blob; -} - -export interface SearchAppsByAppIdOrNameRequest { - query?: string; - page?: number; - size?: number; -} - -export interface SearchAuditLogsRequest { - query: string; - page?: number; - size?: number; -} - -export interface SearchItemInfoByKeyOrValueRequest { - key?: string; - value?: string; -} - -export interface TopFavoriteRequest { - favoriteId: number; -} - -/** - * - */ -export class PortalManagementApi extends runtime.BaseAPI { - - /** - * POST /openapi/v1/favorites - * 添加收藏(new added) - */ - async addFavoriteRaw(requestParameters: AddFavoriteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling addFavorite.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/favorites`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters.body as any, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * POST /openapi/v1/favorites - * 添加收藏(new added) - */ - async addFavorite(requestParameters: AddFavoriteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.addFavoriteRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * POST /openapi/v1/consumers/{token}/assign-role - * 给消费者授权(new added) - */ - async assignRoleToConsumerRaw(requestParameters: AssignRoleToConsumerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters.token === null || requestParameters.token === undefined) { - throw new runtime.RequiredError('token','Required parameter requestParameters.token was null or undefined when calling assignRoleToConsumer.'); - } - - if (requestParameters.type === null || requestParameters.type === undefined) { - throw new runtime.RequiredError('type','Required parameter requestParameters.type was null or undefined when calling assignRoleToConsumer.'); - } - - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling assignRoleToConsumer.'); - } - - const queryParameters: any = {}; - - if (requestParameters.type !== undefined) { - queryParameters['type'] = requestParameters.type; - } - - if (requestParameters.envs !== undefined) { - queryParameters['envs'] = requestParameters.envs; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/consumers/{token}/assign-role`.replace(`{${"token"}}`, encodeURIComponent(String(requestParameters.token))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters.body as any, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * POST /openapi/v1/consumers/{token}/assign-role - * 给消费者授权(new added) - */ - async assignRoleToConsumer(requestParameters: AssignRoleToConsumerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.assignRoleToConsumerRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * HEAD /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export - * 检查应用配置导出权限(new added) - */ - async checkExportAppConfigRaw(requestParameters: CheckExportAppConfigRequest, 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 checkExportAppConfig.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling checkExportAppConfig.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling checkExportAppConfig.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))), - method: 'HEAD', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * HEAD /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export - * 检查应用配置导出权限(new added) - */ - async checkExportAppConfig(requestParameters: CheckExportAppConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.checkExportAppConfigRaw(requestParameters, initOverrides); - } - - /** - * GET /openapi/v1/system-info/health - * 检查系统实例健康状态(new added) - */ - async checkSystemHealthRaw(requestParameters: CheckSystemHealthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.instanceId === null || requestParameters.instanceId === undefined) { - throw new runtime.RequiredError('instanceId','Required parameter requestParameters.instanceId was null or undefined when calling checkSystemHealth.'); - } - - const queryParameters: any = {}; - - if (requestParameters.instanceId !== undefined) { - queryParameters['instanceId'] = requestParameters.instanceId; - } - - 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/system-info/health`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/system-info/health - * 检查系统实例健康状态(new added) - */ - async checkSystemHealth(requestParameters: CheckSystemHealthRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.checkSystemHealthRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * POST /openapi/v1/consumers - * 创建开放平台消费者(new added) - */ - async createConsumerRaw(requestParameters: CreateConsumerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createConsumer.'); - } - - const queryParameters: any = {}; - - if (requestParameters.expires !== undefined) { - queryParameters['expires'] = requestParameters.expires; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/consumers`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters.body as any, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * POST /openapi/v1/consumers - * 创建开放平台消费者(new added) - */ - async createConsumer(requestParameters: CreateConsumerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createConsumerRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * POST /openapi/v1/server/envs/{env}/config-db/config - * 创建或更新Config DB配置(new added) - */ - async createOrUpdateConfigDBConfigRaw(requestParameters: CreateOrUpdateConfigDBConfigRequest, 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 createOrUpdateConfigDBConfig.'); - } - - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createOrUpdateConfigDBConfig.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/server/envs/{env}/config-db/config`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters.body as any, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * POST /openapi/v1/server/envs/{env}/config-db/config - * 创建或更新Config DB配置(new added) - */ - async createOrUpdateConfigDBConfig(requestParameters: CreateOrUpdateConfigDBConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createOrUpdateConfigDBConfigRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * POST /openapi/v1/server/portal-db/config - * 创建或更新Portal DB配置(new added) - */ - async createOrUpdatePortalDBConfigRaw(requestParameters: CreateOrUpdatePortalDBConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.body === null || requestParameters.body === undefined) { - throw new runtime.RequiredError('body','Required parameter requestParameters.body was null or undefined when calling createOrUpdatePortalDBConfig.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/server/portal-db/config`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: requestParameters.body as any, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * POST /openapi/v1/server/portal-db/config - * 创建或更新Portal DB配置(new added) - */ - async createOrUpdatePortalDBConfig(requestParameters: CreateOrUpdatePortalDBConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createOrUpdatePortalDBConfigRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * DELETE /openapi/v1/server/envs/{env}/config-db/config - * 删除Config DB配置(new added) - */ - async deleteConfigDBConfigRaw(requestParameters: DeleteConfigDBConfigRequest, 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 deleteConfigDBConfig.'); - } - - if (requestParameters.key === null || requestParameters.key === undefined) { - throw new runtime.RequiredError('key','Required parameter requestParameters.key was null or undefined when calling deleteConfigDBConfig.'); - } - - if (requestParameters.cluster === null || requestParameters.cluster === undefined) { - throw new runtime.RequiredError('cluster','Required parameter requestParameters.cluster was null or undefined when calling deleteConfigDBConfig.'); - } - - const queryParameters: any = {}; - - if (requestParameters.key !== undefined) { - queryParameters['key'] = requestParameters.key; - } - - if (requestParameters.cluster !== undefined) { - queryParameters['cluster'] = requestParameters.cluster; - } - - 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/server/envs/{env}/config-db/config`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * DELETE /openapi/v1/server/envs/{env}/config-db/config - * 删除Config DB配置(new added) - */ - async deleteConfigDBConfig(requestParameters: DeleteConfigDBConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteConfigDBConfigRaw(requestParameters, initOverrides); - } - - /** - * DELETE /openapi/v1/consumers/by-appId - * 按应用ID删除消费者(new added) - */ - async deleteConsumerRaw(requestParameters: DeleteConsumerRequest, 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 deleteConsumer.'); - } - - const queryParameters: any = {}; - - if (requestParameters.appId !== undefined) { - queryParameters['appId'] = requestParameters.appId; - } - - 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/consumers/by-appId`, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * DELETE /openapi/v1/consumers/by-appId - * 按应用ID删除消费者(new added) - */ - async deleteConsumer(requestParameters: DeleteConsumerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteConsumerRaw(requestParameters, initOverrides); - } - - /** - * DELETE /openapi/v1/favorites/{favoriteId} - * 删除收藏(new added) - */ - async deleteFavoriteRaw(requestParameters: DeleteFavoriteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.favoriteId === null || requestParameters.favoriteId === undefined) { - throw new runtime.RequiredError('favoriteId','Required parameter requestParameters.favoriteId was null or undefined when calling deleteFavorite.'); - } - - 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/favorites/{favoriteId}`.replace(`{${"favoriteId"}}`, encodeURIComponent(String(requestParameters.favoriteId))), - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * DELETE /openapi/v1/favorites/{favoriteId} - * 删除收藏(new added) - */ - async deleteFavorite(requestParameters: DeleteFavoriteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deleteFavoriteRaw(requestParameters, initOverrides); - } - - /** - * DELETE /openapi/v1/server/portal-db/config - * 删除Portal DB配置(new added) - */ - async deletePortalDBConfigRaw(requestParameters: DeletePortalDBConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.key === null || requestParameters.key === undefined) { - throw new runtime.RequiredError('key','Required parameter requestParameters.key was null or undefined when calling deletePortalDBConfig.'); - } - - const queryParameters: any = {}; - - if (requestParameters.key !== undefined) { - queryParameters['key'] = requestParameters.key; - } - - 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/server/portal-db/config`, - method: 'DELETE', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * DELETE /openapi/v1/server/portal-db/config - * 删除Portal DB配置(new added) - */ - async deletePortalDBConfig(requestParameters: DeletePortalDBConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.deletePortalDBConfigRaw(requestParameters, initOverrides); - } - - /** - * GET /openapi/v1/configs/export - * 导出所有配置(new added) - */ - async exportAllConfigsRaw(requestParameters: ExportAllConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.envs === null || requestParameters.envs === undefined) { - throw new runtime.RequiredError('envs','Required parameter requestParameters.envs was null or undefined when calling exportAllConfigs.'); - } - - const queryParameters: any = {}; - - if (requestParameters.envs !== undefined) { - queryParameters['envs'] = requestParameters.envs; - } - - 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/configs/export`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.BlobApiResponse(response); - } - - /** - * GET /openapi/v1/configs/export - * 导出所有配置(new added) - */ - async exportAllConfigs(requestParameters: ExportAllConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.exportAllConfigsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export - * 导出应用配置(new added) - */ - async exportAppConfigRaw(requestParameters: ExportAppConfigRequest, 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 exportAppConfig.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling exportAppConfig.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling exportAppConfig.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export`.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.BlobApiResponse(response); - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/export - * 导出应用配置(new added) - */ - async exportAppConfig(requestParameters: ExportAppConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.exportAppConfigRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export - * 导出命名空间配置项(new added) - */ - async exportNamespaceItemsRaw(requestParameters: ExportNamespaceItemsRequest, 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 exportNamespaceItems.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling exportNamespaceItems.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling exportNamespaceItems.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling exportNamespaceItems.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export`.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.BlobApiResponse(response); - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/export - * 导出命名空间配置项(new added) - */ - async exportNamespaceItems(requestParameters: ExportNamespaceItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.exportNamespaceItemsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/server/envs/{env}/config-db/config/find-all-config - * 查询指定环境全部Config DB配置(new added) - */ - async findAllConfigDBConfigRaw(requestParameters: FindAllConfigDBConfigRequest, 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 findAllConfigDBConfig.'); - } - - 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/server/envs/{env}/config-db/config/find-all-config`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/server/envs/{env}/config-db/config/find-all-config - * 查询指定环境全部Config DB配置(new added) - */ - async findAllConfigDBConfig(requestParameters: FindAllConfigDBConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.findAllConfigDBConfigRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/server/portal-db/config/find-all-config - * 查询全部Portal DB配置(new added) - */ - async findAllPortalDBConfigRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/server/portal-db/config/find-all-config`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/server/portal-db/config/find-all-config - * 查询全部Portal DB配置(new added) - */ - async findAllPortalDBConfig(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.findAllPortalDBConfigRaw(initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apollo/audit/logs/dataInfluences/field - * 查询审计数据影响(new added) - */ - async findAuditDataInfluencesByFieldRaw(requestParameters: FindAuditDataInfluencesByFieldRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters.entityName === null || requestParameters.entityName === undefined) { - throw new runtime.RequiredError('entityName','Required parameter requestParameters.entityName was null or undefined when calling findAuditDataInfluencesByField.'); - } - - if (requestParameters.entityId === null || requestParameters.entityId === undefined) { - throw new runtime.RequiredError('entityId','Required parameter requestParameters.entityId was null or undefined when calling findAuditDataInfluencesByField.'); - } - - if (requestParameters.fieldName === null || requestParameters.fieldName === undefined) { - throw new runtime.RequiredError('fieldName','Required parameter requestParameters.fieldName was null or undefined when calling findAuditDataInfluencesByField.'); - } - - const queryParameters: any = {}; - - if (requestParameters.entityName !== undefined) { - queryParameters['entityName'] = requestParameters.entityName; - } - - if (requestParameters.entityId !== undefined) { - queryParameters['entityId'] = requestParameters.entityId; - } - - if (requestParameters.fieldName !== undefined) { - queryParameters['fieldName'] = requestParameters.fieldName; - } - - if (requestParameters.page !== undefined) { - queryParameters['page'] = requestParameters.page; - } - - if (requestParameters.size !== undefined) { - queryParameters['size'] = requestParameters.size; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apollo/audit/logs/dataInfluences/field`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/apollo/audit/logs/dataInfluences/field - * 查询审计数据影响(new added) - */ - async findAuditDataInfluencesByField(requestParameters: FindAuditDataInfluencesByFieldRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.findAuditDataInfluencesByFieldRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apollo/audit/logs - * 查询审计日志(new added) - */ - async findAuditLogsRaw(requestParameters: FindAuditLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters.page !== undefined) { - queryParameters['page'] = requestParameters.page; - } - - if (requestParameters.size !== undefined) { - queryParameters['size'] = requestParameters.size; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apollo/audit/logs`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/apollo/audit/logs - * 查询审计日志(new added) - */ - async findAuditLogs(requestParameters: FindAuditLogsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.findAuditLogsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apollo/audit/logs/opName - * 按操作名查询审计日志(new added) - */ - async findAuditLogsByOpNameRaw(requestParameters: FindAuditLogsByOpNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters.opName === null || requestParameters.opName === undefined) { - throw new runtime.RequiredError('opName','Required parameter requestParameters.opName was null or undefined when calling findAuditLogsByOpName.'); - } - - const queryParameters: any = {}; - - if (requestParameters.opName !== undefined) { - queryParameters['opName'] = requestParameters.opName; - } - - if (requestParameters.page !== undefined) { - queryParameters['page'] = requestParameters.page; - } - - if (requestParameters.size !== undefined) { - queryParameters['size'] = requestParameters.size; - } - - if (requestParameters.startDate !== undefined) { - queryParameters['startDate'] = requestParameters.startDate; - } - - if (requestParameters.endDate !== undefined) { - queryParameters['endDate'] = requestParameters.endDate; - } - - 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/apollo/audit/logs/opName`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/apollo/audit/logs/opName - * 按操作名查询审计日志(new added) - */ - async findAuditLogsByOpName(requestParameters: FindAuditLogsByOpNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.findAuditLogsByOpNameRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apollo/audit/trace - * 查询审计链路详情(new added) - */ - async findAuditTraceDetailsRaw(requestParameters: FindAuditTraceDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters.traceId === null || requestParameters.traceId === undefined) { - throw new runtime.RequiredError('traceId','Required parameter requestParameters.traceId was null or undefined when calling findAuditTraceDetails.'); - } - - const queryParameters: any = {}; - - if (requestParameters.traceId !== undefined) { - queryParameters['traceId'] = requestParameters.traceId; - } - - 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/apollo/audit/trace`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/apollo/audit/trace - * 查询审计链路详情(new added) - */ - async findAuditTraceDetails(requestParameters: FindAuditTraceDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.findAuditTraceDetailsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits - * 查询命名空间提交记录(new added) - */ - async findCommitsRaw(requestParameters: FindCommitsRequest, 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 findCommits.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findCommits.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findCommits.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findCommits.'); - } - - const queryParameters: any = {}; - - if (requestParameters.key !== undefined) { - queryParameters['key'] = requestParameters.key; - } - - if (requestParameters.page !== undefined) { - queryParameters['page'] = requestParameters.page; - } - - if (requestParameters.size !== undefined) { - queryParameters['size'] = requestParameters.size; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits`.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); - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/commits - * 查询命名空间提交记录(new added) - */ - async findCommits(requestParameters: FindCommitsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.findCommitsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/favorites - * 查询收藏(new added) - */ - async findFavoritesRaw(requestParameters: FindFavoritesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters.userId !== undefined) { - queryParameters['userId'] = requestParameters.userId; - } - - if (requestParameters.appId !== undefined) { - queryParameters['appId'] = requestParameters.appId; - } - - if (requestParameters.page !== undefined) { - queryParameters['page'] = requestParameters.page; - } - - if (requestParameters.size !== undefined) { - queryParameters['size'] = requestParameters.size; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/favorites`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/favorites - * 查询收藏(new added) - */ - async findFavorites(requestParameters: FindFavoritesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.findFavoritesRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories - * 查询命名空间发布历史(new added) - */ - async findReleaseHistoriesByNamespaceRaw(requestParameters: FindReleaseHistoriesByNamespaceRequest, 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 findReleaseHistoriesByNamespace.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findReleaseHistoriesByNamespace.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling findReleaseHistoriesByNamespace.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findReleaseHistoriesByNamespace.'); - } - - const queryParameters: any = {}; - - if (requestParameters.page !== undefined) { - queryParameters['page'] = requestParameters.page; - } - - if (requestParameters.size !== undefined) { - queryParameters['size'] = requestParameters.size; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories`.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); - } - - /** - * GET /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/releases/histories - * 查询命名空间发布历史(new added) - */ - async findReleaseHistoriesByNamespace(requestParameters: FindReleaseHistoriesByNamespaceRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.findReleaseHistoriesByNamespaceRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apollo/audit/properties - * 获取审计配置(new added) - */ - async getAuditPropertiesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apollo/audit/properties`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/apollo/audit/properties - * 获取审计配置(new added) - */ - async getAuditProperties(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getAuditPropertiesRaw(initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/consumers - * 查询开放平台消费者列表(new added) - */ - async getConsumerListRaw(requestParameters: GetConsumerListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - const queryParameters: any = {}; - - if (requestParameters.page !== undefined) { - queryParameters['page'] = requestParameters.page; - } - - if (requestParameters.size !== undefined) { - queryParameters['size'] = requestParameters.size; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/consumers`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/consumers - * 查询开放平台消费者列表(new added) - */ - async getConsumerList(requestParameters: GetConsumerListRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.getConsumerListRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/consumer-tokens/by-appId - * 按应用ID查询消费者Token(new added) - */ - async getConsumerTokenByAppIdRaw(requestParameters: GetConsumerTokenByAppIdRequest, 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 getConsumerTokenByAppId.'); - } - - const queryParameters: any = {}; - - if (requestParameters.appId !== undefined) { - queryParameters['appId'] = requestParameters.appId; - } - - 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/consumer-tokens/by-appId`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/consumer-tokens/by-appId - * 按应用ID查询消费者Token(new added) - */ - async getConsumerTokenByAppId(requestParameters: GetConsumerTokenByAppIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getConsumerTokenByAppIdRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/page-settings - * 获取Portal页面配置(new added) - */ - async getPageSettingsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/page-settings`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/page-settings - * 获取Portal页面配置(new added) - */ - async getPageSettings(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getPageSettingsRaw(initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/system-info - * 获取系统信息(new added) - */ - async getSystemInfoRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/system-info`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/system-info - * 获取系统信息(new added) - */ - async getSystemInfo(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getSystemInfoRaw(initOverrides); - return await response.value(); - } - - /** - * POST /openapi/v1/configs/import - * 导入所有配置(new added) - */ - async importAllConfigsRaw(requestParameters: ImportAllConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.envs === null || requestParameters.envs === undefined) { - throw new runtime.RequiredError('envs','Required parameter requestParameters.envs was null or undefined when calling importAllConfigs.'); - } - - const queryParameters: any = {}; - - if (requestParameters.envs !== undefined) { - queryParameters['envs'] = requestParameters.envs; - } - - if (requestParameters.conflictAction !== undefined) { - queryParameters['conflictAction'] = requestParameters.conflictAction; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const consumes: runtime.Consume[] = [ - { contentType: 'multipart/form-data' }, - ]; - // @ts-ignore: canConsumeForm may be unused - const canConsumeForm = runtime.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any }; - let useForm = false; - // use FormData to transmit files using content-type "multipart/form-data" - useForm = canConsumeForm; - if (useForm) { - formParams = new FormData(); - } else { - formParams = new URLSearchParams(); - } - - if (requestParameters.file !== undefined) { - formParams.append('file', requestParameters.file as any); - } - - const response = await this.request({ - path: `/openapi/v1/configs/import`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: formParams, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * POST /openapi/v1/configs/import - * 导入所有配置(new added) - */ - async importAllConfigs(requestParameters: ImportAllConfigsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.importAllConfigsRaw(requestParameters, initOverrides); - } - - /** - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import - * 导入应用配置(new added) - */ - async importAppConfigRaw(requestParameters: ImportAppConfigRequest, 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 importAppConfig.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling importAppConfig.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling importAppConfig.'); - } - - const queryParameters: any = {}; - - if (requestParameters.conflictAction !== undefined) { - queryParameters['conflictAction'] = requestParameters.conflictAction; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const consumes: runtime.Consume[] = [ - { contentType: 'multipart/form-data' }, - ]; - // @ts-ignore: canConsumeForm may be unused - const canConsumeForm = runtime.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any }; - let useForm = false; - // use FormData to transmit files using content-type "multipart/form-data" - useForm = canConsumeForm; - if (useForm) { - formParams = new FormData(); - } else { - formParams = new URLSearchParams(); - } - - if (requestParameters.file !== undefined) { - formParams.append('file', requestParameters.file as any); - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import`.replace(`{${"appId"}}`, encodeURIComponent(String(requestParameters.appId))).replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"clusterName"}}`, encodeURIComponent(String(requestParameters.clusterName))), - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: formParams, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/import - * 导入应用配置(new added) - */ - async importAppConfig(requestParameters: ImportAppConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.importAppConfigRaw(requestParameters, initOverrides); - } - - /** - * POST /openapi/v1/import - * 导入配置兼容入口(new added) - */ - async importConfigRaw(requestParameters: ImportConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.envs === null || requestParameters.envs === undefined) { - throw new runtime.RequiredError('envs','Required parameter requestParameters.envs was null or undefined when calling importConfig.'); - } - - const queryParameters: any = {}; - - if (requestParameters.envs !== undefined) { - queryParameters['envs'] = requestParameters.envs; - } - - if (requestParameters.conflictAction !== undefined) { - queryParameters['conflictAction'] = requestParameters.conflictAction; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const consumes: runtime.Consume[] = [ - { contentType: 'multipart/form-data' }, - ]; - // @ts-ignore: canConsumeForm may be unused - const canConsumeForm = runtime.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any }; - let useForm = false; - // use FormData to transmit files using content-type "multipart/form-data" - useForm = canConsumeForm; - if (useForm) { - formParams = new FormData(); - } else { - formParams = new URLSearchParams(); - } - - if (requestParameters.file !== undefined) { - formParams.append('file', requestParameters.file as any); - } - - const response = await this.request({ - path: `/openapi/v1/import`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: formParams, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * POST /openapi/v1/import - * 导入配置兼容入口(new added) - */ - async importConfig(requestParameters: ImportConfigRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.importConfigRaw(requestParameters, initOverrides); - } - - /** - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import - * 导入命名空间配置项(new added) - */ - async importNamespaceItemsRaw(requestParameters: ImportNamespaceItemsRequest, 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 importNamespaceItems.'); - } - - if (requestParameters.env === null || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling importNamespaceItems.'); - } - - if (requestParameters.clusterName === null || requestParameters.clusterName === undefined) { - throw new runtime.RequiredError('clusterName','Required parameter requestParameters.clusterName was null or undefined when calling importNamespaceItems.'); - } - - if (requestParameters.namespaceName === null || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling importNamespaceItems.'); - } - - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const consumes: runtime.Consume[] = [ - { contentType: 'multipart/form-data' }, - ]; - // @ts-ignore: canConsumeForm may be unused - const canConsumeForm = runtime.canConsumeForm(consumes); - - let formParams: { append(param: string, value: any): any }; - let useForm = false; - // use FormData to transmit files using content-type "multipart/form-data" - useForm = canConsumeForm; - if (useForm) { - formParams = new FormData(); - } else { - formParams = new URLSearchParams(); - } - - if (requestParameters.file !== undefined) { - formParams.append('file', requestParameters.file as any); - } - - const response = await this.request({ - path: `/openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import`.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: formParams, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * POST /openapi/v1/apps/{appId}/envs/{env}/clusters/{clusterName}/namespaces/{namespaceName}/items/import - * 导入命名空间配置项(new added) - */ - async importNamespaceItems(requestParameters: ImportNamespaceItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.importNamespaceItemsRaw(requestParameters, initOverrides); - } - - /** - * GET /openapi/v1/apps/search/by-appid-or-name - * 按应用ID或名称搜索应用(new added) - */ - async searchAppsByAppIdOrNameRaw(requestParameters: SearchAppsByAppIdOrNameRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters.query !== undefined) { - queryParameters['query'] = requestParameters.query; - } - - if (requestParameters.page !== undefined) { - queryParameters['page'] = requestParameters.page; - } - - if (requestParameters.size !== undefined) { - queryParameters['size'] = requestParameters.size; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apps/search/by-appid-or-name`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/apps/search/by-appid-or-name - * 按应用ID或名称搜索应用(new added) - */ - async searchAppsByAppIdOrName(requestParameters: SearchAppsByAppIdOrNameRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.searchAppsByAppIdOrNameRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator - * 搜索审计日志(new added) - */ - async searchAuditLogsRaw(requestParameters: SearchAuditLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters.query === null || requestParameters.query === undefined) { - throw new runtime.RequiredError('query','Required parameter requestParameters.query was null or undefined when calling searchAuditLogs.'); - } - - const queryParameters: any = {}; - - if (requestParameters.query !== undefined) { - queryParameters['query'] = requestParameters.query; - } - - if (requestParameters.page !== undefined) { - queryParameters['page'] = requestParameters.page; - } - - if (requestParameters.size !== undefined) { - queryParameters['size'] = requestParameters.size; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/apollo/audit/logs/by-name-or-type-or-operator`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/apollo/audit/logs/by-name-or-type-or-operator - * 搜索审计日志(new added) - */ - async searchAuditLogs(requestParameters: SearchAuditLogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.searchAuditLogsRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/global-search/item-info/by-key-or-value - * 按Key或Value全局搜索配置(new added) - */ - async searchItemInfoByKeyOrValueRaw(requestParameters: SearchItemInfoByKeyOrValueRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - if (requestParameters.key !== undefined) { - queryParameters['key'] = requestParameters.key; - } - - if (requestParameters.value !== undefined) { - queryParameters['value'] = requestParameters.value; - } - - 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/global-search/item-info/by-key-or-value`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response); - } - - /** - * GET /openapi/v1/global-search/item-info/by-key-or-value - * 按Key或Value全局搜索配置(new added) - */ - async searchItemInfoByKeyOrValue(requestParameters: SearchItemInfoByKeyOrValueRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.searchItemInfoByKeyOrValueRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * PUT /openapi/v1/favorites/{favoriteId} - * 收藏置顶(new added) - */ - async topFavoriteRaw(requestParameters: TopFavoriteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.favoriteId === null || requestParameters.favoriteId === undefined) { - throw new runtime.RequiredError('favoriteId','Required parameter requestParameters.favoriteId was null or undefined when calling topFavorite.'); - } - - 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/favorites/{favoriteId}`.replace(`{${"favoriteId"}}`, encodeURIComponent(String(requestParameters.favoriteId))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * PUT /openapi/v1/favorites/{favoriteId} - * 收藏置顶(new added) - */ - async topFavorite(requestParameters: TopFavoriteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.topFavoriteRaw(requestParameters, initOverrides); - } - -} diff --git a/typescript/src/apis/ReleaseManagementApi.ts b/typescript/src/apis/ReleaseManagementApi.ts deleted file mode 100644 index fb0e0769..00000000 --- a/typescript/src/apis/ReleaseManagementApi.ts +++ /dev/null @@ -1,540 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - ExceptionResponse, - NamespaceGrayDelReleaseDTO, - NamespaceReleaseDTO, - OpenReleaseDTO, - OpenReleaseDiffDTO, -} from '../models'; -import { - ExceptionResponseFromJSON, - ExceptionResponseToJSON, - NamespaceGrayDelReleaseDTOFromJSON, - NamespaceGrayDelReleaseDTOToJSON, - NamespaceReleaseDTOFromJSON, - NamespaceReleaseDTOToJSON, - OpenReleaseDTOFromJSON, - OpenReleaseDTOToJSON, - OpenReleaseDiffDTOFromJSON, - OpenReleaseDiffDTOToJSON, -} from '../models'; - -export interface CompareReleaseRequest { - env: string; - baseReleaseId: number; - toCompareReleaseId: number; -} - -export interface CreateGrayDelReleaseRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - branchName: string; - namespaceGrayDelReleaseDTO: NamespaceGrayDelReleaseDTO; - operator?: string; -} - -export interface CreateGrayReleaseRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - branchName: string; - namespaceReleaseDTO: NamespaceReleaseDTO; - operator?: string; -} - -export interface CreateReleaseRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - namespaceReleaseDTO: NamespaceReleaseDTO; - operator?: string; -} - -export interface FindActiveReleasesRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; - page: number; - size: number; -} - -export interface GetReleaseByIdRequest { - env: string; - releaseId: number; -} - -export interface LoadLatestActiveReleaseRequest { - appId: string; - env: string; - clusterName: string; - namespaceName: string; -} - -export interface RollbackRequest { - env: string; - releaseId: number; - operator?: string; - toReleaseId?: number; -} - -/** - * - */ -export class ReleaseManagementApi extends runtime.BaseAPI { - - /** - * Get the configuration differences between two releases. - * Compare two releases - */ - async compareReleaseRaw(requestParameters: CompareReleaseRequest, 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 compareRelease.'); - } - - if (requestParameters.baseReleaseId === null || requestParameters.baseReleaseId === undefined) { - throw new runtime.RequiredError('baseReleaseId','Required parameter requestParameters.baseReleaseId was null or undefined when calling compareRelease.'); - } - - if (requestParameters.toCompareReleaseId === null || requestParameters.toCompareReleaseId === undefined) { - throw new runtime.RequiredError('toCompareReleaseId','Required parameter requestParameters.toCompareReleaseId was null or undefined when calling compareRelease.'); - } - - const queryParameters: any = {}; - - if (requestParameters.baseReleaseId !== undefined) { - queryParameters['baseReleaseId'] = requestParameters.baseReleaseId; - } - - if (requestParameters.toCompareReleaseId !== undefined) { - queryParameters['toCompareReleaseId'] = requestParameters.toCompareReleaseId; - } - - 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}/releases/comparison`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDiffDTOFromJSON(jsonValue)); - } - - /** - * Get the configuration differences between two releases. - * Compare two releases - */ - async compareRelease(requestParameters: CompareReleaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.compareReleaseRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * - * 创建灰度删除发布 (original openapi) - */ - 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 || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling createGrayDelRelease.'); - } - - 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 || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling createGrayDelRelease.'); - } - - 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.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.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/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) => OpenReleaseDTOFromJSON(jsonValue)); - } - - /** - * - * 创建灰度删除发布 (original openapi) - */ - async createGrayDelRelease(requestParameters: CreateGrayDelReleaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createGrayDelReleaseRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 创建灰度发布 - * 创建灰度发布 (original openapi) - */ - 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 || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling createGrayRelease.'); - } - - 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 || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling createGrayRelease.'); - } - - 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.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.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/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) => OpenReleaseDTOFromJSON(jsonValue)); - } - - /** - * 创建灰度发布 - * 创建灰度发布 (original openapi) - */ - async createGrayRelease(requestParameters: CreateGrayReleaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.createGrayReleaseRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * 创建发布 - * 创建发布 (original openapi) - */ - 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 || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling createRelease.'); - } - - 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 || 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 = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/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 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 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 || requestParameters.env === undefined) { - throw new runtime.RequiredError('env','Required parameter requestParameters.env was null or undefined when calling findActiveReleases.'); - } - - 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 || requestParameters.namespaceName === undefined) { - throw new runtime.RequiredError('namespaceName','Required parameter requestParameters.namespaceName was null or undefined when calling findActiveReleases.'); - } - - if (requestParameters.page === null || requestParameters.page === undefined) { - throw new runtime.RequiredError('page','Required parameter requestParameters.page was null or undefined when calling findActiveReleases.'); - } - - if (requestParameters.size === null || requestParameters.size === undefined) { - throw new runtime.RequiredError('size','Required parameter requestParameters.size was null or undefined when calling findActiveReleases.'); - } - - const queryParameters: any = {}; - - if (requestParameters.page !== undefined) { - queryParameters['page'] = requestParameters.page; - } - - if (requestParameters.size !== undefined) { - queryParameters['size'] = requestParameters.size; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/envs/{env}/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, - }, initOverrides); - - 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 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/{releaseId} - * 获取发布详情 (new added) - */ - 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 || requestParameters.releaseId === undefined) { - throw new runtime.RequiredError('releaseId','Required parameter requestParameters.releaseId was null or undefined when calling getReleaseById.'); - } - - 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}/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)); - } - - /** - * 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: `/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, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenReleaseDTOFromJSON(jsonValue)); - } - - /** - * 查询命名空间最新活跃发布 - * 获取最新活跃发布 (original openapi) - */ - async loadLatestActiveRelease(requestParameters: LoadLatestActiveReleaseRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.loadLatestActiveReleaseRaw(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.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - if (requestParameters.toReleaseId !== undefined) { - queryParameters['toReleaseId'] = requestParameters.toReleaseId; - } - - 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}/releases/{releaseId}/rollback`.replace(`{${"env"}}`, encodeURIComponent(String(requestParameters.env))).replace(`{${"releaseId"}}`, encodeURIComponent(String(requestParameters.releaseId))), - method: 'PUT', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * 回滚到指定的发布版本 - * 回滚发布 (original openapi) - */ - async rollback(requestParameters: RollbackRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.rollbackRaw(requestParameters, initOverrides); - } - -} diff --git a/typescript/src/apis/UserManagementApi.ts b/typescript/src/apis/UserManagementApi.ts deleted file mode 100644 index 58113538..00000000 --- a/typescript/src/apis/UserManagementApi.ts +++ /dev/null @@ -1,265 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -import * as runtime from '../runtime'; -import type { - ExceptionResponse, - OpenUserDTO, - OpenUserInfoDTO, -} from '../models'; -import { - ExceptionResponseFromJSON, - ExceptionResponseToJSON, - OpenUserDTOFromJSON, - OpenUserDTOToJSON, - OpenUserInfoDTOFromJSON, - OpenUserInfoDTOToJSON, -} from '../models'; - -export interface ChangeUserEnabledRequest { - openUserDTO: OpenUserDTO; - operator?: string; -} - -export interface CreateOrUpdateUserRequest { - openUserDTO: OpenUserDTO; - isCreate?: boolean; - operator?: string; -} - -export interface GetUserByUserIdRequest { - userId: string; -} - -export interface SearchUsersRequest { - keyword: string; - includeInactiveUsers?: boolean; - offset?: number; - limit?: number; -} - -/** - * - */ -export class UserManagementApi extends runtime.BaseAPI { - - /** - * PUT /openapi/v1/users/enabled,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - * 修改用户启用状态(new added) - */ - async changeUserEnabledRaw(requestParameters: ChangeUserEnabledRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.openUserDTO === null || requestParameters.openUserDTO === undefined) { - throw new runtime.RequiredError('openUserDTO','Required parameter requestParameters.openUserDTO was null or undefined when calling changeUserEnabled.'); - } - - const queryParameters: any = {}; - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/users/enabled`, - method: 'PUT', - headers: headerParameters, - query: queryParameters, - body: OpenUserDTOToJSON(requestParameters.openUserDTO), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * PUT /openapi/v1/users/enabled,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - * 修改用户启用状态(new added) - */ - async changeUserEnabled(requestParameters: ChangeUserEnabledRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.changeUserEnabledRaw(requestParameters, initOverrides); - } - - /** - * POST /openapi/v1/users,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - * 创建或更新用户(new added) - */ - async createOrUpdateUserRaw(requestParameters: CreateOrUpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.openUserDTO === null || requestParameters.openUserDTO === undefined) { - throw new runtime.RequiredError('openUserDTO','Required parameter requestParameters.openUserDTO was null or undefined when calling createOrUpdateUser.'); - } - - const queryParameters: any = {}; - - if (requestParameters.isCreate !== undefined) { - queryParameters['isCreate'] = requestParameters.isCreate; - } - - if (requestParameters.operator !== undefined) { - queryParameters['operator'] = requestParameters.operator; - } - - const headerParameters: runtime.HTTPHeaders = {}; - - headerParameters['Content-Type'] = 'application/json'; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/users`, - method: 'POST', - headers: headerParameters, - query: queryParameters, - body: OpenUserDTOToJSON(requestParameters.openUserDTO), - }, initOverrides); - - return new runtime.VoidApiResponse(response); - } - - /** - * POST /openapi/v1/users,Portal用户登录态使用当前登录用户作为operator;Consumer Token访问时需要具备ManageUsers权限并传入有效operator - * 创建或更新用户(new added) - */ - async createOrUpdateUser(requestParameters: CreateOrUpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - await this.createOrUpdateUserRaw(requestParameters, initOverrides); - } - - /** - * GET /openapi/v1/user - * 获取当前Portal用户(new added) - */ - async getCurrentUserRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const queryParameters: any = {}; - - const headerParameters: runtime.HTTPHeaders = {}; - - if (this.configuration && this.configuration.apiKey) { - headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication - } - - const response = await this.request({ - path: `/openapi/v1/user`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenUserInfoDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/user - * 获取当前Portal用户(new added) - */ - async getCurrentUser(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getCurrentUserRaw(initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/users/{userId},支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - * 获取指定用户(new added) - */ - async getUserByUserIdRaw(requestParameters: GetUserByUserIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - if (requestParameters.userId === null || requestParameters.userId === undefined) { - throw new runtime.RequiredError('userId','Required parameter requestParameters.userId was null or undefined when calling getUserByUserId.'); - } - - 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/users/{userId}`.replace(`{${"userId"}}`, encodeURIComponent(String(requestParameters.userId))), - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => OpenUserInfoDTOFromJSON(jsonValue)); - } - - /** - * GET /openapi/v1/users/{userId},支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - * 获取指定用户(new added) - */ - async getUserByUserId(requestParameters: GetUserByUserIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise { - const response = await this.getUserByUserIdRaw(requestParameters, initOverrides); - return await response.value(); - } - - /** - * GET /openapi/v1/users,支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - * 搜索用户(new added) - */ - async searchUsersRaw(requestParameters: SearchUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise>> { - if (requestParameters.keyword === null || requestParameters.keyword === undefined) { - throw new runtime.RequiredError('keyword','Required parameter requestParameters.keyword was null or undefined when calling searchUsers.'); - } - - const queryParameters: any = {}; - - if (requestParameters.keyword !== undefined) { - queryParameters['keyword'] = requestParameters.keyword; - } - - if (requestParameters.includeInactiveUsers !== undefined) { - queryParameters['includeInactiveUsers'] = requestParameters.includeInactiveUsers; - } - - if (requestParameters.offset !== undefined) { - queryParameters['offset'] = requestParameters.offset; - } - - if (requestParameters.limit !== undefined) { - queryParameters['limit'] = requestParameters.limit; - } - - 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/users`, - method: 'GET', - headers: headerParameters, - query: queryParameters, - }, initOverrides); - - return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(OpenUserInfoDTOFromJSON)); - } - - /** - * GET /openapi/v1/users,支持Portal用户登录态或具备ManageUsers权限的Consumer Token访问 - * 搜索用户(new added) - */ - async searchUsers(requestParameters: SearchUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise> { - const response = await this.searchUsersRaw(requestParameters, initOverrides); - return await response.value(); - } - -} diff --git a/typescript/src/apis/index.ts b/typescript/src/apis/index.ts deleted file mode 100644 index 89df5955..00000000 --- a/typescript/src/apis/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './AccessKeyManagementApi'; -export * from './AppManagementApi'; -export * from './AppNamespaceManagementApi'; -export * from './ClusterManagementApi'; -export * from './EnvironmentManagementApi'; -export * from './InstanceManagementApi'; -export * from './ItemManagementApi'; -export * from './NamespaceBranchManagementApi'; -export * from './NamespaceLockManagementApi'; -export * from './NamespaceManagementApi'; -export * from './OrganizationManagementApi'; -export * from './PermissionManagementApi'; -export * from './PortalManagementApi'; -export * from './ReleaseManagementApi'; -export * from './UserManagementApi'; diff --git a/typescript/src/index.ts b/typescript/src/index.ts deleted file mode 100644 index be9d1ede..00000000 --- a/typescript/src/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './runtime'; -export * from './apis'; -export * from './models'; diff --git a/typescript/src/models/ExceptionResponse.ts b/typescript/src/models/ExceptionResponse.ts deleted file mode 100644 index 11567472..00000000 --- a/typescript/src/models/ExceptionResponse.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface ExceptionResponse - */ -export interface ExceptionResponse { - /** - * HTTP 状态码 - * @type {number} - * @memberof ExceptionResponse - */ - status?: number; - /** - * 错误信息 - * @type {string} - * @memberof ExceptionResponse - */ - message?: string; - /** - * 时间戳 - * @type {Date} - * @memberof ExceptionResponse - */ - timestamp?: Date; - /** - * 错误类名 - * @type {string} - * @memberof ExceptionResponse - */ - exception?: string; -} - -/** - * Check if a given object implements the ExceptionResponse interface. - */ -export function instanceOfExceptionResponse(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function ExceptionResponseFromJSON(json: any): ExceptionResponse { - return ExceptionResponseFromJSONTyped(json, false); -} - -export function ExceptionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ExceptionResponse { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'status': !exists(json, 'status') ? undefined : json['status'], - 'message': !exists(json, 'message') ? undefined : json['message'], - 'timestamp': !exists(json, 'timestamp') ? undefined : (new Date(json['timestamp'])), - 'exception': !exists(json, 'exception') ? undefined : json['exception'], - }; -} - -export function ExceptionResponseToJSON(value?: ExceptionResponse | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'status': value.status, - 'message': value.message, - 'timestamp': value.timestamp === undefined ? undefined : (value.timestamp.toISOString()), - 'exception': value.exception, - }; -} diff --git a/typescript/src/models/NamespaceGrayDelReleaseDTO.ts b/typescript/src/models/NamespaceGrayDelReleaseDTO.ts deleted file mode 100644 index 84e1d179..00000000 --- a/typescript/src/models/NamespaceGrayDelReleaseDTO.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 NamespaceGrayDelReleaseDTO - */ -export interface NamespaceGrayDelReleaseDTO { - /** - * 发布标题,用于标识这次灰度删除发布的名称或版本号 - * @type {string} - * @memberof NamespaceGrayDelReleaseDTO - */ - releaseTitle?: string; - /** - * 发布备注,详细描述本次灰度删除发布的目的和删除的配置项 - * @type {string} - * @memberof NamespaceGrayDelReleaseDTO - */ - releaseComment?: string; - /** - * 发布操作者用户名,记录是谁执行了这次灰度删除发布操作 - * @type {string} - * @memberof NamespaceGrayDelReleaseDTO - */ - releasedBy?: string; - /** - * 是否为紧急发布,紧急发布可能会跳过某些审核流程 - * @type {boolean} - * @memberof NamespaceGrayDelReleaseDTO - */ - isEmergencyPublish?: boolean; - /** - * 需要在灰度发布中删除的配置项键名列表 - * @type {Array} - * @memberof NamespaceGrayDelReleaseDTO - */ - grayDelKeys?: Array; -} - -/** - * Check if a given object implements the NamespaceGrayDelReleaseDTO interface. - */ -export function instanceOfNamespaceGrayDelReleaseDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function NamespaceGrayDelReleaseDTOFromJSON(json: any): NamespaceGrayDelReleaseDTO { - return NamespaceGrayDelReleaseDTOFromJSONTyped(json, false); -} - -export function NamespaceGrayDelReleaseDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): NamespaceGrayDelReleaseDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - '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 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, - }; -} diff --git a/typescript/src/models/NamespaceReleaseDTO.ts b/typescript/src/models/NamespaceReleaseDTO.ts deleted file mode 100644 index b6d62662..00000000 --- a/typescript/src/models/NamespaceReleaseDTO.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 NamespaceReleaseDTO - */ -export interface NamespaceReleaseDTO { - /** - * 发布标题,用于标识这次发布的名称或版本号 - * @type {string} - * @memberof NamespaceReleaseDTO - */ - releaseTitle?: string; - /** - * 发布备注,详细描述本次发布的变更内容和目的 - * @type {string} - * @memberof NamespaceReleaseDTO - */ - releaseComment?: string; - /** - * 发布操作者用户名,记录是谁执行了这次发布操作 - * @type {string} - * @memberof NamespaceReleaseDTO - */ - releasedBy?: string; - /** - * 是否为紧急发布,紧急发布可能会跳过某些审核流程 - * @type {boolean} - * @memberof NamespaceReleaseDTO - */ - isEmergencyPublish?: boolean; -} - -/** - * Check if a given object implements the NamespaceReleaseDTO interface. - */ -export function instanceOfNamespaceReleaseDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function NamespaceReleaseDTOFromJSON(json: any): NamespaceReleaseDTO { - return NamespaceReleaseDTOFromJSONTyped(json, false); -} - -export function NamespaceReleaseDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): NamespaceReleaseDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - '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 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, - }; -} diff --git a/typescript/src/models/OpenAccessKeyDTO.ts b/typescript/src/models/OpenAccessKeyDTO.ts deleted file mode 100644 index 286a7b6b..00000000 --- a/typescript/src/models/OpenAccessKeyDTO.ts +++ /dev/null @@ -1,143 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenAccessKeyDTO - */ -export interface OpenAccessKeyDTO { - /** - * - * @type {string} - * @memberof OpenAccessKeyDTO - */ - dataChangeCreatedBy?: string; - /** - * - * @type {string} - * @memberof OpenAccessKeyDTO - */ - dataChangeLastModifiedBy?: string; - /** - * - * @type {string} - * @memberof OpenAccessKeyDTO - */ - dataChangeCreatedByDisplayName?: string; - /** - * - * @type {string} - * @memberof OpenAccessKeyDTO - */ - dataChangeLastModifiedByDisplayName?: string; - /** - * - * @type {string} - * @memberof OpenAccessKeyDTO - */ - dataChangeCreatedTime?: string; - /** - * - * @type {string} - * @memberof OpenAccessKeyDTO - */ - dataChangeLastModifiedTime?: string; - /** - * - * @type {number} - * @memberof OpenAccessKeyDTO - */ - id?: number; - /** - * - * @type {string} - * @memberof OpenAccessKeyDTO - */ - secret?: string; - /** - * - * @type {string} - * @memberof OpenAccessKeyDTO - */ - appId?: string; - /** - * - * @type {number} - * @memberof OpenAccessKeyDTO - */ - mode?: number; - /** - * - * @type {boolean} - * @memberof OpenAccessKeyDTO - */ - enabled?: boolean; -} - -/** - * Check if a given object implements the OpenAccessKeyDTO interface. - */ -export function instanceOfOpenAccessKeyDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenAccessKeyDTOFromJSON(json: any): OpenAccessKeyDTO { - return OpenAccessKeyDTOFromJSONTyped(json, false); -} - -export function OpenAccessKeyDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenAccessKeyDTO { - 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'], - 'id': !exists(json, 'id') ? undefined : json['id'], - 'secret': !exists(json, 'secret') ? undefined : json['secret'], - 'appId': !exists(json, 'appId') ? undefined : json['appId'], - 'mode': !exists(json, 'mode') ? undefined : json['mode'], - 'enabled': !exists(json, 'enabled') ? undefined : json['enabled'], - }; -} - -export function OpenAccessKeyDTOToJSON(value?: OpenAccessKeyDTO | 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, - 'id': value.id, - 'secret': value.secret, - 'appId': value.appId, - 'mode': value.mode, - 'enabled': value.enabled, - }; -} diff --git a/typescript/src/models/OpenAppDTO.ts b/typescript/src/models/OpenAppDTO.ts deleted file mode 100644 index d8bea8a4..00000000 --- a/typescript/src/models/OpenAppDTO.ts +++ /dev/null @@ -1,159 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * Apollo应用信息数据传输对象,包含应用的基本信息和元数据 - * @export - * @interface OpenAppDTO - */ -export interface OpenAppDTO { - /** - * 数据创建者用户名,记录是谁创建了这个应用 - * @type {string} - * @memberof OpenAppDTO - */ - dataChangeCreatedBy?: string; - /** - * 数据创建者显示名称,用于展示创建者的友好名称 - * @type {string} - * @memberof OpenAppDTO - */ - dataChangeCreatedByDisplayName?: string; - /** - * 数据最后修改者用户名,记录最后一次修改应用信息的用户 - * @type {string} - * @memberof OpenAppDTO - */ - dataChangeLastModifiedBy?: string; - /** - * 数据最后修改者显示名称,用于展示最后修改者的友好名称 - * @type {string} - * @memberof OpenAppDTO - */ - dataChangeLastModifiedByDisplayName?: string; - /** - * 数据创建时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenAppDTO - */ - dataChangeCreatedTime?: string; - /** - * 数据最后修改时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenAppDTO - */ - dataChangeLastModifiedTime?: string; - /** - * 应用名称,用于显示的友好名称 - * @type {string} - * @memberof OpenAppDTO - */ - name?: string; - /** - * 应用唯一标识符,全局唯一的应用ID - * @type {string} - * @memberof OpenAppDTO - */ - appId?: string; - /** - * 组织ID,应用所属组织的唯一标识 - * @type {string} - * @memberof OpenAppDTO - */ - orgId?: string; - /** - * 组织名称,应用所属组织的显示名称 - * @type {string} - * @memberof OpenAppDTO - */ - orgName?: string; - /** - * 应用负责人姓名,应用的主要负责人 - * @type {string} - * @memberof OpenAppDTO - */ - ownerName?: string; - /** - * 应用负责人邮箱地址,用于接收应用相关通知 - * @type {string} - * @memberof OpenAppDTO - */ - ownerEmail?: string; - /** - * - * @type {string} - * @memberof OpenAppDTO - */ - ownerDisplayName?: string; -} - -/** - * Check if a given object implements the OpenAppDTO interface. - */ -export function instanceOfOpenAppDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenAppDTOFromJSON(json: any): OpenAppDTO { - return OpenAppDTOFromJSONTyped(json, false); -} - -export function OpenAppDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenAppDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'dataChangeCreatedBy': !exists(json, 'dataChangeCreatedBy') ? undefined : json['dataChangeCreatedBy'], - 'dataChangeCreatedByDisplayName': !exists(json, 'dataChangeCreatedByDisplayName') ? undefined : json['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedBy': !exists(json, 'dataChangeLastModifiedBy') ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeLastModifiedByDisplayName': !exists(json, 'dataChangeLastModifiedByDisplayName') ? undefined : json['dataChangeLastModifiedByDisplayName'], - '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'], - 'ownerDisplayName': !exists(json, 'ownerDisplayName') ? undefined : json['ownerDisplayName'], - }; -} - -export function OpenAppDTOToJSON(value?: OpenAppDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'dataChangeCreatedBy': value.dataChangeCreatedBy, - 'dataChangeCreatedByDisplayName': value.dataChangeCreatedByDisplayName, - 'dataChangeLastModifiedBy': value.dataChangeLastModifiedBy, - 'dataChangeLastModifiedByDisplayName': value.dataChangeLastModifiedByDisplayName, - 'dataChangeCreatedTime': value.dataChangeCreatedTime, - 'dataChangeLastModifiedTime': value.dataChangeLastModifiedTime, - 'name': value.name, - 'appId': value.appId, - 'orgId': value.orgId, - 'orgName': value.orgName, - 'ownerName': value.ownerName, - 'ownerEmail': value.ownerEmail, - 'ownerDisplayName': value.ownerDisplayName, - }; -} diff --git a/typescript/src/models/OpenAppNamespaceDTO.ts b/typescript/src/models/OpenAppNamespaceDTO.ts deleted file mode 100644 index 1024d58a..00000000 --- a/typescript/src/models/OpenAppNamespaceDTO.ts +++ /dev/null @@ -1,151 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * Apollo应用命名空间数据传输对象,表示应用级别的命名空间配置信息 - * @export - * @interface OpenAppNamespaceDTO - */ -export interface OpenAppNamespaceDTO { - /** - * 命名空间创建者用户名,记录是谁创建了这个应用命名空间 - * @type {string} - * @memberof OpenAppNamespaceDTO - */ - dataChangeCreatedBy?: string; - /** - * 命名空间创建者显示名称,用于展示创建者的友好名称 - * @type {string} - * @memberof OpenAppNamespaceDTO - */ - dataChangeCreatedByDisplayName?: string; - /** - * 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 - * @type {string} - * @memberof OpenAppNamespaceDTO - */ - dataChangeLastModifiedBy?: string; - /** - * 命名空间最后修改者显示名称,用于展示最后修改者的友好名称 - * @type {string} - * @memberof OpenAppNamespaceDTO - */ - dataChangeLastModifiedByDisplayName?: string; - /** - * 命名空间创建时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenAppNamespaceDTO - */ - dataChangeCreatedTime?: string; - /** - * 命名空间最后修改时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenAppNamespaceDTO - */ - dataChangeLastModifiedTime?: string; - /** - * 命名空间名称,在同一应用内唯一标识一个命名空间 - * @type {string} - * @memberof OpenAppNamespaceDTO - */ - name?: string; - /** - * 所属应用的唯一标识符 - * @type {string} - * @memberof OpenAppNamespaceDTO - */ - appId?: string; - /** - * 命名空间格式类型,如properties、xml、json、yml等 - * @type {string} - * @memberof OpenAppNamespaceDTO - */ - format?: string; - /** - * 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - * @type {boolean} - * @memberof OpenAppNamespaceDTO - */ - isPublic?: boolean; - /** - * 对于公共命名空间,是否在命名空间名称前添加前缀 - * @type {boolean} - * @memberof OpenAppNamespaceDTO - */ - appendNamespacePrefix?: boolean; - /** - * 命名空间备注说明,描述命名空间的用途和包含的配置类型 - * @type {string} - * @memberof OpenAppNamespaceDTO - */ - comment?: string; -} - -/** - * Check if a given object implements the OpenAppNamespaceDTO interface. - */ -export function instanceOfOpenAppNamespaceDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenAppNamespaceDTOFromJSON(json: any): OpenAppNamespaceDTO { - return OpenAppNamespaceDTOFromJSONTyped(json, false); -} - -export function OpenAppNamespaceDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenAppNamespaceDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'dataChangeCreatedBy': !exists(json, 'dataChangeCreatedBy') ? undefined : json['dataChangeCreatedBy'], - 'dataChangeCreatedByDisplayName': !exists(json, 'dataChangeCreatedByDisplayName') ? undefined : json['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedBy': !exists(json, 'dataChangeLastModifiedBy') ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeLastModifiedByDisplayName': !exists(json, 'dataChangeLastModifiedByDisplayName') ? undefined : json['dataChangeLastModifiedByDisplayName'], - '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 OpenAppNamespaceDTOToJSON(value?: OpenAppNamespaceDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'dataChangeCreatedBy': value.dataChangeCreatedBy, - 'dataChangeCreatedByDisplayName': value.dataChangeCreatedByDisplayName, - 'dataChangeLastModifiedBy': value.dataChangeLastModifiedBy, - 'dataChangeLastModifiedByDisplayName': value.dataChangeLastModifiedByDisplayName, - '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/OpenAppRoleUserDTO.ts b/typescript/src/models/OpenAppRoleUserDTO.ts deleted file mode 100644 index f9569ec1..00000000 --- a/typescript/src/models/OpenAppRoleUserDTO.ts +++ /dev/null @@ -1,78 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 { OpenUserInfoDTO } from './OpenUserInfoDTO'; -import { - OpenUserInfoDTOFromJSON, - OpenUserInfoDTOFromJSONTyped, - OpenUserInfoDTOToJSON, -} from './OpenUserInfoDTO'; - -/** - * - * @export - * @interface OpenAppRoleUserDTO - */ -export interface OpenAppRoleUserDTO { - /** - * - * @type {string} - * @memberof OpenAppRoleUserDTO - */ - appId?: string; - /** - * - * @type {Array} - * @memberof OpenAppRoleUserDTO - */ - masterUsers?: Array; -} - -/** - * Check if a given object implements the OpenAppRoleUserDTO interface. - */ -export function instanceOfOpenAppRoleUserDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenAppRoleUserDTOFromJSON(json: any): OpenAppRoleUserDTO { - return OpenAppRoleUserDTOFromJSONTyped(json, false); -} - -export function OpenAppRoleUserDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenAppRoleUserDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'appId': !exists(json, 'appId') ? undefined : json['appId'], - 'masterUsers': !exists(json, 'masterUsers') ? undefined : ((json['masterUsers'] as Array).map(OpenUserInfoDTOFromJSON)), - }; -} - -export function OpenAppRoleUserDTOToJSON(value?: OpenAppRoleUserDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'appId': value.appId, - 'masterUsers': value.masterUsers === undefined ? undefined : ((value.masterUsers as Array).map(OpenUserInfoDTOToJSON)), - }; -} diff --git a/typescript/src/models/OpenClusterDTO.ts b/typescript/src/models/OpenClusterDTO.ts deleted file mode 100644 index 21b597db..00000000 --- a/typescript/src/models/OpenClusterDTO.ts +++ /dev/null @@ -1,143 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * Apollo集群信息数据传输对象,表示应用在特定环境下的集群配置 - * @export - * @interface OpenClusterDTO - */ -export interface OpenClusterDTO { - /** - * 集群创建者用户名,记录是谁创建了这个集群 - * @type {string} - * @memberof OpenClusterDTO - */ - dataChangeCreatedBy?: string; - /** - * 集群创建者显示名称,用于展示创建者的友好名称 - * @type {string} - * @memberof OpenClusterDTO - */ - dataChangeCreatedByDisplayName?: string; - /** - * 集群最后修改者用户名,记录最后一次修改集群信息的用户 - * @type {string} - * @memberof OpenClusterDTO - */ - dataChangeLastModifiedBy?: string; - /** - * 集群最后修改者显示名称,用于展示最后修改者的友好名称 - * @type {string} - * @memberof OpenClusterDTO - */ - dataChangeLastModifiedByDisplayName?: string; - /** - * 集群创建时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenClusterDTO - */ - dataChangeCreatedTime?: string; - /** - * 集群最后修改时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenClusterDTO - */ - dataChangeLastModifiedTime?: string; - /** - * 集群名称,在同一应用和环境下唯一标识一个集群 - * @type {string} - * @memberof OpenClusterDTO - */ - name?: string; - /** - * 所属应用的唯一标识符 - * @type {string} - * @memberof OpenClusterDTO - */ - appId?: string; - /** - * 集群的唯一标识符 - * @type {number} - * @memberof OpenClusterDTO - */ - id?: number; - /** - * 父集群的ID - * @type {number} - * @memberof OpenClusterDTO - */ - parentClusterId?: number; - /** - * 集群的备注说明 - * @type {string} - * @memberof OpenClusterDTO - */ - comment?: string; -} - -/** - * Check if a given object implements the OpenClusterDTO interface. - */ -export function instanceOfOpenClusterDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenClusterDTOFromJSON(json: any): OpenClusterDTO { - return OpenClusterDTOFromJSONTyped(json, false); -} - -export function OpenClusterDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenClusterDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'dataChangeCreatedBy': !exists(json, 'dataChangeCreatedBy') ? undefined : json['dataChangeCreatedBy'], - 'dataChangeCreatedByDisplayName': !exists(json, 'dataChangeCreatedByDisplayName') ? undefined : json['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedBy': !exists(json, 'dataChangeLastModifiedBy') ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeLastModifiedByDisplayName': !exists(json, 'dataChangeLastModifiedByDisplayName') ? undefined : json['dataChangeLastModifiedByDisplayName'], - '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'], - 'id': !exists(json, 'id') ? undefined : json['id'], - 'parentClusterId': !exists(json, 'parentClusterId') ? undefined : json['parentClusterId'], - 'comment': !exists(json, 'comment') ? undefined : json['comment'], - }; -} - -export function OpenClusterDTOToJSON(value?: OpenClusterDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'dataChangeCreatedBy': value.dataChangeCreatedBy, - 'dataChangeCreatedByDisplayName': value.dataChangeCreatedByDisplayName, - 'dataChangeLastModifiedBy': value.dataChangeLastModifiedBy, - 'dataChangeLastModifiedByDisplayName': value.dataChangeLastModifiedByDisplayName, - 'dataChangeCreatedTime': value.dataChangeCreatedTime, - 'dataChangeLastModifiedTime': value.dataChangeLastModifiedTime, - 'name': value.name, - 'appId': value.appId, - 'id': value.id, - 'parentClusterId': value.parentClusterId, - 'comment': value.comment, - }; -} diff --git a/typescript/src/models/OpenClusterNamespaceRoleUserDTO.ts b/typescript/src/models/OpenClusterNamespaceRoleUserDTO.ts deleted file mode 100644 index d27220b6..00000000 --- a/typescript/src/models/OpenClusterNamespaceRoleUserDTO.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 { OpenUserInfoDTO } from './OpenUserInfoDTO'; -import { - OpenUserInfoDTOFromJSON, - OpenUserInfoDTOFromJSONTyped, - OpenUserInfoDTOToJSON, -} from './OpenUserInfoDTO'; - -/** - * - * @export - * @interface OpenClusterNamespaceRoleUserDTO - */ -export interface OpenClusterNamespaceRoleUserDTO { - /** - * - * @type {string} - * @memberof OpenClusterNamespaceRoleUserDTO - */ - appId?: string; - /** - * - * @type {string} - * @memberof OpenClusterNamespaceRoleUserDTO - */ - env?: string; - /** - * - * @type {string} - * @memberof OpenClusterNamespaceRoleUserDTO - */ - cluster?: string; - /** - * - * @type {Array} - * @memberof OpenClusterNamespaceRoleUserDTO - */ - modifyRoleUsers?: Array; - /** - * - * @type {Array} - * @memberof OpenClusterNamespaceRoleUserDTO - */ - releaseRoleUsers?: Array; -} - -/** - * Check if a given object implements the OpenClusterNamespaceRoleUserDTO interface. - */ -export function instanceOfOpenClusterNamespaceRoleUserDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenClusterNamespaceRoleUserDTOFromJSON(json: any): OpenClusterNamespaceRoleUserDTO { - return OpenClusterNamespaceRoleUserDTOFromJSONTyped(json, false); -} - -export function OpenClusterNamespaceRoleUserDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenClusterNamespaceRoleUserDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'appId': !exists(json, 'appId') ? undefined : json['appId'], - 'env': !exists(json, 'env') ? undefined : json['env'], - 'cluster': !exists(json, 'cluster') ? undefined : json['cluster'], - 'modifyRoleUsers': !exists(json, 'modifyRoleUsers') ? undefined : ((json['modifyRoleUsers'] as Array).map(OpenUserInfoDTOFromJSON)), - 'releaseRoleUsers': !exists(json, 'releaseRoleUsers') ? undefined : ((json['releaseRoleUsers'] as Array).map(OpenUserInfoDTOFromJSON)), - }; -} - -export function OpenClusterNamespaceRoleUserDTOToJSON(value?: OpenClusterNamespaceRoleUserDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'appId': value.appId, - 'env': value.env, - 'cluster': value.cluster, - 'modifyRoleUsers': value.modifyRoleUsers === undefined ? undefined : ((value.modifyRoleUsers as Array).map(OpenUserInfoDTOToJSON)), - 'releaseRoleUsers': value.releaseRoleUsers === undefined ? undefined : ((value.releaseRoleUsers as Array).map(OpenUserInfoDTOToJSON)), - }; -} diff --git a/typescript/src/models/OpenCreateAppDTO.ts b/typescript/src/models/OpenCreateAppDTO.ts deleted file mode 100644 index 1d64b490..00000000 --- a/typescript/src/models/OpenCreateAppDTO.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 { OpenAppDTO } from './OpenAppDTO'; -import { - OpenAppDTOFromJSON, - OpenAppDTOFromJSONTyped, - OpenAppDTOToJSON, -} from './OpenAppDTO'; - -/** - * 创建Apollo应用的请求数据传输对象,包含创建应用所需的所有信息 - * @export - * @interface OpenCreateAppDTO - */ -export interface OpenCreateAppDTO { - /** - * 是否将应用角色分配给当前用户。当设置为true时,当前token用户将获得该应用的完全操作权限 - * @type {boolean} - * @memberof OpenCreateAppDTO - */ - assignAppRoleToSelf?: boolean; - /** - * 应用管理员用户名列表。应用负责人默认具有项目管理员权限。管理员可以创建命名空间、集群并分配用户权限 - * @type {Set} - * @memberof OpenCreateAppDTO - */ - admins?: Set; - /** - * - * @type {OpenAppDTO} - * @memberof OpenCreateAppDTO - */ - app?: OpenAppDTO; -} - -/** - * Check if a given object implements the OpenCreateAppDTO interface. - */ -export function instanceOfOpenCreateAppDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenCreateAppDTOFromJSON(json: any): OpenCreateAppDTO { - return OpenCreateAppDTOFromJSONTyped(json, false); -} - -export function OpenCreateAppDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenCreateAppDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'assignAppRoleToSelf': !exists(json, 'assignAppRoleToSelf') ? undefined : json['assignAppRoleToSelf'], - 'admins': !exists(json, 'admins') ? undefined : json['admins'], - 'app': !exists(json, 'app') ? undefined : OpenAppDTOFromJSON(json['app']), - }; -} - -export function OpenCreateAppDTOToJSON(value?: OpenCreateAppDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'assignAppRoleToSelf': value.assignAppRoleToSelf, - 'admins': value.admins === undefined ? undefined : Array.from(value.admins as Set), - 'app': OpenAppDTOToJSON(value.app), - }; -} diff --git a/typescript/src/models/OpenCreateNamespaceDTO.ts b/typescript/src/models/OpenCreateNamespaceDTO.ts deleted file mode 100644 index 5ed25af5..00000000 --- a/typescript/src/models/OpenCreateNamespaceDTO.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - * @export - * @interface OpenCreateNamespaceDTO - */ -export interface OpenCreateNamespaceDTO { - /** - * 所属应用的唯一标识符 - * @type {string} - * @memberof OpenCreateNamespaceDTO - */ - appId?: string; - /** - * 所在那个环境创建 - * @type {string} - * @memberof OpenCreateNamespaceDTO - */ - env?: string; - /** - * 所属集群的名称 - * @type {string} - * @memberof OpenCreateNamespaceDTO - */ - clusterName?: string; - /** - * 根据已创建的appnamespace来实例化namespace - * @type {string} - * @memberof OpenCreateNamespaceDTO - */ - appNamespaceName?: string; -} - -/** - * Check if a given object implements the OpenCreateNamespaceDTO interface. - */ -export function instanceOfOpenCreateNamespaceDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenCreateNamespaceDTOFromJSON(json: any): OpenCreateNamespaceDTO { - return OpenCreateNamespaceDTOFromJSONTyped(json, false); -} - -export function OpenCreateNamespaceDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenCreateNamespaceDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'appId': !exists(json, 'appId') ? undefined : json['appId'], - 'env': !exists(json, 'env') ? undefined : json['env'], - 'clusterName': !exists(json, 'clusterName') ? undefined : json['clusterName'], - 'appNamespaceName': !exists(json, 'appNamespaceName') ? undefined : json['appNamespaceName'], - }; -} - -export function OpenCreateNamespaceDTOToJSON(value?: OpenCreateNamespaceDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'appId': value.appId, - 'env': value.env, - 'clusterName': value.clusterName, - 'appNamespaceName': value.appNamespaceName, - }; -} diff --git a/typescript/src/models/OpenEnvClusterDTO.ts b/typescript/src/models/OpenEnvClusterDTO.ts deleted file mode 100644 index cea833cd..00000000 --- a/typescript/src/models/OpenEnvClusterDTO.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenEnvClusterDTO - */ -export interface OpenEnvClusterDTO { - /** - * 环境标识,例如 DEV、FAT、UAT、PROD - * @type {string} - * @memberof OpenEnvClusterDTO - */ - env?: string; - /** - * 该环境下的集群名称列表 - * @type {Array} - * @memberof OpenEnvClusterDTO - */ - clusters?: Array; -} - -/** - * Check if a given object implements the OpenEnvClusterDTO interface. - */ -export function instanceOfOpenEnvClusterDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenEnvClusterDTOFromJSON(json: any): OpenEnvClusterDTO { - return OpenEnvClusterDTOFromJSONTyped(json, false); -} - -export function OpenEnvClusterDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenEnvClusterDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'env': !exists(json, 'env') ? undefined : json['env'], - 'clusters': !exists(json, 'clusters') ? undefined : json['clusters'], - }; -} - -export function OpenEnvClusterDTOToJSON(value?: OpenEnvClusterDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'env': value.env, - 'clusters': value.clusters, - }; -} diff --git a/typescript/src/models/OpenEnvClusterInfo.ts b/typescript/src/models/OpenEnvClusterInfo.ts deleted file mode 100644 index afeefbcd..00000000 --- a/typescript/src/models/OpenEnvClusterInfo.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 {number} - * @memberof OpenEnvClusterInfo - */ - code?: number; - /** - * 相关信息 - * @type {string} - * @memberof OpenEnvClusterInfo - */ - message?: string; - /** - * 环境标识 - * @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 { - - 'code': !exists(json, 'code') ? undefined : json['code'], - 'message': !exists(json, 'message') ? undefined : json['message'], - 'env': !exists(json, 'env') ? undefined : json['env'], - 'clusters': !exists(json, 'clusters') ? undefined : ((json['clusters'] as Array).map(OpenClusterDTOFromJSON)), - }; -} - -export function OpenEnvClusterInfoToJSON(value?: OpenEnvClusterInfo | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'code': value.code, - 'message': value.message, - 'env': value.env, - 'clusters': value.clusters === undefined ? undefined : ((value.clusters as Array).map(OpenClusterDTOToJSON)), - }; -} diff --git a/typescript/src/models/OpenEnvNamespaceRoleUserDTO.ts b/typescript/src/models/OpenEnvNamespaceRoleUserDTO.ts deleted file mode 100644 index d5011ded..00000000 --- a/typescript/src/models/OpenEnvNamespaceRoleUserDTO.ts +++ /dev/null @@ -1,102 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 { OpenUserInfoDTO } from './OpenUserInfoDTO'; -import { - OpenUserInfoDTOFromJSON, - OpenUserInfoDTOFromJSONTyped, - OpenUserInfoDTOToJSON, -} from './OpenUserInfoDTO'; - -/** - * - * @export - * @interface OpenEnvNamespaceRoleUserDTO - */ -export interface OpenEnvNamespaceRoleUserDTO { - /** - * - * @type {string} - * @memberof OpenEnvNamespaceRoleUserDTO - */ - appId?: string; - /** - * - * @type {string} - * @memberof OpenEnvNamespaceRoleUserDTO - */ - namespaceName?: string; - /** - * - * @type {Array} - * @memberof OpenEnvNamespaceRoleUserDTO - */ - modifyRoleUsers?: Array; - /** - * - * @type {Array} - * @memberof OpenEnvNamespaceRoleUserDTO - */ - releaseRoleUsers?: Array; - /** - * - * @type {string} - * @memberof OpenEnvNamespaceRoleUserDTO - */ - env?: string; -} - -/** - * Check if a given object implements the OpenEnvNamespaceRoleUserDTO interface. - */ -export function instanceOfOpenEnvNamespaceRoleUserDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenEnvNamespaceRoleUserDTOFromJSON(json: any): OpenEnvNamespaceRoleUserDTO { - return OpenEnvNamespaceRoleUserDTOFromJSONTyped(json, false); -} - -export function OpenEnvNamespaceRoleUserDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenEnvNamespaceRoleUserDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'appId': !exists(json, 'appId') ? undefined : json['appId'], - 'namespaceName': !exists(json, 'namespaceName') ? undefined : json['namespaceName'], - 'modifyRoleUsers': !exists(json, 'modifyRoleUsers') ? undefined : ((json['modifyRoleUsers'] as Array).map(OpenUserInfoDTOFromJSON)), - 'releaseRoleUsers': !exists(json, 'releaseRoleUsers') ? undefined : ((json['releaseRoleUsers'] as Array).map(OpenUserInfoDTOFromJSON)), - 'env': !exists(json, 'env') ? undefined : json['env'], - }; -} - -export function OpenEnvNamespaceRoleUserDTOToJSON(value?: OpenEnvNamespaceRoleUserDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'appId': value.appId, - 'namespaceName': value.namespaceName, - 'modifyRoleUsers': value.modifyRoleUsers === undefined ? undefined : ((value.modifyRoleUsers as Array).map(OpenUserInfoDTOToJSON)), - 'releaseRoleUsers': value.releaseRoleUsers === undefined ? undefined : ((value.releaseRoleUsers as Array).map(OpenUserInfoDTOToJSON)), - 'env': value.env, - }; -} diff --git a/typescript/src/models/OpenGrayReleaseRuleDTO.ts b/typescript/src/models/OpenGrayReleaseRuleDTO.ts deleted file mode 100644 index f86893f9..00000000 --- a/typescript/src/models/OpenGrayReleaseRuleDTO.ts +++ /dev/null @@ -1,150 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 { OpenGrayReleaseRuleItemDTO } from './OpenGrayReleaseRuleItemDTO'; -import { - OpenGrayReleaseRuleItemDTOFromJSON, - OpenGrayReleaseRuleItemDTOFromJSONTyped, - OpenGrayReleaseRuleItemDTOToJSON, -} from './OpenGrayReleaseRuleItemDTO'; - -/** - * Apollo灰度发布规则数据传输对象,表示完整的灰度发布规则配置 - * @export - * @interface OpenGrayReleaseRuleDTO - */ -export interface OpenGrayReleaseRuleDTO { - /** - * 灰度规则创建者用户名,记录是谁创建了这个灰度发布规则 - * @type {string} - * @memberof OpenGrayReleaseRuleDTO - */ - dataChangeCreatedBy?: string; - /** - * 灰度规则创建者显示名称,用于展示创建者的友好名称 - * @type {string} - * @memberof OpenGrayReleaseRuleDTO - */ - dataChangeCreatedByDisplayName?: string; - /** - * 灰度规则最后修改者用户名,记录最后一次修改规则的用户 - * @type {string} - * @memberof OpenGrayReleaseRuleDTO - */ - dataChangeLastModifiedBy?: string; - /** - * 灰度规则最后修改者显示名称,用于展示最后修改者的友好名称 - * @type {string} - * @memberof OpenGrayReleaseRuleDTO - */ - dataChangeLastModifiedByDisplayName?: string; - /** - * 灰度规则创建时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenGrayReleaseRuleDTO - */ - dataChangeCreatedTime?: string; - /** - * 灰度规则最后修改时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenGrayReleaseRuleDTO - */ - dataChangeLastModifiedTime?: string; - /** - * 所属应用的唯一标识符 - * @type {string} - * @memberof OpenGrayReleaseRuleDTO - */ - appId?: string; - /** - * 所属集群的名称 - * @type {string} - * @memberof OpenGrayReleaseRuleDTO - */ - clusterName?: string; - /** - * 所属命名空间的名称 - * @type {string} - * @memberof OpenGrayReleaseRuleDTO - */ - namespaceName?: string; - /** - * 灰度分支名称,标识灰度发布的分支 - * @type {string} - * @memberof OpenGrayReleaseRuleDTO - */ - branchName?: string; - /** - * 灰度发布规则项列表,包含具体的灰度规则条件 - * @type {Set} - * @memberof OpenGrayReleaseRuleDTO - */ - ruleItems?: Set; -} - -/** - * Check if a given object implements the OpenGrayReleaseRuleDTO interface. - */ -export function instanceOfOpenGrayReleaseRuleDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenGrayReleaseRuleDTOFromJSON(json: any): OpenGrayReleaseRuleDTO { - return OpenGrayReleaseRuleDTOFromJSONTyped(json, false); -} - -export function OpenGrayReleaseRuleDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenGrayReleaseRuleDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'dataChangeCreatedBy': !exists(json, 'dataChangeCreatedBy') ? undefined : json['dataChangeCreatedBy'], - 'dataChangeCreatedByDisplayName': !exists(json, 'dataChangeCreatedByDisplayName') ? undefined : json['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedBy': !exists(json, 'dataChangeLastModifiedBy') ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeLastModifiedByDisplayName': !exists(json, 'dataChangeLastModifiedByDisplayName') ? undefined : json['dataChangeLastModifiedByDisplayName'], - '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 : (new Set((json['ruleItems'] as Array).map(OpenGrayReleaseRuleItemDTOFromJSON))), - }; -} - -export function OpenGrayReleaseRuleDTOToJSON(value?: OpenGrayReleaseRuleDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'dataChangeCreatedBy': value.dataChangeCreatedBy, - 'dataChangeCreatedByDisplayName': value.dataChangeCreatedByDisplayName, - 'dataChangeLastModifiedBy': value.dataChangeLastModifiedBy, - 'dataChangeLastModifiedByDisplayName': value.dataChangeLastModifiedByDisplayName, - 'dataChangeCreatedTime': value.dataChangeCreatedTime, - 'dataChangeLastModifiedTime': value.dataChangeLastModifiedTime, - 'appId': value.appId, - 'clusterName': value.clusterName, - 'namespaceName': value.namespaceName, - 'branchName': value.branchName, - 'ruleItems': value.ruleItems === undefined ? undefined : (Array.from(value.ruleItems as Set).map(OpenGrayReleaseRuleItemDTOToJSON)), - }; -} diff --git a/typescript/src/models/OpenGrayReleaseRuleItemDTO.ts b/typescript/src/models/OpenGrayReleaseRuleItemDTO.ts deleted file mode 100644 index d1cc74ad..00000000 --- a/typescript/src/models/OpenGrayReleaseRuleItemDTO.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * Apollo灰度发布规则项数据传输对象,表示灰度发布的具体规则条件 - * @export - * @interface OpenGrayReleaseRuleItemDTO - */ -export interface OpenGrayReleaseRuleItemDTO { - /** - * 客户端应用ID,指定哪个应用可以获取灰度配置 - * @type {string} - * @memberof OpenGrayReleaseRuleItemDTO - */ - clientAppId?: string; - /** - * 客户端IP地址列表,指定哪些IP地址可以获取灰度配置 - * @type {Set} - * @memberof OpenGrayReleaseRuleItemDTO - */ - clientIpList?: Set; - /** - * 客户端标签列表,通过标签来识别可以获取灰度配置的客户端 - * @type {Set} - * @memberof OpenGrayReleaseRuleItemDTO - */ - clientLabelList?: Set; -} - -/** - * Check if a given object implements the OpenGrayReleaseRuleItemDTO interface. - */ -export function instanceOfOpenGrayReleaseRuleItemDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenGrayReleaseRuleItemDTOFromJSON(json: any): OpenGrayReleaseRuleItemDTO { - return OpenGrayReleaseRuleItemDTOFromJSONTyped(json, false); -} - -export function OpenGrayReleaseRuleItemDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenGrayReleaseRuleItemDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'clientAppId': !exists(json, 'clientAppId') ? undefined : json['clientAppId'], - 'clientIpList': !exists(json, 'clientIpList') ? undefined : json['clientIpList'], - 'clientLabelList': !exists(json, 'clientLabelList') ? undefined : json['clientLabelList'], - }; -} - -export function OpenGrayReleaseRuleItemDTOToJSON(value?: OpenGrayReleaseRuleItemDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'clientAppId': value.clientAppId, - 'clientIpList': value.clientIpList === undefined ? undefined : Array.from(value.clientIpList as Set), - 'clientLabelList': value.clientLabelList === undefined ? undefined : Array.from(value.clientLabelList as Set), - }; -} diff --git a/typescript/src/models/OpenInstanceConfigDTO.ts b/typescript/src/models/OpenInstanceConfigDTO.ts deleted file mode 100644 index a522d4d1..00000000 --- a/typescript/src/models/OpenInstanceConfigDTO.ts +++ /dev/null @@ -1,86 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 { OpenReleaseDTO } from './OpenReleaseDTO'; -import { - OpenReleaseDTOFromJSON, - OpenReleaseDTOFromJSONTyped, - OpenReleaseDTOToJSON, -} 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 - */ - dataChangeLastModifiedTime?: string; -} - -/** - * Check if a given object implements the OpenInstanceConfigDTO interface. - */ -export function instanceOfOpenInstanceConfigDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenInstanceConfigDTOFromJSON(json: any): OpenInstanceConfigDTO { - return OpenInstanceConfigDTOFromJSONTyped(json, false); -} - -export function OpenInstanceConfigDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenInstanceConfigDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'release': !exists(json, 'release') ? undefined : OpenReleaseDTOFromJSON(json['release']), - 'releaseDeliveryTime': !exists(json, 'releaseDeliveryTime') ? undefined : json['releaseDeliveryTime'], - 'dataChangeLastModifiedTime': !exists(json, 'dataChangeLastModifiedTime') ? undefined : json['dataChangeLastModifiedTime'], - }; -} - -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, - }; -} diff --git a/typescript/src/models/OpenInstanceDTO.ts b/typescript/src/models/OpenInstanceDTO.ts deleted file mode 100644 index ce97baa5..00000000 --- a/typescript/src/models/OpenInstanceDTO.ts +++ /dev/null @@ -1,118 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 { OpenInstanceConfigDTO } from './OpenInstanceConfigDTO'; -import { - OpenInstanceConfigDTOFromJSON, - OpenInstanceConfigDTOFromJSONTyped, - OpenInstanceConfigDTOToJSON, -} 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 - */ - dataChangeCreatedTime?: string; -} - -/** - * Check if a given object implements the OpenInstanceDTO interface. - */ -export function instanceOfOpenInstanceDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenInstanceDTOFromJSON(json: any): OpenInstanceDTO { - return OpenInstanceDTOFromJSONTyped(json, false); -} - -export function OpenInstanceDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenInstanceDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - '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 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 === undefined ? undefined : ((value.configs as Array).map(OpenInstanceConfigDTOToJSON)), - 'dataChangeCreatedTime': value.dataChangeCreatedTime, - }; -} diff --git a/typescript/src/models/OpenInstancePageDTO.ts b/typescript/src/models/OpenInstancePageDTO.ts deleted file mode 100644 index ddeb13c4..00000000 --- a/typescript/src/models/OpenInstancePageDTO.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 { OpenInstanceDTO } from './OpenInstanceDTO'; -import { - OpenInstanceDTOFromJSON, - OpenInstanceDTOFromJSONTyped, - OpenInstanceDTOToJSON, -} from './OpenInstanceDTO'; - -/** - * 分页实例数据传输对象,用于返回分页查询的实例列表结果 - * @export - * @interface OpenInstancePageDTO - */ -export interface OpenInstancePageDTO { - /** - * 当前页码,从0开始计数 - * @type {number} - * @memberof OpenInstancePageDTO - */ - page?: number; - /** - * 每页显示的记录数量 - * @type {number} - * @memberof OpenInstancePageDTO - */ - size?: number; - /** - * 总记录数,符合查询条件的实例总数量 - * @type {number} - * @memberof OpenInstancePageDTO - */ - total?: number; - /** - * 当前页的实例列表,包含具体的实例数据 - * @type {Array} - * @memberof OpenInstancePageDTO - */ - instances?: Array; -} - -/** - * Check if a given object implements the OpenInstancePageDTO interface. - */ -export function instanceOfOpenInstancePageDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenInstancePageDTOFromJSON(json: any): OpenInstancePageDTO { - return OpenInstancePageDTOFromJSONTyped(json, false); -} - -export function OpenInstancePageDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenInstancePageDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'page': !exists(json, 'page') ? undefined : json['page'], - 'size': !exists(json, 'size') ? undefined : json['size'], - 'total': !exists(json, 'total') ? undefined : json['total'], - 'instances': !exists(json, 'instances') ? undefined : ((json['instances'] as Array).map(OpenInstanceDTOFromJSON)), - }; -} - -export function OpenInstancePageDTOToJSON(value?: OpenInstancePageDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'page': value.page, - 'size': value.size, - 'total': value.total, - 'instances': value.instances === undefined ? undefined : ((value.instances as Array).map(OpenInstanceDTOToJSON)), - }; -} diff --git a/typescript/src/models/OpenItemDTO.ts b/typescript/src/models/OpenItemDTO.ts deleted file mode 100644 index 7fa14564..00000000 --- a/typescript/src/models/OpenItemDTO.ts +++ /dev/null @@ -1,158 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 { OpenItemExtendDTO } from './OpenItemExtendDTO'; -import { - OpenItemExtendDTOFromJSON, - OpenItemExtendDTOFromJSONTyped, - OpenItemExtendDTOToJSON, -} from './OpenItemExtendDTO'; - -/** - * Apollo配置项核心数据对象,仅包含键值及基础审计信息 - * @export - * @interface OpenItemDTO - */ -export interface OpenItemDTO { - /** - * 配置项的键名,在同一命名空间内唯一标识一个配置项 - * @type {string} - * @memberof OpenItemDTO - */ - key?: string; - /** - * 配置项的值,可以是字符串、数字、JSON等格式 - * @type {string} - * @memberof OpenItemDTO - */ - value?: string; - /** - * 配置项类型 - * @type {number} - * @memberof OpenItemDTO - */ - type?: number; - /** - * 配置项的注释说明,用于描述配置项的用途和含义 - * @type {string} - * @memberof OpenItemDTO - */ - comment?: string; - /** - * 配置项在命名空间中的行号,用于保持和旧版 Portal 配置项列表一致的默认展示顺序 - * @type {number} - * @memberof OpenItemDTO - */ - lineNum?: number; - /** - * - * @type {OpenItemExtendDTO} - * @memberof OpenItemDTO - */ - extendInfo?: OpenItemExtendDTO; - /** - * 配置项创建者用户名,记录是谁创建了这个配置项 - * @type {string} - * @memberof OpenItemDTO - */ - dataChangeCreatedBy?: string; - /** - * 配置项创建者显示名称,用于展示创建者的友好名称 - * @type {string} - * @memberof OpenItemDTO - */ - dataChangeCreatedByDisplayName?: string; - /** - * 配置项最后修改者用户名,记录最后一次修改配置的用户 - * @type {string} - * @memberof OpenItemDTO - */ - dataChangeLastModifiedBy?: string; - /** - * 配置项最后修改者显示名称,用于展示最后修改者的友好名称 - * @type {string} - * @memberof OpenItemDTO - */ - dataChangeLastModifiedByDisplayName?: string; - /** - * 配置项创建时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenItemDTO - */ - dataChangeCreatedTime?: string; - /** - * 配置项最后修改时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenItemDTO - */ - dataChangeLastModifiedTime?: string; -} - -/** - * Check if a given object implements the OpenItemDTO interface. - */ -export function instanceOfOpenItemDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenItemDTOFromJSON(json: any): OpenItemDTO { - return OpenItemDTOFromJSONTyped(json, false); -} - -export function OpenItemDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenItemDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'key': !exists(json, 'key') ? undefined : json['key'], - 'value': !exists(json, 'value') ? undefined : json['value'], - 'type': !exists(json, 'type') ? undefined : json['type'], - 'comment': !exists(json, 'comment') ? undefined : json['comment'], - 'lineNum': !exists(json, 'lineNum') ? undefined : json['lineNum'], - 'extendInfo': !exists(json, 'extendInfo') ? undefined : OpenItemExtendDTOFromJSON(json['extendInfo']), - 'dataChangeCreatedBy': !exists(json, 'dataChangeCreatedBy') ? undefined : json['dataChangeCreatedBy'], - 'dataChangeCreatedByDisplayName': !exists(json, 'dataChangeCreatedByDisplayName') ? undefined : json['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedBy': !exists(json, 'dataChangeLastModifiedBy') ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeLastModifiedByDisplayName': !exists(json, 'dataChangeLastModifiedByDisplayName') ? undefined : json['dataChangeLastModifiedByDisplayName'], - 'dataChangeCreatedTime': !exists(json, 'dataChangeCreatedTime') ? undefined : json['dataChangeCreatedTime'], - 'dataChangeLastModifiedTime': !exists(json, 'dataChangeLastModifiedTime') ? undefined : json['dataChangeLastModifiedTime'], - }; -} - -export function OpenItemDTOToJSON(value?: OpenItemDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'key': value.key, - 'value': value.value, - 'type': value.type, - 'comment': value.comment, - 'lineNum': value.lineNum, - 'extendInfo': OpenItemExtendDTOToJSON(value.extendInfo), - 'dataChangeCreatedBy': value.dataChangeCreatedBy, - 'dataChangeCreatedByDisplayName': value.dataChangeCreatedByDisplayName, - 'dataChangeLastModifiedBy': value.dataChangeLastModifiedBy, - 'dataChangeLastModifiedByDisplayName': value.dataChangeLastModifiedByDisplayName, - 'dataChangeCreatedTime': value.dataChangeCreatedTime, - 'dataChangeLastModifiedTime': value.dataChangeLastModifiedTime, - }; -} diff --git a/typescript/src/models/OpenItemDiffDTO.ts b/typescript/src/models/OpenItemDiffDTO.ts deleted file mode 100644 index 667b730f..00000000 --- a/typescript/src/models/OpenItemDiffDTO.ts +++ /dev/null @@ -1,116 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -import type { OpenItemDTO } from './OpenItemDTO'; -import { - OpenItemDTOFromJSON, - OpenItemDTOFromJSONTyped, - OpenItemDTOToJSON, -} from './OpenItemDTO'; -import type { OpenNamespaceIdentifier } from './OpenNamespaceIdentifier'; -import { - OpenNamespaceIdentifierFromJSON, - OpenNamespaceIdentifierFromJSONTyped, - OpenNamespaceIdentifierToJSON, -} from './OpenNamespaceIdentifier'; - -/** - * - * @export - * @interface OpenItemDiffDTO - */ -export interface OpenItemDiffDTO { - /** - * 查找结果 - * @type {number} - * @memberof OpenItemDiffDTO - */ - code?: number; - /** - * 查找结果信息 - * @type {string} - * @memberof OpenItemDiffDTO - */ - message?: string; - /** - * - * @type {OpenNamespaceIdentifier} - * @memberof OpenItemDiffDTO - */ - namespace?: OpenNamespaceIdentifier; - /** - * - * @type {Array} - * @memberof OpenItemDiffDTO - */ - createItems?: Array; - /** - * - * @type {Array} - * @memberof OpenItemDiffDTO - */ - deleteItems?: Array; - /** - * - * @type {Array} - * @memberof OpenItemDiffDTO - */ - updateItems?: Array; -} - -/** - * Check if a given object implements the OpenItemDiffDTO interface. - */ -export function instanceOfOpenItemDiffDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenItemDiffDTOFromJSON(json: any): OpenItemDiffDTO { - return OpenItemDiffDTOFromJSONTyped(json, false); -} - -export function OpenItemDiffDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenItemDiffDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'code': !exists(json, 'code') ? undefined : json['code'], - 'message': !exists(json, 'message') ? undefined : json['message'], - 'namespace': !exists(json, 'namespace') ? undefined : OpenNamespaceIdentifierFromJSON(json['namespace']), - 'createItems': !exists(json, 'createItems') ? undefined : ((json['createItems'] as Array).map(OpenItemDTOFromJSON)), - 'deleteItems': !exists(json, 'deleteItems') ? undefined : ((json['deleteItems'] as Array).map(OpenItemDTOFromJSON)), - 'updateItems': !exists(json, 'updateItems') ? undefined : ((json['updateItems'] as Array).map(OpenItemDTOFromJSON)), - }; -} - -export function OpenItemDiffDTOToJSON(value?: OpenItemDiffDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'code': value.code, - 'message': value.message, - 'namespace': OpenNamespaceIdentifierToJSON(value.namespace), - 'createItems': value.createItems === undefined ? undefined : ((value.createItems as Array).map(OpenItemDTOToJSON)), - 'deleteItems': value.deleteItems === undefined ? undefined : ((value.deleteItems as Array).map(OpenItemDTOToJSON)), - 'updateItems': value.updateItems === undefined ? undefined : ((value.updateItems as Array).map(OpenItemDTOToJSON)), - }; -} diff --git a/typescript/src/models/OpenItemExtendDTO.ts b/typescript/src/models/OpenItemExtendDTO.ts deleted file mode 100644 index 8483f75d..00000000 --- a/typescript/src/models/OpenItemExtendDTO.ts +++ /dev/null @@ -1,103 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * Apollo配置项扩展信息,包含状态、类型、归属及变更对比信息 - * @export - * @interface OpenItemExtendDTO - */ -export interface OpenItemExtendDTO { - /** - * 所属命名空间的ID - * @type {number} - * @memberof OpenItemExtendDTO - */ - namespaceId?: number; - /** - * 是否有未发布的修改 - * @type {boolean} - * @memberof OpenItemExtendDTO - */ - isModified?: boolean; - /** - * 是否被标记为删除(未发布) - * @type {boolean} - * @memberof OpenItemExtendDTO - */ - isDeleted?: boolean; - /** - * 是否为新添加的配置项(未发布) - * @type {boolean} - * @memberof OpenItemExtendDTO - */ - isNewlyAdded?: boolean; - /** - * 新的值 - * @type {string} - * @memberof OpenItemExtendDTO - */ - newValue?: string; - /** - * 上一次发布的值,用于对比变更 - * @type {string} - * @memberof OpenItemExtendDTO - */ - oldValue?: string; -} - -/** - * Check if a given object implements the OpenItemExtendDTO interface. - */ -export function instanceOfOpenItemExtendDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenItemExtendDTOFromJSON(json: any): OpenItemExtendDTO { - return OpenItemExtendDTOFromJSONTyped(json, false); -} - -export function OpenItemExtendDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenItemExtendDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'namespaceId': !exists(json, 'namespaceId') ? undefined : json['namespaceId'], - 'isModified': !exists(json, 'isModified') ? undefined : json['isModified'], - 'isDeleted': !exists(json, 'isDeleted') ? undefined : json['isDeleted'], - 'isNewlyAdded': !exists(json, 'isNewlyAdded') ? undefined : json['isNewlyAdded'], - 'newValue': !exists(json, 'newValue') ? undefined : json['newValue'], - 'oldValue': !exists(json, 'oldValue') ? undefined : json['oldValue'], - }; -} - -export function OpenItemExtendDTOToJSON(value?: OpenItemExtendDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'namespaceId': value.namespaceId, - 'isModified': value.isModified, - 'isDeleted': value.isDeleted, - 'isNewlyAdded': value.isNewlyAdded, - 'newValue': value.newValue, - 'oldValue': value.oldValue, - }; -} diff --git a/typescript/src/models/OpenItemPageDTO.ts b/typescript/src/models/OpenItemPageDTO.ts deleted file mode 100644 index 5f58d7bc..00000000 --- a/typescript/src/models/OpenItemPageDTO.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenItemPageDTO - */ -export interface OpenItemPageDTO { - /** - * 当前页码,从0开始计数 - * @type {number} - * @memberof OpenItemPageDTO - */ - page?: number; - /** - * 每页显示的记录数量 - * @type {number} - * @memberof OpenItemPageDTO - */ - size?: number; - /** - * 总记录数,符合查询条件的配置项总数量 - * @type {number} - * @memberof OpenItemPageDTO - */ - total?: number; - /** - * 当前页的配置项列表,包含具体的配置项数据 - * @type {Array} - * @memberof OpenItemPageDTO - */ - content?: Array; -} - -/** - * Check if a given object implements the OpenItemPageDTO interface. - */ -export function instanceOfOpenItemPageDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenItemPageDTOFromJSON(json: any): OpenItemPageDTO { - return OpenItemPageDTOFromJSONTyped(json, false); -} - -export function OpenItemPageDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenItemPageDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - '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 OpenItemPageDTOToJSON(value?: OpenItemPageDTO | 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 === undefined ? undefined : ((value.content as Array).map(OpenItemDTOToJSON)), - }; -} diff --git a/typescript/src/models/OpenMissEnvDTO.ts b/typescript/src/models/OpenMissEnvDTO.ts deleted file mode 100644 index dc7d05c3..00000000 --- a/typescript/src/models/OpenMissEnvDTO.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface OpenMissEnvDTO - */ -export interface OpenMissEnvDTO { - /** - * 查询状态码 - * @type {number} - * @memberof OpenMissEnvDTO - */ - code?: number; - /** - * - * @type {string} - * @memberof OpenMissEnvDTO - */ - message?: string; -} - -/** - * Check if a given object implements the OpenMissEnvDTO interface. - */ -export function instanceOfOpenMissEnvDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenMissEnvDTOFromJSON(json: any): OpenMissEnvDTO { - return OpenMissEnvDTOFromJSONTyped(json, false); -} - -export function OpenMissEnvDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenMissEnvDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'code': !exists(json, 'code') ? undefined : json['code'], - 'message': !exists(json, 'message') ? undefined : json['message'], - }; -} - -export function OpenMissEnvDTOToJSON(value?: OpenMissEnvDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'code': value.code, - 'message': value.message, - }; -} diff --git a/typescript/src/models/OpenNamespaceDTO.ts b/typescript/src/models/OpenNamespaceDTO.ts deleted file mode 100644 index 9431f258..00000000 --- a/typescript/src/models/OpenNamespaceDTO.ts +++ /dev/null @@ -1,180 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 { OpenNamespaceExtendDTO } from './OpenNamespaceExtendDTO'; -import { - OpenNamespaceExtendDTOFromJSON, - OpenNamespaceExtendDTOFromJSONTyped, - OpenNamespaceExtendDTOToJSON, -} from './OpenNamespaceExtendDTO'; - -/** - * Apollo命名空间数据传输对象,表示一个完整的命名空间及其配置项 - * @export - * @interface OpenNamespaceDTO - */ -export interface OpenNamespaceDTO { - /** - * 命名空间创建者用户名,记录是谁创建了这个命名空间 - * @type {string} - * @memberof OpenNamespaceDTO - */ - dataChangeCreatedBy?: string; - /** - * 命名空间创建者显示名称,用于展示创建者的友好名称 - * @type {string} - * @memberof OpenNamespaceDTO - */ - dataChangeCreatedByDisplayName?: string; - /** - * 命名空间最后修改者用户名,记录最后一次修改命名空间信息的用户 - * @type {string} - * @memberof OpenNamespaceDTO - */ - dataChangeLastModifiedBy?: string; - /** - * 命名空间最后修改者显示名称,用于展示最后修改者的友好名称 - * @type {string} - * @memberof OpenNamespaceDTO - */ - dataChangeLastModifiedByDisplayName?: string; - /** - * 命名空间创建时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenNamespaceDTO - */ - dataChangeCreatedTime?: string; - /** - * 命名空间最后修改时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenNamespaceDTO - */ - dataChangeLastModifiedTime?: string; - /** - * 所属应用的唯一标识符 - * @type {string} - * @memberof OpenNamespaceDTO - */ - appId?: string; - /** - * 所属集群的名称 - * @type {string} - * @memberof OpenNamespaceDTO - */ - clusterName?: string; - /** - * 命名空间名称,在同一应用和集群下唯一标识一个命名空间 - * @type {string} - * @memberof OpenNamespaceDTO - */ - namespaceName?: string; - /** - * 命名空间备注说明,描述命名空间的用途 - * @type {string} - * @memberof OpenNamespaceDTO - */ - comment?: string; - /** - * 命名空间格式类型,如properties、xml、json、yml等 - * @type {string} - * @memberof OpenNamespaceDTO - */ - format?: string; - /** - * 是否为公共命名空间,公共命名空间可以被其他应用关联使用 - * @type {boolean} - * @memberof OpenNamespaceDTO - */ - isPublic?: boolean; - /** - * 命名空间包含的配置项列表 - * @type {Array} - * @memberof OpenNamespaceDTO - */ - items?: Array; - /** - * - * @type {OpenNamespaceExtendDTO} - * @memberof OpenNamespaceDTO - */ - extendInfo?: OpenNamespaceExtendDTO; -} - -/** - * Check if a given object implements the OpenNamespaceDTO interface. - */ -export function instanceOfOpenNamespaceDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenNamespaceDTOFromJSON(json: any): OpenNamespaceDTO { - return OpenNamespaceDTOFromJSONTyped(json, false); -} - -export function OpenNamespaceDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenNamespaceDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'dataChangeCreatedBy': !exists(json, 'dataChangeCreatedBy') ? undefined : json['dataChangeCreatedBy'], - 'dataChangeCreatedByDisplayName': !exists(json, 'dataChangeCreatedByDisplayName') ? undefined : json['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedBy': !exists(json, 'dataChangeLastModifiedBy') ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeLastModifiedByDisplayName': !exists(json, 'dataChangeLastModifiedByDisplayName') ? undefined : json['dataChangeLastModifiedByDisplayName'], - '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)), - 'extendInfo': !exists(json, 'extendInfo') ? undefined : OpenNamespaceExtendDTOFromJSON(json['extendInfo']), - }; -} - -export function OpenNamespaceDTOToJSON(value?: OpenNamespaceDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'dataChangeCreatedBy': value.dataChangeCreatedBy, - 'dataChangeCreatedByDisplayName': value.dataChangeCreatedByDisplayName, - 'dataChangeLastModifiedBy': value.dataChangeLastModifiedBy, - 'dataChangeLastModifiedByDisplayName': value.dataChangeLastModifiedByDisplayName, - '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)), - 'extendInfo': OpenNamespaceExtendDTOToJSON(value.extendInfo), - }; -} diff --git a/typescript/src/models/OpenNamespaceExtendDTO.ts b/typescript/src/models/OpenNamespaceExtendDTO.ts deleted file mode 100644 index b270280c..00000000 --- a/typescript/src/models/OpenNamespaceExtendDTO.ts +++ /dev/null @@ -1,79 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * - * @export - * @interface OpenNamespaceExtendDTO - */ -export interface OpenNamespaceExtendDTO { - /** - * 当当前用户无权限查看配置时置为 true - * @type {boolean} - * @memberof OpenNamespaceExtendDTO - */ - isConfigHidden?: boolean; - /** - * 公共命名空间的归属应用 AppId,用于判断是否关联公共 namespace 并提供跳转 - * @type {string} - * @memberof OpenNamespaceExtendDTO - */ - parentAppId?: string; - /** - * 未发布变更数 - * @type {number} - * @memberof OpenNamespaceExtendDTO - */ - itemModifiedCnt?: number; -} - -/** - * Check if a given object implements the OpenNamespaceExtendDTO interface. - */ -export function instanceOfOpenNamespaceExtendDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenNamespaceExtendDTOFromJSON(json: any): OpenNamespaceExtendDTO { - return OpenNamespaceExtendDTOFromJSONTyped(json, false); -} - -export function OpenNamespaceExtendDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenNamespaceExtendDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'isConfigHidden': !exists(json, 'isConfigHidden') ? undefined : json['isConfigHidden'], - 'parentAppId': !exists(json, 'parentAppId') ? undefined : json['parentAppId'], - 'itemModifiedCnt': !exists(json, 'itemModifiedCnt') ? undefined : json['itemModifiedCnt'], - }; -} - -export function OpenNamespaceExtendDTOToJSON(value?: OpenNamespaceExtendDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'isConfigHidden': value.isConfigHidden, - 'parentAppId': value.parentAppId, - 'itemModifiedCnt': value.itemModifiedCnt, - }; -} diff --git a/typescript/src/models/OpenNamespaceIdentifier.ts b/typescript/src/models/OpenNamespaceIdentifier.ts deleted file mode 100644 index 07271261..00000000 --- a/typescript/src/models/OpenNamespaceIdentifier.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 deleted file mode 100644 index 8e155e34..00000000 --- a/typescript/src/models/OpenNamespaceLockDTO.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * Apollo命名空间锁状态数据传输对象 - * @export - * @interface OpenNamespaceLockDTO - */ -export interface OpenNamespaceLockDTO { - /** - * 命名空间名称 - * @type {string} - * @memberof OpenNamespaceLockDTO - */ - namespaceName?: string; - /** - * 是否被锁定 - * @type {boolean} - * @memberof OpenNamespaceLockDTO - */ - isLocked?: boolean; - /** - * 锁定者用户名 - * @type {string} - * @memberof OpenNamespaceLockDTO - */ - lockedBy?: string; - /** - * 是否允许紧急发布 - * @type {boolean} - * @memberof OpenNamespaceLockDTO - */ - isEmergencyPublishAllowed?: boolean; -} - -/** - * Check if a given object implements the OpenNamespaceLockDTO interface. - */ -export function instanceOfOpenNamespaceLockDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenNamespaceLockDTOFromJSON(json: any): OpenNamespaceLockDTO { - return OpenNamespaceLockDTOFromJSONTyped(json, false); -} - -export function OpenNamespaceLockDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenNamespaceLockDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'namespaceName': !exists(json, 'namespaceName') ? undefined : json['namespaceName'], - 'isLocked': !exists(json, 'isLocked') ? undefined : json['isLocked'], - 'lockedBy': !exists(json, 'lockedBy') ? undefined : json['lockedBy'], - 'isEmergencyPublishAllowed': !exists(json, 'isEmergencyPublishAllowed') ? undefined : json['isEmergencyPublishAllowed'], - }; -} - -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, - 'isEmergencyPublishAllowed': value.isEmergencyPublishAllowed, - }; -} diff --git a/typescript/src/models/OpenNamespaceRoleUserDTO.ts b/typescript/src/models/OpenNamespaceRoleUserDTO.ts deleted file mode 100644 index d8bc3ef4..00000000 --- a/typescript/src/models/OpenNamespaceRoleUserDTO.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 { OpenUserInfoDTO } from './OpenUserInfoDTO'; -import { - OpenUserInfoDTOFromJSON, - OpenUserInfoDTOFromJSONTyped, - OpenUserInfoDTOToJSON, -} from './OpenUserInfoDTO'; - -/** - * - * @export - * @interface OpenNamespaceRoleUserDTO - */ -export interface OpenNamespaceRoleUserDTO { - /** - * - * @type {string} - * @memberof OpenNamespaceRoleUserDTO - */ - appId?: string; - /** - * - * @type {string} - * @memberof OpenNamespaceRoleUserDTO - */ - namespaceName?: string; - /** - * - * @type {Array} - * @memberof OpenNamespaceRoleUserDTO - */ - modifyRoleUsers?: Array; - /** - * - * @type {Array} - * @memberof OpenNamespaceRoleUserDTO - */ - releaseRoleUsers?: Array; -} - -/** - * Check if a given object implements the OpenNamespaceRoleUserDTO interface. - */ -export function instanceOfOpenNamespaceRoleUserDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenNamespaceRoleUserDTOFromJSON(json: any): OpenNamespaceRoleUserDTO { - return OpenNamespaceRoleUserDTOFromJSONTyped(json, false); -} - -export function OpenNamespaceRoleUserDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenNamespaceRoleUserDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'appId': !exists(json, 'appId') ? undefined : json['appId'], - 'namespaceName': !exists(json, 'namespaceName') ? undefined : json['namespaceName'], - 'modifyRoleUsers': !exists(json, 'modifyRoleUsers') ? undefined : ((json['modifyRoleUsers'] as Array).map(OpenUserInfoDTOFromJSON)), - 'releaseRoleUsers': !exists(json, 'releaseRoleUsers') ? undefined : ((json['releaseRoleUsers'] as Array).map(OpenUserInfoDTOFromJSON)), - }; -} - -export function OpenNamespaceRoleUserDTOToJSON(value?: OpenNamespaceRoleUserDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'appId': value.appId, - 'namespaceName': value.namespaceName, - 'modifyRoleUsers': value.modifyRoleUsers === undefined ? undefined : ((value.modifyRoleUsers as Array).map(OpenUserInfoDTOToJSON)), - 'releaseRoleUsers': value.releaseRoleUsers === undefined ? undefined : ((value.releaseRoleUsers as Array).map(OpenUserInfoDTOToJSON)), - }; -} diff --git a/typescript/src/models/OpenNamespaceSyncDTO.ts b/typescript/src/models/OpenNamespaceSyncDTO.ts deleted file mode 100644 index 81deb5e6..00000000 --- a/typescript/src/models/OpenNamespaceSyncDTO.ts +++ /dev/null @@ -1,84 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenNamespaceSyncDTO - */ -export interface OpenNamespaceSyncDTO { - /** - * 目标命名空间标识列表 - * @type {Array} - * @memberof OpenNamespaceSyncDTO - */ - syncToNamespaces?: Array; - /** - * 需要修改的配置项列表 - * @type {Array} - * @memberof OpenNamespaceSyncDTO - */ - syncItems?: Array; -} - -/** - * Check if a given object implements the OpenNamespaceSyncDTO interface. - */ -export function instanceOfOpenNamespaceSyncDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenNamespaceSyncDTOFromJSON(json: any): OpenNamespaceSyncDTO { - return OpenNamespaceSyncDTOFromJSONTyped(json, false); -} - -export function OpenNamespaceSyncDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenNamespaceSyncDTO { - 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 OpenNamespaceSyncDTOToJSON(value?: OpenNamespaceSyncDTO | 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 deleted file mode 100644 index dd0de852..00000000 --- a/typescript/src/models/OpenNamespaceTextModel.ts +++ /dev/null @@ -1,119 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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/OpenNamespaceUsageDTO.ts b/typescript/src/models/OpenNamespaceUsageDTO.ts deleted file mode 100644 index 8b863aa1..00000000 --- a/typescript/src/models/OpenNamespaceUsageDTO.ts +++ /dev/null @@ -1,111 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * 命名空间使用情况数据传输对象,统计各环境和集群下的使用指标 - * @export - * @interface OpenNamespaceUsageDTO - */ -export interface OpenNamespaceUsageDTO { - /** - * 命名空间名称 - * @type {string} - * @memberof OpenNamespaceUsageDTO - */ - namespaceName?: string; - /** - * 所属应用的唯一标识符 - * @type {string} - * @memberof OpenNamespaceUsageDTO - */ - appId?: string; - /** - * 所属集群名称 - * @type {string} - * @memberof OpenNamespaceUsageDTO - */ - clusterName?: string; - /** - * 环境名称 - * @type {string} - * @memberof OpenNamespaceUsageDTO - */ - envName?: string; - /** - * 该命名空间关联的实例数量 - * @type {number} - * @memberof OpenNamespaceUsageDTO - */ - instanceCount?: number; - /** - * 分支命名空间关联的实例数量 - * @type {number} - * @memberof OpenNamespaceUsageDTO - */ - branchInstanceCount?: number; - /** - * 关联到该公共命名空间的命名空间数量 - * @type {number} - * @memberof OpenNamespaceUsageDTO - */ - linkedNamespaceCount?: number; -} - -/** - * Check if a given object implements the OpenNamespaceUsageDTO interface. - */ -export function instanceOfOpenNamespaceUsageDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenNamespaceUsageDTOFromJSON(json: any): OpenNamespaceUsageDTO { - return OpenNamespaceUsageDTOFromJSONTyped(json, false); -} - -export function OpenNamespaceUsageDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenNamespaceUsageDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'namespaceName': !exists(json, 'namespaceName') ? undefined : json['namespaceName'], - 'appId': !exists(json, 'appId') ? undefined : json['appId'], - 'clusterName': !exists(json, 'clusterName') ? undefined : json['clusterName'], - 'envName': !exists(json, 'envName') ? undefined : json['envName'], - 'instanceCount': !exists(json, 'instanceCount') ? undefined : json['instanceCount'], - 'branchInstanceCount': !exists(json, 'branchInstanceCount') ? undefined : json['branchInstanceCount'], - 'linkedNamespaceCount': !exists(json, 'linkedNamespaceCount') ? undefined : json['linkedNamespaceCount'], - }; -} - -export function OpenNamespaceUsageDTOToJSON(value?: OpenNamespaceUsageDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'namespaceName': value.namespaceName, - 'appId': value.appId, - 'clusterName': value.clusterName, - 'envName': value.envName, - 'instanceCount': value.instanceCount, - 'branchInstanceCount': value.branchInstanceCount, - 'linkedNamespaceCount': value.linkedNamespaceCount, - }; -} diff --git a/typescript/src/models/OpenOrganizationDto.ts b/typescript/src/models/OpenOrganizationDto.ts deleted file mode 100644 index 7b9d0630..00000000 --- a/typescript/src/models/OpenOrganizationDto.ts +++ /dev/null @@ -1,71 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenOrganizationDto - */ -export interface OpenOrganizationDto { - /** - * 组织ID - * @type {string} - * @memberof OpenOrganizationDto - */ - orgId?: string; - /** - * 组织名称 - * @type {string} - * @memberof OpenOrganizationDto - */ - orgName?: string; -} - -/** - * Check if a given object implements the OpenOrganizationDto interface. - */ -export function instanceOfOpenOrganizationDto(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenOrganizationDtoFromJSON(json: any): OpenOrganizationDto { - return OpenOrganizationDtoFromJSONTyped(json, false); -} - -export function OpenOrganizationDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenOrganizationDto { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'orgId': !exists(json, 'orgId') ? undefined : json['orgId'], - 'orgName': !exists(json, 'orgName') ? undefined : json['orgName'], - }; -} - -export function OpenOrganizationDtoToJSON(value?: OpenOrganizationDto | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'orgId': value.orgId, - 'orgName': value.orgName, - }; -} diff --git a/typescript/src/models/OpenPermissionConditionDTO.ts b/typescript/src/models/OpenPermissionConditionDTO.ts deleted file mode 100644 index 6a1f2934..00000000 --- a/typescript/src/models/OpenPermissionConditionDTO.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenPermissionConditionDTO - */ -export interface OpenPermissionConditionDTO { - /** - * - * @type {boolean} - * @memberof OpenPermissionConditionDTO - */ - hasPermission?: boolean; -} - -/** - * Check if a given object implements the OpenPermissionConditionDTO interface. - */ -export function instanceOfOpenPermissionConditionDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenPermissionConditionDTOFromJSON(json: any): OpenPermissionConditionDTO { - return OpenPermissionConditionDTOFromJSONTyped(json, false); -} - -export function OpenPermissionConditionDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenPermissionConditionDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'hasPermission': !exists(json, 'hasPermission') ? undefined : json['hasPermission'], - }; -} - -export function OpenPermissionConditionDTOToJSON(value?: OpenPermissionConditionDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'hasPermission': value.hasPermission, - }; -} diff --git a/typescript/src/models/OpenReleaseChangeDTO.ts b/typescript/src/models/OpenReleaseChangeDTO.ts deleted file mode 100644 index 16e86da3..00000000 --- a/typescript/src/models/OpenReleaseChangeDTO.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenReleaseChangeDTO - */ -export interface OpenReleaseChangeDTO { - /** - * 修改类型 - * @type {string} - * @memberof OpenReleaseChangeDTO - */ - changeType?: string; - /** - * key - * @type {string} - * @memberof OpenReleaseChangeDTO - */ - key?: string; - /** - * new value - * @type {string} - * @memberof OpenReleaseChangeDTO - */ - newValue?: string; - /** - * old value - * @type {string} - * @memberof OpenReleaseChangeDTO - */ - oldValue?: string; -} - -/** - * Check if a given object implements the OpenReleaseChangeDTO interface. - */ -export function instanceOfOpenReleaseChangeDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenReleaseChangeDTOFromJSON(json: any): OpenReleaseChangeDTO { - return OpenReleaseChangeDTOFromJSONTyped(json, false); -} - -export function OpenReleaseChangeDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenReleaseChangeDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'changeType': !exists(json, 'changeType') ? undefined : json['changeType'], - 'key': !exists(json, 'key') ? undefined : json['key'], - 'newValue': !exists(json, 'newValue') ? undefined : json['newValue'], - 'oldValue': !exists(json, 'oldValue') ? undefined : json['oldValue'], - }; -} - -export function OpenReleaseChangeDTOToJSON(value?: OpenReleaseChangeDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'changeType': value.changeType, - 'key': value.key, - 'newValue': value.newValue, - 'oldValue': value.oldValue, - }; -} diff --git a/typescript/src/models/OpenReleaseDTO.ts b/typescript/src/models/OpenReleaseDTO.ts deleted file mode 100644 index 5afd22c4..00000000 --- a/typescript/src/models/OpenReleaseDTO.ts +++ /dev/null @@ -1,159 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -import { exists, mapValues } from '../runtime'; -/** - * Apollo发布信息数据传输对象,表示一次配置发布的完整信息 - * @export - * @interface OpenReleaseDTO - */ -export interface OpenReleaseDTO { - /** - * 发布创建者用户名,记录是谁创建了这次发布 - * @type {string} - * @memberof OpenReleaseDTO - */ - dataChangeCreatedBy?: string; - /** - * 发布创建者显示名称,用于展示创建者的友好名称 - * @type {string} - * @memberof OpenReleaseDTO - */ - dataChangeCreatedByDisplayName?: string; - /** - * 发布最后修改者用户名,记录最后一次修改发布信息的用户 - * @type {string} - * @memberof OpenReleaseDTO - */ - dataChangeLastModifiedBy?: string; - /** - * 发布最后修改者显示名称,用于展示最后修改者的友好名称 - * @type {string} - * @memberof OpenReleaseDTO - */ - dataChangeLastModifiedByDisplayName?: string; - /** - * 发布创建时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenReleaseDTO - */ - dataChangeCreatedTime?: string; - /** - * 发布最后修改时间,ISO 8601格式的时间戳 - * @type {string} - * @memberof OpenReleaseDTO - */ - dataChangeLastModifiedTime?: string; - /** - * 发布记录的唯一标识符,系统自动生成 - * @type {number} - * @memberof OpenReleaseDTO - */ - id?: number; - /** - * 所属应用的唯一标识符 - * @type {string} - * @memberof OpenReleaseDTO - */ - appId?: string; - /** - * 所属集群的名称 - * @type {string} - * @memberof OpenReleaseDTO - */ - clusterName?: string; - /** - * 所属命名空间的名称 - * @type {string} - * @memberof OpenReleaseDTO - */ - namespaceName?: string; - /** - * 发布名称,用于标识这次发布的版本或描述 - * @type {string} - * @memberof OpenReleaseDTO - */ - name?: string; - /** - * - * @type {{ [key: string]: string; }} - * @memberof OpenReleaseDTO - */ - configurations?: { [key: string]: string; }; - /** - * 发布备注,描述本次发布的变更内容和目的 - * @type {string} - * @memberof OpenReleaseDTO - */ - comment?: string; -} - -/** - * Check if a given object implements the OpenReleaseDTO interface. - */ -export function instanceOfOpenReleaseDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenReleaseDTOFromJSON(json: any): OpenReleaseDTO { - return OpenReleaseDTOFromJSONTyped(json, false); -} - -export function OpenReleaseDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenReleaseDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'dataChangeCreatedBy': !exists(json, 'dataChangeCreatedBy') ? undefined : json['dataChangeCreatedBy'], - 'dataChangeCreatedByDisplayName': !exists(json, 'dataChangeCreatedByDisplayName') ? undefined : json['dataChangeCreatedByDisplayName'], - 'dataChangeLastModifiedBy': !exists(json, 'dataChangeLastModifiedBy') ? undefined : json['dataChangeLastModifiedBy'], - 'dataChangeLastModifiedByDisplayName': !exists(json, 'dataChangeLastModifiedByDisplayName') ? undefined : json['dataChangeLastModifiedByDisplayName'], - '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 OpenReleaseDTOToJSON(value?: OpenReleaseDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'dataChangeCreatedBy': value.dataChangeCreatedBy, - 'dataChangeCreatedByDisplayName': value.dataChangeCreatedByDisplayName, - 'dataChangeLastModifiedBy': value.dataChangeLastModifiedBy, - 'dataChangeLastModifiedByDisplayName': value.dataChangeLastModifiedByDisplayName, - '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/OpenReleaseDiffDTO.ts b/typescript/src/models/OpenReleaseDiffDTO.ts deleted file mode 100644 index ca5ea5ce..00000000 --- a/typescript/src/models/OpenReleaseDiffDTO.ts +++ /dev/null @@ -1,70 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 { OpenReleaseChangeDTO } from './OpenReleaseChangeDTO'; -import { - OpenReleaseChangeDTOFromJSON, - OpenReleaseChangeDTOFromJSONTyped, - OpenReleaseChangeDTOToJSON, -} from './OpenReleaseChangeDTO'; - -/** - * - * @export - * @interface OpenReleaseDiffDTO - */ -export interface OpenReleaseDiffDTO { - /** - * A list of changes, ensuring order if necessary. - * @type {Array} - * @memberof OpenReleaseDiffDTO - */ - changes?: Array; -} - -/** - * Check if a given object implements the OpenReleaseDiffDTO interface. - */ -export function instanceOfOpenReleaseDiffDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenReleaseDiffDTOFromJSON(json: any): OpenReleaseDiffDTO { - return OpenReleaseDiffDTOFromJSONTyped(json, false); -} - -export function OpenReleaseDiffDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenReleaseDiffDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'changes': !exists(json, 'changes') ? undefined : ((json['changes'] as Array).map(OpenReleaseChangeDTOFromJSON)), - }; -} - -export function OpenReleaseDiffDTOToJSON(value?: OpenReleaseDiffDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'changes': value.changes === undefined ? undefined : ((value.changes as Array).map(OpenReleaseChangeDTOToJSON)), - }; -} diff --git a/typescript/src/models/OpenUserDTO.ts b/typescript/src/models/OpenUserDTO.ts deleted file mode 100644 index b7f34d4a..00000000 --- a/typescript/src/models/OpenUserDTO.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenUserDTO - */ -export interface OpenUserDTO { - /** - * 用户名 - * @type {string} - * @memberof OpenUserDTO - */ - username?: string; - /** - * 用户显示名 - * @type {string} - * @memberof OpenUserDTO - */ - userDisplayName?: string; - /** - * 用户密码 - * @type {string} - * @memberof OpenUserDTO - */ - password?: string; - /** - * 用户邮箱 - * @type {string} - * @memberof OpenUserDTO - */ - email?: string; - /** - * 是否启用,1 表示启用,0 表示禁用 - * @type {number} - * @memberof OpenUserDTO - */ - enabled?: number; -} - -/** - * Check if a given object implements the OpenUserDTO interface. - */ -export function instanceOfOpenUserDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenUserDTOFromJSON(json: any): OpenUserDTO { - return OpenUserDTOFromJSONTyped(json, false); -} - -export function OpenUserDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenUserDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'username': !exists(json, 'username') ? undefined : json['username'], - 'userDisplayName': !exists(json, 'userDisplayName') ? undefined : json['userDisplayName'], - 'password': !exists(json, 'password') ? undefined : json['password'], - 'email': !exists(json, 'email') ? undefined : json['email'], - 'enabled': !exists(json, 'enabled') ? undefined : json['enabled'], - }; -} - -export function OpenUserDTOToJSON(value?: OpenUserDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'username': value.username, - 'userDisplayName': value.userDisplayName, - 'password': value.password, - 'email': value.email, - 'enabled': value.enabled, - }; -} diff --git a/typescript/src/models/OpenUserInfoDTO.ts b/typescript/src/models/OpenUserInfoDTO.ts deleted file mode 100644 index 4289bc6c..00000000 --- a/typescript/src/models/OpenUserInfoDTO.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * 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 OpenUserInfoDTO - */ -export interface OpenUserInfoDTO { - /** - * - * @type {string} - * @memberof OpenUserInfoDTO - */ - userId?: string; - /** - * - * @type {string} - * @memberof OpenUserInfoDTO - */ - name?: string; - /** - * - * @type {string} - * @memberof OpenUserInfoDTO - */ - email?: string; - /** - * - * @type {number} - * @memberof OpenUserInfoDTO - */ - enabled?: number; -} - -/** - * Check if a given object implements the OpenUserInfoDTO interface. - */ -export function instanceOfOpenUserInfoDTO(value: object): boolean { - let isInstance = true; - - return isInstance; -} - -export function OpenUserInfoDTOFromJSON(json: any): OpenUserInfoDTO { - return OpenUserInfoDTOFromJSONTyped(json, false); -} - -export function OpenUserInfoDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): OpenUserInfoDTO { - if ((json === undefined) || (json === null)) { - return json; - } - return { - - 'userId': !exists(json, 'userId') ? undefined : json['userId'], - 'name': !exists(json, 'name') ? undefined : json['name'], - 'email': !exists(json, 'email') ? undefined : json['email'], - 'enabled': !exists(json, 'enabled') ? undefined : json['enabled'], - }; -} - -export function OpenUserInfoDTOToJSON(value?: OpenUserInfoDTO | null): any { - if (value === undefined) { - return undefined; - } - if (value === null) { - return null; - } - return { - - 'userId': value.userId, - 'name': value.name, - 'email': value.email, - 'enabled': value.enabled, - }; -} diff --git a/typescript/src/models/index.ts b/typescript/src/models/index.ts deleted file mode 100644 index 7eafcc5c..00000000 --- a/typescript/src/models/index.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -export * from './ExceptionResponse'; -export * from './NamespaceGrayDelReleaseDTO'; -export * from './NamespaceReleaseDTO'; -export * from './OpenAccessKeyDTO'; -export * from './OpenAppDTO'; -export * from './OpenAppNamespaceDTO'; -export * from './OpenAppRoleUserDTO'; -export * from './OpenClusterDTO'; -export * from './OpenClusterNamespaceRoleUserDTO'; -export * from './OpenCreateAppDTO'; -export * from './OpenCreateNamespaceDTO'; -export * from './OpenEnvClusterDTO'; -export * from './OpenEnvClusterInfo'; -export * from './OpenEnvNamespaceRoleUserDTO'; -export * from './OpenGrayReleaseRuleDTO'; -export * from './OpenGrayReleaseRuleItemDTO'; -export * from './OpenInstanceConfigDTO'; -export * from './OpenInstanceDTO'; -export * from './OpenInstancePageDTO'; -export * from './OpenItemDTO'; -export * from './OpenItemDiffDTO'; -export * from './OpenItemExtendDTO'; -export * from './OpenItemPageDTO'; -export * from './OpenMissEnvDTO'; -export * from './OpenNamespaceDTO'; -export * from './OpenNamespaceExtendDTO'; -export * from './OpenNamespaceIdentifier'; -export * from './OpenNamespaceLockDTO'; -export * from './OpenNamespaceRoleUserDTO'; -export * from './OpenNamespaceSyncDTO'; -export * from './OpenNamespaceTextModel'; -export * from './OpenNamespaceUsageDTO'; -export * from './OpenOrganizationDto'; -export * from './OpenPermissionConditionDTO'; -export * from './OpenReleaseChangeDTO'; -export * from './OpenReleaseDTO'; -export * from './OpenReleaseDiffDTO'; -export * from './OpenUserDTO'; -export * from './OpenUserInfoDTO'; diff --git a/typescript/src/runtime.ts b/typescript/src/runtime.ts deleted file mode 100644 index e5efce12..00000000 --- a/typescript/src/runtime.ts +++ /dev/null @@ -1,424 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -/** - * Apollo OpenAPI - *

Apollo配置中心OpenAPI接口文档

认证方式

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

获取 Token 的方式:

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

使用示例

curl -X GET \"http://localhost:8070/openapi/v1/apps\" \\ -H \"Authorization: your_token_here\"
- * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -export const BASE_PATH = "http://localhost".replace(/\/+$/, ""); - -export interface ConfigurationParameters { - basePath?: string; // override base path - fetchApi?: FetchAPI; // override for fetch implementation - middleware?: Middleware[]; // middleware to apply before/after fetch requests - queryParamsStringify?: (params: HTTPQuery) => string; // stringify function for query strings - username?: string; // parameter for basic security - password?: string; // parameter for basic security - apiKey?: string | ((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 -} - -export class Configuration { - constructor(private configuration: ConfigurationParameters = {}) {} - - set config(configuration: Configuration) { - this.configuration = configuration; - } - - get basePath(): string { - return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH; - } - - get fetchApi(): FetchAPI | undefined { - return this.configuration.fetchApi; - } - - get middleware(): Middleware[] { - return this.configuration.middleware || []; - } - - get queryParamsStringify(): (params: HTTPQuery) => string { - return this.configuration.queryParamsStringify || querystring; - } - - get username(): string | undefined { - return this.configuration.username; - } - - get password(): string | undefined { - return this.configuration.password; - } - - get apiKey(): ((name: string) => string) | undefined { - const apiKey = this.configuration.apiKey; - if (apiKey) { - return typeof apiKey === 'function' ? apiKey : () => apiKey; - } - return undefined; - } - - get accessToken(): ((name?: string, scopes?: string[]) => string | Promise) | undefined { - const accessToken = this.configuration.accessToken; - if (accessToken) { - return typeof accessToken === 'function' ? accessToken : async () => accessToken; - } - return undefined; - } - - get headers(): HTTPHeaders | undefined { - return this.configuration.headers; - } - - get credentials(): RequestCredentials | undefined { - return this.configuration.credentials; - } -} - -export const DefaultConfig = new Configuration(); - -/** - * This is the base class for all generated API classes. - */ -export class BaseAPI { - - private static readonly jsonRegex = new RegExp('^(:?application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(:?;.*)?$', 'i'); - private middleware: Middleware[]; - - constructor(protected configuration = DefaultConfig) { - this.middleware = configuration.middleware; - } - - withMiddleware(this: T, ...middlewares: Middleware[]) { - const next = this.clone(); - next.middleware = next.middleware.concat(...middlewares); - return next; - } - - withPreMiddleware(this: T, ...preMiddlewares: Array) { - const middlewares = preMiddlewares.map((pre) => ({ pre })); - return this.withMiddleware(...middlewares); - } - - withPostMiddleware(this: T, ...postMiddlewares: Array) { - const middlewares = postMiddlewares.map((post) => ({ post })); - return this.withMiddleware(...middlewares); - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - protected isJsonMime(mime: string | null | undefined): boolean { - if (!mime) { - return false; - } - return BaseAPI.jsonRegex.test(mime); - } - - protected async request(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction): Promise { - const { url, init } = await this.createFetchParams(context, initOverrides); - const response = await this.fetchApi(url, init); - if (response && (response.status >= 200 && response.status < 300)) { - return response; - } - throw new ResponseError(response, 'Response returned an error code'); - } - - private async createFetchParams(context: RequestOpts, initOverrides?: RequestInit | InitOverrideFunction) { - let url = this.configuration.basePath + context.path; - if (context.query !== undefined && Object.keys(context.query).length !== 0) { - // only add the querystring to the URL if there are query parameters. - // this is done to avoid urls ending with a "?" character which buggy webservers - // do not handle correctly sometimes. - url += '?' + this.configuration.queryParamsStringify(context.query); - } - - const headers = Object.assign({}, this.configuration.headers, context.headers); - Object.keys(headers).forEach(key => headers[key] === undefined ? delete headers[key] : {}); - - const initOverrideFn = - typeof initOverrides === "function" - ? initOverrides - : async () => initOverrides; - - const initParams = { - method: context.method, - headers, - body: context.body, - credentials: this.configuration.credentials, - }; - - const overriddenInit: RequestInit = { - ...initParams, - ...(await initOverrideFn({ - init: initParams, - context, - })) - }; - - const init: RequestInit = { - ...overriddenInit, - body: - isFormData(overriddenInit.body) || - overriddenInit.body instanceof URLSearchParams || - isBlob(overriddenInit.body) - ? overriddenInit.body - : JSON.stringify(overriddenInit.body), - }; - - return { url, init }; - } - - private fetchApi = async (url: string, init: RequestInit) => { - let fetchParams = { url, init }; - for (const middleware of this.middleware) { - if (middleware.pre) { - fetchParams = await middleware.pre({ - fetch: this.fetchApi, - ...fetchParams, - }) || fetchParams; - } - } - let response: Response | undefined = undefined; - try { - response = await (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init); - } catch (e) { - for (const middleware of this.middleware) { - if (middleware.onError) { - response = await middleware.onError({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - error: e, - response: response ? response.clone() : undefined, - }) || response; - } - } - if (response === undefined) { - if (e instanceof Error) { - throw new FetchError(e, 'The request failed and the interceptors did not return an alternative response'); - } else { - throw e; - } - } - } - for (const middleware of this.middleware) { - if (middleware.post) { - response = await middleware.post({ - fetch: this.fetchApi, - url: fetchParams.url, - init: fetchParams.init, - response: response.clone(), - }) || response; - } - } - return response; - } - - /** - * Create a shallow clone of `this` by constructing a new instance - * and then shallow cloning data members. - */ - private clone(this: T): T { - const constructor = this.constructor as any; - const next = new constructor(this.configuration); - next.middleware = this.middleware.slice(); - return next; - } -}; - -function isBlob(value: any): value is Blob { - return typeof Blob !== 'undefined' && value instanceof Blob; -} - -function isFormData(value: any): value is FormData { - return typeof FormData !== "undefined" && value instanceof FormData; -} - -export class ResponseError extends Error { - override name: "ResponseError" = "ResponseError"; - constructor(public response: Response, msg?: string) { - super(msg); - } -} - -export class FetchError extends Error { - override name: "FetchError" = "FetchError"; - constructor(public cause: Error, msg?: string) { - super(msg); - } -} - -export class RequiredError extends Error { - override name: "RequiredError" = "RequiredError"; - constructor(public field: string, msg?: string) { - super(msg); - } -} - -export const COLLECTION_FORMATS = { - csv: ",", - ssv: " ", - tsv: "\t", - pipes: "|", -}; - -export type FetchAPI = WindowOrWorkerGlobalScope['fetch']; - -export type Json = any; -export type HTTPMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'OPTIONS' | 'HEAD'; -export type HTTPHeaders = { [key: string]: string }; -export type HTTPQuery = { [key: string]: string | number | null | boolean | Array | Set | HTTPQuery }; -export type HTTPBody = Json | FormData | URLSearchParams; -export type HTTPRequestInit = { headers?: HTTPHeaders; method: HTTPMethod; credentials?: RequestCredentials; body?: HTTPBody }; -export type ModelPropertyNaming = 'camelCase' | 'snake_case' | 'PascalCase' | 'original'; - -export type InitOverrideFunction = (requestContext: { init: HTTPRequestInit, context: RequestOpts }) => Promise - -export interface FetchParams { - url: string; - init: RequestInit; -} - -export interface RequestOpts { - path: string; - method: HTTPMethod; - headers: HTTPHeaders; - query?: HTTPQuery; - body?: HTTPBody; -} - -export function 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)) - .filter(part => part.length > 0) - .join('&'); -} - -function querystringSingleKey(key: string, value: string | number | null | undefined | boolean | Array | Set | HTTPQuery, keyPrefix: string = ''): string { - const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key); - if (value instanceof Array) { - const multiValue = value.map(singleValue => encodeURIComponent(String(singleValue))) - .join(`&${encodeURIComponent(fullKey)}=`); - return `${encodeURIComponent(fullKey)}=${multiValue}`; - } - if (value instanceof Set) { - const valueAsArray = Array.from(value); - return querystringSingleKey(key, valueAsArray, keyPrefix); - } - if (value instanceof Date) { - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`; - } - if (value instanceof Object) { - return querystring(value as HTTPQuery, fullKey); - } - return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`; -} - -export function mapValues(data: any, fn: (item: any) => any) { - return Object.keys(data).reduce( - (acc, key) => ({ ...acc, [key]: fn(data[key]) }), - {} - ); -} - -export function canConsumeForm(consumes: Consume[]): boolean { - for (const consume of consumes) { - if ('multipart/form-data' === consume.contentType) { - return true; - } - } - return false; -} - -export interface Consume { - contentType: string; -} - -export interface RequestContext { - fetch: FetchAPI; - url: string; - init: RequestInit; -} - -export interface ResponseContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - response: Response; -} - -export interface ErrorContext { - fetch: FetchAPI; - url: string; - init: RequestInit; - error: unknown; - response?: Response; -} - -export interface Middleware { - pre?(context: RequestContext): Promise; - post?(context: ResponseContext): Promise; - onError?(context: ErrorContext): Promise; -} - -export interface ApiResponse { - raw: Response; - value(): Promise; -} - -export interface ResponseTransformer { - (json: any): T; -} - -export class JSONApiResponse { - constructor(public raw: Response, private transformer: ResponseTransformer = (jsonValue: any) => jsonValue) {} - - async value(): Promise { - return this.transformer(await this.raw.json()); - } -} - -export class VoidApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return undefined; - } -} - -export class BlobApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return await this.raw.blob(); - }; -} - -export class TextApiResponse { - constructor(public raw: Response) {} - - async value(): Promise { - return await this.raw.text(); - }; -} diff --git a/typescript/tsconfig.json b/typescript/tsconfig.json deleted file mode 100644 index 4567ec19..00000000 --- a/typescript/tsconfig.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "compilerOptions": { - "declaration": true, - "target": "es5", - "module": "commonjs", - "moduleResolution": "node", - "outDir": "dist", - "lib": [ - "es6", - "dom" - ], - "typeRoots": [ - "node_modules/@types" - ] - }, - "exclude": [ - "dist", - "node_modules" - ] -}