Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
e9be5e4
feat(api-management): 添加API定义管理和生命周期管理功能
luoxiner Dec 11, 2025
fec212f
refactor(himarket): 统一包名至himarket并调整相关导入路径
luoxiner Dec 17, 2025
f4000b3
refactor(himarket-api): 优化注释并调整代码结构
luoxiner Dec 18, 2025
d3bbe78
feat: 网关实例类型支持SOFA_HIGRESS
Just-CJ Dec 18, 2025
c24de49
refactor: move sofa higress related sql to V4 migration sql file
Just-CJ Dec 24, 2025
207253b
feat(api-publish-management): implement API publish management interf…
luoxiner Dec 26, 2025
c58e3d0
feat: add Nacos, DNS, and Fixed Address service configuration classes…
luoxiner Dec 26, 2025
1525eb9
feat: Add new GatewayPublisher implementations and enhance API produc…
luoxiner Dec 29, 2025
aeb6aa6
feat(endpoint-editor): add template endpoints for Dify API and enhanc…
luoxiner Dec 29, 2025
5740221
feat: add ObservabilityProperty class and update PropertyType enum; e…
luoxiner Dec 29, 2025
dc5ecb4
feat: Enhance Endpoint Editor with new API templates and model API su…
luoxiner Dec 30, 2025
5e53f08
feat: Add HttpEndpointConfig class for HTTP endpoint configuration wi…
luoxiner Dec 30, 2025
6a62dab
feat: Add AiServiceConfig class for AI service configuration with var…
luoxiner Dec 30, 2025
0aaf857
Merge remote-tracking branch 'higress/main' into support-api-management
luoxiner Dec 30, 2025
5dd6a4b
feat: Add API lifecycle management tables and update related configur…
luoxiner Dec 30, 2025
142fe5d
feat: Refactor ApiProductLinkApi component by removing unused endpoin…
luoxiner Dec 30, 2025
c4fae6e
feat: Introduce DomainConfig and DomainConfigDeserializer classes, up…
luoxiner Dec 30, 2025
0171745
feat: 支持蚂蚁sofa higress网关导入
rz-yang Dec 24, 2025
a7abb5c
feat: 支持下发ApiDefinition到蚂蚁sofa higress网关
rz-yang Dec 24, 2025
26e6749
feat: 发布增加address字段
rz-yang Dec 29, 2025
2b634e8
feat: add sofa_higress_ref_config column to product_ref table
rz-yang Dec 30, 2025
83b8b98
feat: 支持蚂蚁网关下发REST API和MCP Server类型API Definition
rz-yang Dec 30, 2025
80c7893
feat: Implement MCP server creation and enhance API definition forms …
luoxiner Dec 30, 2025
679284c
feat: 支持蚂蚁网关下发MODEL API和类型API Definition
rz-yang Dec 31, 2025
a7f38ea
feat(gateway): add Gateway service support and integration
luoxiner Jan 5, 2026
dc11716
fix: ant sofa-higress request bug fix and set tenantId\workspaceId in…
rz-yang Jan 5, 2026
8f294cf
feat(publish): add concurrency control for API publish/unpublish oper…
luoxiner Jan 6, 2026
83d4f73
fix: fetchMcpToolsForConfig work only when there exists a consumer of…
rz-yang Jan 6, 2026
1d5d6e9
fix: reuse sofaHigressClient rather than new a client using sofaHigre…
rz-yang Jan 6, 2026
429a380
fix: remove useless import and refactor the code
rz-yang Jan 6, 2026
89703ea
fix: print log when call sofa-higress openAPI
rz-yang Jan 6, 2026
fb0d362
Merge remote-tracking branch 'alibaba/support-api-management' into su…
rz-yang Jan 6, 2026
c2630d5
feat: implement fetchGatewayServices in ant sofa-higress
rz-yang Jan 7, 2026
c80ddba
fix: sofa higress gateway product linking existing API only tranfer s…
rz-yang Jan 7, 2026
e0a36a3
fix: fix null pointer bug and enhance some code logic
rz-yang Jan 7, 2026
734f90f
fix: fix revokeConsumerAuthorization logic of sofa higress, the param…
rz-yang Jan 7, 2026
624950c
fix: format code
rz-yang Jan 8, 2026
8df04d7
feat: support MANAGED API subscriptions, and modify so that apiDefini…
rz-yang Jan 8, 2026
3cd55de
fix: "EQUAL", "PRE", "REGULAR" should be "Exact", "Prefix", ""Regex""
rz-yang Jan 8, 2026
6954adb
feat: add api(REST\MCP\AGENT\MODEL) config to productRef after published
rz-yang Jan 8, 2026
242b6c5
fix: remove JsonSubTypes\JsonTypeInfo of GatewayRefConfig.java
rz-yang Jan 8, 2026
bad7394
fix: use resourceName rather than resourceId so that the API of gatew…
rz-yang Jan 8, 2026
64248ce
Merge branch support-api-management_mengjian into support-api-management
rz-yang Jan 13, 2026
5eb6b1f
fix: higress and sofa-higress modelAPIConfig's match type are "EQUAL"…
rz-yang Jan 13, 2026
deb9438
Merge branch support-api-management-test into support-api-management
rz-yang Jan 13, 2026
d4c110a
Merge higress/main into support-api-management
luoxiner Jan 19, 2026
49c473e
fix: resolve compilation errors after merging higress/main
luoxiner Jan 19, 2026
012b2cc
feat: Implement DIRECT MCP server support and refactor Publisher
luoxiner Jan 15, 2026
58b452c
refactor: simplify AI service configuration for model API publishing
luoxiner Jan 16, 2026
5983484
refactor(api): reorganize package structure and enhance API property …
luoxiner Jan 19, 2026
1c85d75
fix: add timeUnit parameter to TimeoutProperty for APIG policy creation
luoxiner Jan 19, 2026
dab06c7
fix: update TimeoutProperty to match APIG API requirements
luoxiner Jan 19, 2026
2eb8d63
refactor: replace manual null/empty checks with utility classes
luoxiner Jan 19, 2026
19d485a
refactor: remove redundant enable field from TimeoutProperty
luoxiner Jan 19, 2026
e957d70
feat: add dropdown selection for timeUnit field in timeout configuration
luoxiner Jan 19, 2026
b802a5e
fix: automatically set field type to 'select' when options are provided
luoxiner Jan 19, 2026
07bb206
feat(api-lifecycle): enhance api_publish_record table and restrict AP…
luoxiner Jan 20, 2026
dce6760
Refactor API publish record handling and enhance UI components
luoxiner Jan 27, 2026
9c8f716
Merge remote-tracking branch 'higress/develop' into support-api-manag…
luoxiner Jan 28, 2026
c6998e9
fix format
luoxiner Jan 28, 2026
8d65d31
fix compile error
luoxiner Jan 28, 2026
0262fd3
remove fastjson used in sofa
luoxiner Jan 28, 2026
582ba53
fix db filed name
luoxiner Jan 28, 2026
5e79d35
remove some used info in publish page
luoxiner Jan 28, 2026
c6f93ba
refactor: update base path handling in API definition and related com…
luoxiner Jan 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
212 changes: 212 additions & 0 deletions PR.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
=== PR Body ===
<!--
🎉 Thank you for contributing to HiMarket!

Please follow these guidelines:

1️⃣ PR Title Format
- Format: type: description
- Example: feat: add product feature
- Description must start with lowercase letter or Chinese characters
- Chinese example: feat: 添加产品特性配置

2️⃣ Description (Required)
- Describe your changes in detail
- At least 10 characters

3️⃣ Type of Change (Required)
- Check at least one type

4️⃣ Testing (Recommended)
- Describe how you tested these changes

5️⃣ Related Issues (Recommended)
- Link issues using Fix #123 or Close #456

📚 For Detailed Guidelines:
- English: .github/PR_GUIDE.md
- 中文: .github/PR_GUIDE_zh.md
-->

## 📝 Description

<!--
Required: Describe your changes in detail (at least 10 characters)
Tip: You can use bullet points for clarity
-->

Support HiMarket autonomous API management capabilities:
- Support creating APIs directly from HiMarket
- Support managing APIs within HiMarket

<!--
Examples:
- Refactored user authentication module to improve performance
- Added caching mechanism for frequently accessed data
- Fixed a bug where session timeout was not properly handled
-->



## 🔗 Related Issues

<!--
Optional but recommended:
Link related issues using keywords like "Fix", "Close", or "Resolve"
-->

<!--
Examples:
- Fix #123
- Close #456, Resolve #789
- Related to #100
-->



## ✅ Type of Change

<!--
Required: Check at least one type
-->

- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Code refactoring (no functional changes)
- [ ] Performance improvement
- [x] Build/CI configuration change
- [ ] Other (please describe):



## 🧪 Testing

<!--
Optional but recommended:
Describe how you tested these changes
-->

Verified local build and deployment.

<!--
Examples:
- Ran all unit tests in local environment
- Manually tested various scenarios of the new feature
- Added new integration test cases
-->

- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [x] Manual testing completed
- [x] All tests pass locally



## 📋 Checklist

<!--
Please check the items that apply to your PR
-->

- [ ] Code has been formatted (`mvn spotless:apply` for backend, `npm run lint:fix` for frontend)
- [ ] Code is self-reviewed
- [ ] Comments added for complex code
- [ ] Documentation updated (if applicable)
- [ ] No breaking changes (or migration guide provided)
- [ ] All CI checks pass



## 📊 Test Coverage

<!--
Optional:
If code was modified, does test coverage remain or improve?
-->

<!--
Examples:
- Added 15 new unit tests
- Overall coverage increased from 65% to 68%
- All critical paths are covered
-->



## 📚 Additional Notes

<!--
Optional:
Any additional information reviewers should know
-->

<!--
Examples:
- This change requires database migration
- Performance testing shows 20% improvement
- Breaking change: API endpoint path changed
-->



===============

## 📋 PR Content Check Report

### ❌ Required items need attention

❌ Missing description or description too short (at least 10 characters required)
👉 Please provide a detailed description of your changes in the "Description" section.

❌ No change type selected
👉 Please select at least one change type in the "Type of Change" section (Bug fix, New feature, etc.).

### 💡 Suggestions (Optional)

💡 Consider describing how you tested these changes

### 📊 PR Size Check

⚠️ **Large PR** (18469 lines): Consider splitting into smaller PRs for easier review.

---

### 📝 PR Content Requirements

**Required:**
- **Description**: Clear explanation of your changes (at least 10 characters)
- **Type of Change**: Check at least one change type

**Optional but recommended:**
- **Related Issues**: Link issues using `Fix #123`, `Close #456`, etc.
- **Testing**: Describe how you tested these changes
- **Checklist**: Check other relevant items (code formatting, self-review, tests, etc.)

**Example format:**
```markdown
## 📝 Description

- Refactored client initialization method
- Optimized parameter handling logic

## 🔗 Related Issues

Fix #123

## ✅ Type of Change

- [x] Bug fix (non-breaking change)
- [ ] New feature (non-breaking change)

## 🧪 Testing

- [x] Manual testing completed
- [x] All tests pass locally
```

Error: Missing description or description too short (at least 10 characters required)
Error: No change type selected
Warning: Consider describing how you tested these changes
Error: PR content check failed: 2 required item(s) incomplete
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
@EnableJpaAuditing
public class HiMarketApplication {

public static void main(String[] args) {
public static void main(String[] args) {
SpringApplication.run(HiMarketApplication.class, args);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
-- V6__Add_api_lifecycle_tables.sql
-- Add API lifecycle management tables
-- Description: Support for API Definition, Endpoint, Publish Record and History

START TRANSACTION;

-- ========================================
-- API Definition table
-- ========================================
CREATE TABLE IF NOT EXISTS `api_definition` (
`id` bigint NOT NULL AUTO_INCREMENT,
`api_definition_id` varchar(64) NOT NULL COMMENT 'API Definition unique identifier',
`base_path` varchar(255) COMMENT 'API base path',
`name` varchar(255) NOT NULL COMMENT 'API name',
`description` text COMMENT 'API description',
`type` varchar(32) NOT NULL COMMENT 'API type: MCP_SERVER, REST_API, AGENT_API, MODEL_API',
`status` varchar(32) NOT NULL DEFAULT 'DRAFT' COMMENT 'Status: DRAFT, PUBLISHING, PUBLISHED, DEPRECATED, ARCHIVED',
`version` varchar(32) COMMENT 'API version',
`properties` json COMMENT 'API Properties (formerly extensions from PublishConfig)',
`metadata` json COMMENT 'Metadata (tags, documentation, etc.)',
`created_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
`updated_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),
`deleted_at` datetime(3) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `uk_api_definition_id` (`api_definition_id`),
KEY `idx_type` (`type`),
KEY `idx_status` (`status`),
KEY `idx_deleted_at` (`deleted_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='API Definition table';

-- ========================================
-- API Endpoint table
-- ========================================
CREATE TABLE IF NOT EXISTS `api_endpoint` (
`id` bigint NOT NULL AUTO_INCREMENT,
`endpoint_id` varchar(64) NOT NULL COMMENT 'Endpoint unique identifier',
`api_definition_id` varchar(64) NOT NULL COMMENT 'Associated API Definition ID',
`type` varchar(32) NOT NULL COMMENT 'Endpoint type: MCP_TOOL, REST_ROUTE, AGENT, MODEL',
`name` varchar(255) NOT NULL COMMENT 'Endpoint name',
`description` text COMMENT 'Endpoint description',
`sort_order` int DEFAULT 0 COMMENT 'Display order',
`config` json NOT NULL COMMENT 'Type-specific configuration',
`created_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
`updated_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),
PRIMARY KEY (`id`),
UNIQUE KEY `uk_endpoint_id` (`endpoint_id`),
KEY `idx_api_definition_id` (`api_definition_id`),
KEY `idx_type` (`type`),
CONSTRAINT `fk_endpoint_api_definition` FOREIGN KEY (`api_definition_id`) REFERENCES `api_definition` (`api_definition_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='API Endpoint table';

-- ========================================
-- API Publish Record table
-- ========================================
CREATE TABLE IF NOT EXISTS `api_publish_record` (
`id` bigint NOT NULL AUTO_INCREMENT,
`record_id` varchar(64) NOT NULL COMMENT 'Record unique identifier',
`api_definition_id` varchar(64) NOT NULL COMMENT 'Associated API Definition ID',
`gateway_id` varchar(64) NOT NULL COMMENT 'Gateway ID',
`gateway_name` varchar(255) COMMENT 'Gateway name',
`gateway_type` varchar(32) NOT NULL COMMENT 'Gateway type',
`version` varchar(32) COMMENT 'Published API version',
`status` varchar(32) NOT NULL COMMENT 'Status: ACTIVE, INACTIVE, PUBLISHING, UNPUBLISHING, FAILED. Application enforces uniqueness for PUBLISHING/UNPUBLISHING per API+Gateway',
`action` varchar(32) COMMENT 'Action: PUBLISH, UNPUBLISH, UPDATE',
`publish_config` json COMMENT 'Publish configuration including serviceConfig, extensions, etc.',
`gateway_resource_config` varchar(255) COMMENT 'Gateway resource config',
`access_endpoint` varchar(512) COMMENT 'Access endpoint URL',
`error_message` text COMMENT 'Error message if failed',
`publish_note` text COMMENT 'Publish note',
`operator` varchar(64) COMMENT 'Operator user ID',
`snapshot` json COMMENT 'API Definition snapshot',
`published_at` datetime(3) COMMENT 'Published timestamp',
`last_sync_at` datetime(3) COMMENT 'Last synchronization timestamp',
`created_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
`updated_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3),
PRIMARY KEY (`id`),
UNIQUE KEY `uk_record_id` (`record_id`),
KEY `idx_api_definition_id` (`api_definition_id`),
KEY `idx_gateway_id` (`gateway_id`),
KEY `idx_api_gateway_status` (`api_definition_id`, `gateway_id`, `status`),
CONSTRAINT `fk_publish_record_api_definition` FOREIGN KEY (`api_definition_id`) REFERENCES `api_definition` (`api_definition_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='API Publish Record table';



-- ========================================
-- Add api_definition_ids column to product_ref table
-- ========================================
SET @dbname = DATABASE();
SET @tablename = 'product_ref';
SET @columnname = 'api_definition_id';
SET @preparedStatement = (SELECT IF(
(
SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS
WHERE
(TABLE_SCHEMA = @dbname)
AND (TABLE_NAME = @tablename)
AND (COLUMN_NAME = @columnname)
) > 0,
'SELECT 1',
'ALTER TABLE `product_ref` ADD COLUMN `api_definition_id` varchar(64) COMMENT ''Associated API Definition ID (for MANAGED API)'''
));
PREPARE alterIfNotExists FROM @preparedStatement;
EXECUTE alterIfNotExists;
DEALLOCATE PREPARE alterIfNotExists;

-- ========================================
-- Add sofa_higress_config column to gateway table
-- ========================================
SET @dbname = DATABASE();
SET @tablename = 'gateway';
SET @columnname = 'sofa_higress_config';
SET @preparedStatement = (SELECT IF(
(
SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS
WHERE
(TABLE_SCHEMA = @dbname)
AND (TABLE_NAME = @tablename)
AND (COLUMN_NAME = @columnname)
) > 0,
'SELECT 1',
'ALTER TABLE `gateway` ADD COLUMN `sofa_higress_config` json DEFAULT NULL'
));
PREPARE alterIfNotExists FROM @preparedStatement;
EXECUTE alterIfNotExists;
DEALLOCATE PREPARE alterIfNotExists;

-- ========================================
-- Add sofa_higress_ref_config column to product_ref table
-- ========================================
SET @dbname = DATABASE();
SET @tablename = 'product_ref';
SET @columnname = 'sofa_higress_ref_config';
SET @preparedStatement = (SELECT IF(
(
SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS
WHERE
(TABLE_SCHEMA = @dbname)
AND (TABLE_NAME = @tablename)
AND (COLUMN_NAME = @columnname)
) > 0,
'SELECT 1',
'ALTER TABLE `product_ref` ADD COLUMN `sofa_higress_ref_config` json DEFAULT NULL'
));
PREPARE alterIfNotExists FROM @preparedStatement;
EXECUTE alterIfNotExists;
DEALLOCATE PREPARE alterIfNotExists;

COMMIT;
Loading
Loading