feat: 集成 openapi-ts-request 用于根据 openapi/swagger 生成 ts、uni.request 代码
This commit is contained in:
11
openapi-ts-request.config.ts
Normal file
11
openapi-ts-request.config.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import type { GenerateServiceProps } from 'openapi-ts-request'
|
||||
|
||||
export default [
|
||||
{
|
||||
schemaPath: 'http://petstore.swagger.io/v2/swagger.json',
|
||||
serversPath: './src/service/app',
|
||||
requestLibPath: `import { request } from '@/utils/http';\n import { CustomRequestOptions } from '@/interceptors/request';`,
|
||||
requestOptionsType: 'CustomRequestOptions',
|
||||
isGenJavaScript: false,
|
||||
},
|
||||
] as GenerateServiceProps[]
|
||||
Reference in New Issue
Block a user