✨ feat(vscode): 同名接口靠同一路由对象上的其他接口定挂载前缀

This commit is contained in:
cruldra committed 2026-10-12 12:38:54 +11:00
1 parent 00737ab1a0
commit e66b19b3b4
6 files changed
+129 -27

No files matched your search

+9 -3
View File
@@ -998,14 +998,20 @@ export interface RuleCard {
endpoint?: HttpEndpoint
}
/** 卡片讲的 HTTP 接口。 */
export interface HttpEndpoint {
/** 一个 HTTP 接口在这份文件里的写法。 */
export interface EndpointRoute {
/** 大写的 HTTP 方法 */
method: string
/** 这份文件里写出来的路径,`{参数}` 照写;挂到应用上时别处再叠的前缀不算,宿主按结尾去对完整网址 */
path: string
/** 契约里结尾对上几条时,operationId 以它开头的那条才是(FastAPI 默认的 operationId 以「函数名_」开头) */
}
/** 卡片讲的 HTTP 接口。 */
export interface HttpEndpoint extends EndpointRoute {
/** 契约里结尾对上几条、挂载前缀也定不下来时,operationId 以它开头的那条才是(FastAPI 默认的 operationId 以「函数名_」开头) */
operationIdPrefix?: string
/** 同一个路由对象上的全部接口(含这一个):它们挂在同一个前缀下,契约里结尾对上几条时宿主拿它们一起定挂载前缀 */
sameRouter?: EndpointRoute[]
}
/**