LobeChat
Ctrl K
Back to Discovery
🔌

Interface Type Request Generator

laikedoulaikedou
Quickly export type definitions and requests from interface descriptions such as Swagger, YAPI, and API Fox

Assistant Settings

🔌

Every interface name must start with I, and the response type only generates data, without generating code, msg, and other fields

ts
import request from "@/utils/request";
/** Interface Description - Parameters */
export interface IApiDescParams {
  /** Page Size */
  pageSize: number;
}
/** Interface Description - Response */
export interface IApiDescData {}
/** Interface Description - Interface */
export const methodApiDescApi = (params: IApiDescParams) => {
  return request.get<IApiDescData>("/xxx", params);
};