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

apipost转openapi3.0 #166

Open
nigiwen opened this issue Jul 1, 2024 · 1 comment
Open

apipost转openapi3.0 #166

nigiwen opened this issue Jul 1, 2024 · 1 comment

Comments

@nigiwen
Copy link

nigiwen commented Jul 1, 2024

➜ pnpm run openapi

> @ openapi E:\demo-openapi
> esno openapi.config.ts

[GenSDK] gen service param error: TypeError: Cannot read properties of undefined (reading 'schema')
    at ServiceGenerator.getBodyTP (E:\demo-openapi\node_modules\.pnpm\@[email protected][email protected]\node_modules\@umijs\openapi\dist\serviceGenerator.js:468:46)
    at E:\demo-openapi\node_modules\.pnpm\@[email protected][email protected]\node_modules\@umijs\openapi\dist\serviceGenerator.js:345:39
    at Array.map (<anonymous>)
    at E:\demo-openapi\node_modules\.pnpm\@[email protected][email protected]\node_modules\@umijs\openapi\dist\serviceGenerator.js:340:18
    at Array.map (<anonymous>)
    at ServiceGenerator.getServiceTP (E:\demo-openapi\node_modules\.pnpm\@[email protected][email protected]\node_modules\@umijs\openapi\dist\serviceGenerator.js:332:14)
    at ServiceGenerator.genFile (E:\demo-openapi\node_modules\.pnpm\@[email protected][email protected]\node_modules\@umijs\openapi\dist\serviceGenerator.js:298:14)
    at E:\demo-openapi\node_modules\.pnpm\@[email protected][email protected]\node_modules\@umijs\openapi\dist\index.js:76:22
    at Generator.next (<anonymous>)
    at fulfilled (E:\demo-openapi\node_modules\.pnpm\[email protected]\node_modules\tslib\tslib.js:166:62)
E:\demo-openapi\node_modules\.pnpm\@[email protected][email protected]\node_modules\@umijs\openapi\dist\serviceGenerator.js:468
        const schema = reqContent[mediaType].schema || DEFAULT_SCHEMA;
                                             ^

TypeError: Cannot read properties of undefined (reading 'schema')
    at ServiceGenerator.getBodyTP (E:\demo-openapi\node_modules\.pnpm\@[email protected][email protected]\node_modules\@umijs\openapi\dist\serviceGenerator.js:468:46)
    at E:\demo-openapi\node_modules\.pnpm\@[email protected][email protected]\node_modules\@umijs\openapi\dist\serviceGenerator.js:345:39        
    at Array.map (<anonymous>)
    at E:\demo-openapi\node_modules\.pnpm\@[email protected][email protected]\node_modules\@umijs\openapi\dist\serviceGenerator.js:340:18        
    at Array.map (<anonymous>)
    at ServiceGenerator.getServiceTP (E:\demo-openapi\node_modules\.pnpm\@[email protected][email protected]\node_modules\@umijs\openapi\dist\serviceGenerator.js:332:14)
    at ServiceGenerator.genFile (E:\demo-openapi\node_modules\.pnpm\@[email protected][email protected]\node_modules\@umijs\openapi\dist\serviceGenerator.js:298:14)
    at E:\demo-openapi\node_modules\.pnpm\@[email protected][email protected]\node_modules\@umijs\openapi\dist\index.js:76:22
    at Generator.next (<anonymous>)
    at fulfilled (E:\demo-openapi\node_modules\.pnpm\[email protected]\node_modules\tslib\tslib.js:166:62)

Node.js v20.14.0
@rookie-luochao
Copy link
Contributor

你可以看看 openapi-ts-request, 我基于陈帅大佬的库,暴力改造了一下,我会持续维护下去,应该解决了你这个bug

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

2 participants