Open
Conversation
此次更新主要增加了API定义相关的管理和生命周期管理功能,包括创建、更新、删除API定义,以及添加、更新、删除端点等功能。同时,还扩展了数据库模型和接口,以支持新的API定义相关的数据存储和检索需求。此外,还新增了一些枚举类用于表示API的不同状态和类型。前端部分则增加了相应的页面和组件来展示和操作这些新功能。 Change-Id: I71b30719c56084c8be77253e5134b001740dd268 Co-developed-by: Aone Copilot <noreply@alibaba-inc.com>
此次提交统一了多个类的包名从 `com.alibaba.apiopenplatform` 至 `com.alibaba.himarket`,并对相关的导入路径进行了相应的调整。同时将一些DTO类从 `portal-server` 移动到了 `himarket-server` 目录下。这些改动有助于提高项目的结构一致性和可维护性。 Change-Id: Ibc21cc3ad5974131b46ea0a85e6ae22428718e5c Co-developed-by: Aone Copilot <noreply@alibaba-inc.com>
此次提交主要涉及多个Java文件中的注释优化及代码结构调整,具体包括: 1. 移除冗余的包声明和导入语句。 2. 合并重复的字段注释。 3. 调整类和方法的注释格式,使其更加简洁一致。 这些改动有助于提高代码可读性和维护性。 Change-Id: I0b7a91c29c1f02073bbc14c8c494a084320cf311 Co-developed-by: Aone Copilot <noreply@alibaba-inc.com>
…ace with data fetching and modal handling Change-Id: I80a1a1c155e5aa040a1450f3a3aaf70eaba4b93a
… and update API publish management to support new service types Change-Id: I639ff642a4328facb36935cee685b3e69182a4d0
…t linking - Implemented ApigApiGatewayPublisher, ApsaraGatewayPublisher, HigressGatewayPublisher, and SofaHigressGatewayPublisher for different gateway types. - Enhanced ApiProductLinkApi component to convert endpoints to OpenAPI specification and display protocol support. - Updated EndpointConfigForm to improve parameter handling and added support for query parameters, headers, and path parameters. - Modified EndpointEditor to support importing from Nacos and MCP Server, including new UI elements for selecting Nacos instances and MCP services. - Added API calls for fetching gateway domains and service types in ApiPublishManagement. - Introduced DIFY_ENDPOINTS as default templates for API definitions. - Improved form handling in ApiDefinitionForm to auto-fill based on selected protocol. Change-Id: I07418010a6e7b62c54fe0a2c6e0b7249c212db50
…e creation method options Change-Id: Id2e0f18ca253ec8ae90116d50a86545692ccbbc2
…nhance API definition schema handling Change-Id: If83e32705d97842ed66859992c30bd5b22d2c7ec
…pport - Added OpenAI, Anthropic, and Doubao templates for model APIs in EndpointEditor. - Updated API type handling to include MODEL_API with appropriate configurations. - Improved modal handling to set API name and protocol dynamically. - Refactored template selection logic based on API type and protocol. - Enhanced form handling for manual endpoint creation with new validation rules. - Updated API definition form to include scenario and protocol selection for model APIs. - Removed unused getPublishHistory API call in ApiPublishManagement. - Improved publish management UI to display service configuration and API properties. Change-Id: Ia0e73908084fffd21b1538b55d1bdecb3f809288
…th routing and matching capabilities Change-Id: I8fd76fb5cab431269c17f49de58d0a6ece04687e
…ious provider and protocol settings Change-Id: If03dc1bb76d5dbb47de52e727dfc7fa89ac47069
Change-Id: I4f1266829b1c1855e331950a64d36b172519e835
…ations Change-Id: Ic8a2cded08e1714ce4b5fddf4363fda0eb3ce305
…t conversion functions and simplifying MCP tool handling Change-Id: Icf7626900d1c36fdac13404f357c66c570495e27
…date gateway domain handling to use DomainResult Change-Id: Ib2be325df338d9bc9bad2604707b60e710b9fd83
…with publish configuration display Change-Id: I73b36b6ad4f1e936c7e77c146902f34bc7d0af6f
- Introduce GatewayServiceConfig extending ServiceConfig with gateway-specific fields - Add Gateway service type to ServiceType enum and ServiceConfig JSON subtype mappings - Implement GatewayServiceResult DTO for Gateway service response representation - Extend GatewayService interface and implementations with fetchGatewayServices method - Implement fetchGatewayServices in APIGOperator to retrieve Gateway services via APIGClient - Provide empty implementations for fetchGatewayServices in other GatewayOperator subclasses - Add new API endpoint in GatewayController to list Gateway services by gatewayId - Update frontend ApiPublishManagement page to support Gateway service type - Add service list fetching logic and service selection UI in publish modal for Gateway type - Extend domain result with meta for domainId access in MCP server publishing - Enhance ApigAiGatewayPublisher to support MCP_SERVER type with domain and meta handling - Update gateway service types API to include GATEWAY in supported types list - Add api method getGatewayServices for fetching Gateway services list from backend - Improve TLS enable checkbox behavior based on Gateway service selection in UI Change-Id: I22418f8a7bb38641a31399831cb3840d81881223 Co-developed-by: Qoder <noreply@qoder.com>
…ations - Add unique index to api_publish_record table for concurrency protection - Define new publish statuses: PUBLISHING and UNPUBLISHING - Implement checks to prevent concurrent publish/unpublish on same API and gateway - Update publish and unpublish methods to set initial status and use async processing - Add API endpoint to query publish record status - Extend repository with method to find records by API, gateway, and status list - Introduce new error code for publish operation in progress conflicts - Enhance SwaggerConverter to support consistent endpoint ordering and base URL construction - Implement MCP server management methods in AIGWOperator service - Refactor APIGOperator to support MCP server and plugin attachment operations with logging and error handling - Add McpServerInfo DTO to represent MCP server details returned from gateway API Change-Id: I61ba31b225e70f420e80d7c0a0e57a318d66736b Co-developed-by: Qoder <noreply@qoder.com>
… same tenantId and workspaceId
…tion and productRef have a one-to-one mapping
…ay can link to the same API Product even when the config changes
Title: 支持sofa-higress接入himarket、支持himarket订阅API Definition类型API Link: https://code.alibaba-inc.com/api-open-platform/himarket/codereview/25349716
…\"PRE"\"REGULAR", while APIG_AI modelAPIConfig's match type are "Exact"\"Prefix"\"Regex"
Title: fix: higress and sofa-higress modelAPIConfig's match type are "EQUAL"\"PRE"\"REGULAR", while APIG_AI modelAPIConfig's match t... 修了个小bug,在productRef表中higress和APIG_AI网关的modelAPIConfig的RouteMatchQuery和RouteMatchHeader的type字段取值存在差异,需要同时支持 Link: https://code.alibaba-inc.com/api-open-platform/himarket/codereview/25405850
Change-Id: I3a4bbf7ed45e38814a33a88ea4109878dde22ff4
- Add missing Page and Pageable imports to GatewayRepository - Update McpClientFactory and McpClientWrapper imports to legacy package in SofaHigressOperator and McpToolServiceImpl - Apply spotless formatting Change-Id: Ia5b41f8e01afea365f3c2aa24d8a4c961ab4a836
- Backend: - Add publishDirectMcpServer to ApigAiGatewayPublisher - Refactor ApigAiGatewayPublisher to extend abstract ApigApiGatewayPublisher - Add meta field to ServiceConfig - Add McpPluginConfigUtil - Format AIGWOperator - Frontend: - Add mcpProtocol and mcpPath to API publishing form - Refine service source selection UI - Update Publish Details button - Fix endpoint editor and status utils Change-Id: I7366a885a9014dc0d94e9512344e8df42d3bf631
- Simplify AiServiceConfig to focus on essential fields
- Keep common fields: provider, protocol, address, apiKey
- Azure: only azureServiceUrl (hide generic address field)
- Bedrock: awsRegion, awsAccessKey, awsSecretKey, bedrockAuthType
- Vertex AI: vertexRegion, vertexProjectId, vertexAuthServiceName, vertexAuthKey
- Remove vertexTokenRefreshAhead field
- Remove all PAI-EAS fields (paiEasEndpoint, paiEasServiceName, paiEasToken)
- Remove 83+ provider-specific fields for other providers
- Update provider list to 18 supported providers
- Remove: Groq, Grok, OpenRouter, Fireworks AI, Baidu, 360, GitHub, Mistral,
Ollama, Cloudflare, DeepL, Cohere, Together-AI, Dify, NVIDIA Triton, Coze, PAI-EAS
- Add default API addresses for 14 providers (auto-fill on selection)
- Refactor ApigApiGatewayPublisher
- Extract ServiceConfig transformation into dedicated methods
- Add buildSdkServiceConfig(), getSourceType() dispatcher methods
- Create specialized builders: buildFixedAddressServiceConfig(),
buildDnsServiceConfig(), buildAiServiceConfig(), buildBedrockServiceConfig()
- Eliminate ~350 lines of duplicate code
- Improve frontend UX
- Move Base Path field after domain, before service configuration
- Auto-fill service address based on provider selection
- Hide duplicate address field for Azure (uses azureServiceUrl)
- Simplify form by removing unused provider options and fields
- Update imports and naming
- Use proper imports instead of fully qualified names where possible
- Handle naming conflicts between local and SDK classes
Change-Id: I6c5a70dac8c2f89d835d2b88a564a242292d8057
Co-developed-by: Qoder <noreply@qoder.com>
…support filtering - Move API endpoint related classes into the api.endpoint package - Move API property classes into the api.property package - Move service configuration classes into the api.service package - Remove deprecated RateLimitProperty and CircuitBreakerProperty classes - Simplify TimeoutProperty to use a single timeout field and add SupportedAPITypes annotation - Add SupportedAPITypes annotation to ObservabilityProperty - Add SupportedAPITypes annotation interface to declare API type support on property classes - Update listSupportedProperties method in APIDefinitionService to support filtering by APIType - Modify APIDefinitionController to accept optional APIType parameter for supported properties listing - Adjust imports and use updated package paths accordingly throughout the codebase - Add gateway policy and policy attachment creation methods to AIGWOperator for better policy management - Update PropertyType enum to retain only essential types: TIMEOUT and OBSERVABILITY - Add supportedApiTypes field to PropertySchemaVO to expose supported API types in API responses Change-Id: Id8752b5c1485d7f406c5ab168b2728752d54a9e6 Co-developed-by: Qoder <noreply@qoder.com>
- Add timeUnit field with default value 'ms' (milliseconds) - Mark as required parameter with APIField annotation - Fixes InvalidParameter.IsEmpty error when creating timeout policies in APIG - Ensures compatibility with Alibaba Cloud API Gateway timeout policy requirements Change-Id: Ib244a31a460a89e07192abc857d030ece7284b3e Co-developed-by: Qoder <noreply@qoder.com>
- Change field name from 'timeout' to 'unitNum' to match APIG API
- Update timeUnit default from 'ms' to 's' (only seconds supported)
- Add 'enable' field for policy activation control
- Update field descriptions to clarify seconds-only support
This matches the exact JSON format required by APIG:
{"unitNum":60,"timeUnit":"s","enable":true}
Change-Id: I5d73a933d74ed018a253bf60d233dd834f7f0dbf
Co-developed-by: Qoder <noreply@qoder.com>
- Replace manual string null/empty checks with StringUtils.isEmpty() and StringUtils.isNotEmpty() - Replace manual collection null/empty checks with CollectionUtils.isEmpty() - Add imports for org.apache.commons.lang3.StringUtils and org.springframework.util.CollectionUtils - Fix potential NPE issues in ApigAiGatewayPublisher when checking collections - Apply consistent null-safe checking patterns across service config classes Change-Id: I0b6b69c6be36855eda2dc78e4e93f0585f084a3e Co-developed-by: Qoder <noreply@qoder.com>
The enable field in TimeoutProperty is redundant as BaseAPIProperty already has an 'enabled' field for controlling whether the property is active. This was causing a duplicate enable toggle in the UI. - Remove 'enable' field from TimeoutProperty class - Users now only see the outer-level enabled toggle in the UI - Backend uses the inherited 'enabled' field from BaseAPIProperty Change-Id: Iac13c36c233d0d5a3410c2a3ba739c2ef8ce852b Co-developed-by: Qoder <noreply@qoder.com>
Change timeUnit field from text input to dropdown selection with 's' (seconds) as the only available option. This ensures users can only select valid time units and prevents input errors. - Add options parameter to @APIField annotation for timeUnit - Set options to {"s"} to restrict selection to seconds only - Frontend will automatically render as dropdown instead of text input - Maintains description noting only 's' is supported Change-Id: I98a8df46fb3a969f45402c5cad8b1a81b43e2cca Co-developed-by: Qoder <noreply@qoder.com>
The backend was not automatically setting the field type to 'select' for String fields with options. This caused the frontend to render a text input instead of a dropdown.
Changes:
- Updated buildFieldVO() in APIDefinitionServiceImpl to check if options are provided for String fields
- If options exist, set type to 'select' automatically
- This ensures the frontend renders a dropdown component instead of text input
Fixes the issue where timeUnit field with options={"s"} was not showing as a dropdown in the UI.
Change-Id: I3ee5a6e9cd37c3d87d6fc934f2364225e3ef04ab
Co-developed-by: Qoder <noreply@qoder.com>
…I creation - Add 'PUBLISHING' and 'UNPUBLISHING' statuses to the status column comment with uniqueness constraint note - Add index idx_api_gateway_status on api_definition_id, gateway_id, and status for faster queries - Restrict "创建 API" button rendering to only 'MODEL_API' product type in ApiProductLinkApi component - Keep "关联已有的 API" button always available for linking existing APIs Change-Id: I4b067f97f1064b6ebab21e4fc8ffcb4e6bde0a68 Co-developed-by: Qoder <noreply@qoder.com>
- Updated `APIPublishRecord` and related entities to use `gateway_resource_config` instead of `gateway_resource_id`. - Modified SQL migration scripts to reflect changes in database schema. - Added a new method to delete HTTP APIs in `AIGWOperator`. - Enhanced `PublishHistoryTab` and `ApiPublishManagement` components to display `gatewayResourceConfig`. - Improved error handling and logging for API deployment status. - Refactored UI components for better readability and maintainability. Change-Id: I555d9594ae9589513bb297efcbc72c215f56c8cc
|
|
…ement Change-Id: I7c3c42125ab620455ac8dfdd4b49b80a39c6c76c
Change-Id: I99867c6a6696a9ad968f87e35d79685a0013c692
Change-Id: I5a9c77708885ac47c2b806f45698b89409a70ad1
Change-Id: I2027f5effc0bd3da816fe43c9332b2c011c163a5
Change-Id: I749c4e4c49ad0bb19950e83c01eedb94f2580336
Change-Id: I3ef51bc7b3b4da3145efe3f8065f084f2553051b
…ponents Change-Id: Iadb6d6592d68acd6c00b98fb440fbe56c0c89b81
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
=== PR Body ===
📝 Description
Support HiMarket autonomous API management capabilities:
🔗 Related Issues
✅ Type of Change
🧪 Testing
Verified local build and deployment.
📋 Checklist
mvn spotless:applyfor backend,npm run lint:fixfor frontend)📊 Test Coverage
📚 Additional Notes