feat: 集成 openapi-ts-request 用于根据 openapi/swagger 生成 ts、uni.request 代码

This commit is contained in:
luochao
2025-01-09 15:29:27 +08:00
parent 78c5cc7fa9
commit f382a522ce
14 changed files with 1540 additions and 2 deletions

View 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[]