Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@umijs/plugin-openapi 插件umi4报错api.addMiddewares is not a function #950

Open
siadou opened this issue Aug 25, 2023 · 0 comments
Open

Comments

@siadou
Copy link

siadou commented Aug 25, 2023

报错:

image

.umirc.ts

  plugins: ['@umijs/plugin-openapi'],
  openAPI: {
    requestLibPath: "import { request } from 'umi'",
    // 或者使用在线的版本
    // schemaPath: "https://gw.alipayobjects.com/os/antfincdn/M%24jrzTTYJN/oneapi.json",
    schemaPath: join(__dirname, 'yapi-swagger.json'),
    mock: false,
  },

类似的问题:

#853

umi4已经没有这个方法了

https://github.com/umijs/umi/blob/master/packages/preset-umi/src/registerMethods.ts

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant