v2: fix action routes (proper method paths), complete REST Action API
- GET /api/v1/actions (discovery, 47 actions), GET /api/v1/actions/:id (contract) - POST /api/v1/actions/:actionId (unified execute via Action Runtime) - GET /api/v1/v2/resources (resource discovery) - legacy bridge wraps WorkspaceAction.run into execute (fixed registration) - ActionContext.organizationId used by legacy bridge for workspace scoping
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* # Resource Discovery 控制器(docs 03 §90;/api/v1/v2/resources)
|
||||
*/
|
||||
import { Controller, Get } from "@nestjs/common";
|
||||
import { ActionRuntime } from "../runtime/action-runtime";
|
||||
|
||||
@Controller("v2/resources")
|
||||
export class V2ResourcesController {
|
||||
constructor(private readonly runtime: ActionRuntime) {}
|
||||
|
||||
/** # 资源发现 */
|
||||
@Get()
|
||||
list() {
|
||||
return this.runtime.discoverResources();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user