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

error: Cannot read property 'Parameter' of undefined #61

Open
murdercdh opened this issue Nov 11, 2020 · 4 comments
Open

error: Cannot read property 'Parameter' of undefined #61

murdercdh opened this issue Nov 11, 2020 · 4 comments

Comments

@murdercdh
Copy link

murdercdh commented Nov 11, 2020

Now I can use apidoc to generate the html correctly.

But when I try to use command line to gen the swagger-ui json file like following:

apidoc-swagger -i router/ -o swagger_doc/

then I get the error like this :

'error: Cannot read property 'Parameter' of undefined'

It seems I have to debug from the apidoc-swagger source code?

@murdercdh
Copy link
Author

murdercdh commented Nov 11, 2020

image
then I debug a litte bit more from source code.
I find the line 274, if the fields is None, the "Parameter" will case the crash. so I change a litte.
if (verbs.parameter &&(verbs.parameter.fields && verbs.parameter.fields.Parameter)) {
but it seems no one can do the code merge job right now?

@murdercdh
Copy link
Author

murdercdh commented Nov 11, 2020

link to 5fe4dd9

@skywangc
Copy link

skywangc commented Dec 8, 2020

Did you solve the problem by modifying the source code?

@murdercdh
Copy link
Author

Did you solve the problem by modifying the source code?

yes, I think you can merge that pull request in to you main branch.

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