Browse Source
Add customFunctionName hook to capitalize operationId first letter, ensuring generated parameter type names follow PascalCase convention (e.g., GetFakeCaptchaParams, RuleParams) consistent with schema-derived types (e.g., CurrentUser, LoginParams). Update service imports to match regenerated file organization. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>pull/11839/head
11 changed files with 169 additions and 146 deletions
@ -1,21 +1,41 @@ |
|||||
// @ts-ignore
|
// @ts-ignore
|
||||
/* eslint-disable */ |
/* eslint-disable */ |
||||
import { request } from '@umijs/max'; |
import { request } from "@umijs/max"; |
||||
|
|
||||
|
/** 登录接口 POST /api/login/account */ |
||||
|
export async function login( |
||||
|
body: API.LoginParams, |
||||
|
options?: { [key: string]: any } |
||||
|
) { |
||||
|
return request<API.LoginResult>("/api/login/account", { |
||||
|
method: "POST", |
||||
|
headers: { |
||||
|
"Content-Type": "application/json", |
||||
|
}, |
||||
|
data: body, |
||||
|
...(options || {}), |
||||
|
}); |
||||
|
} |
||||
|
|
||||
/** 发送验证码 POST /api/login/captcha */ |
/** 发送验证码 POST /api/login/captcha */ |
||||
export async function getFakeCaptcha( |
export async function getFakeCaptcha( |
||||
params: { |
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
// query
|
params: API.GetFakeCaptchaParams, |
||||
/** 手机号 */ |
options?: { [key: string]: any } |
||||
phone?: string; |
|
||||
}, |
|
||||
options?: { [key: string]: any }, |
|
||||
) { |
) { |
||||
return request<API.FakeCaptcha>('/api/login/captcha', { |
return request<API.FakeCaptcha>("/api/login/captcha", { |
||||
method: 'GET', |
method: "POST", |
||||
params: { |
params: { |
||||
...params, |
...params, |
||||
}, |
}, |
||||
...(options || {}), |
...(options || {}), |
||||
}); |
}); |
||||
} |
} |
||||
|
|
||||
|
/** 登录接口 POST /api/login/outLogin */ |
||||
|
export async function outLogin(options?: { [key: string]: any }) { |
||||
|
return request<Record<string, any>>("/api/login/outLogin", { |
||||
|
method: "POST", |
||||
|
...(options || {}), |
||||
|
}); |
||||
|
} |
||||
|
|||||
@ -0,0 +1,42 @@ |
|||||
|
// @ts-ignore
|
||||
|
/* eslint-disable */ |
||||
|
import { request } from "@umijs/max"; |
||||
|
|
||||
|
/** 获取规则列表 GET /api/rule */ |
||||
|
export async function rule( |
||||
|
// 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
|
||||
|
params: API.RuleParams, |
||||
|
options?: { [key: string]: any } |
||||
|
) { |
||||
|
return request<API.RuleList>("/api/rule", { |
||||
|
method: "GET", |
||||
|
params: { |
||||
|
...params, |
||||
|
}, |
||||
|
...(options || {}), |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** 新建规则 PUT /api/rule */ |
||||
|
export async function updateRule(options?: { [key: string]: any }) { |
||||
|
return request<API.RuleListItem>("/api/rule", { |
||||
|
method: "PUT", |
||||
|
...(options || {}), |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** 新建规则 POST /api/rule */ |
||||
|
export async function addRule(options?: { [key: string]: any }) { |
||||
|
return request<API.RuleListItem>("/api/rule", { |
||||
|
method: "POST", |
||||
|
...(options || {}), |
||||
|
}); |
||||
|
} |
||||
|
|
||||
|
/** 删除规则 DELETE /api/rule */ |
||||
|
export async function removeRule(options?: { [key: string]: any }) { |
||||
|
return request<Record<string, any>>("/api/rule", { |
||||
|
method: "DELETE", |
||||
|
...(options || {}), |
||||
|
}); |
||||
|
} |
||||
Loading…
Reference in new issue