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

'Missing required param comment parameters' on external library that not I need #1430

Closed
vidorifaldy opened this issue Dec 23, 2022 · 9 comments

Comments

@vidorifaldy
Copy link

I'm trying to create swagger using Swaggo with command

swag init --parseDependency
(I have struct on shared library so I have to use this option)

unfortunately, I got this error
Screenshot_20221222_050546

Is there any option better than I copy the struct to my project?
How to use exclude the library?

thank you

Hope it goes well normally

swag version is v1.8.9
go version is v1.19

@sdghchj
Copy link
Member

sdghchj commented Dec 26, 2022

I'm afraid no better way so far.

@sdghchj
Copy link
Member

sdghchj commented Dec 27, 2022

Here I want to clarify what is dependency.
Usually, we just want to referece models from external packages which are called dependency.
Is there any need to parse API operations in dependency? There is no need, I think.
@ubogdan What's your opinion?

@vidorifaldy
Copy link
Author

yes I need a model from external packages but got an error from another package that I don't need to parse

@ubogdan
Copy link
Contributor

ubogdan commented Dec 27, 2022

Here I want to clarify what is dependency. Usually, we just want to referece models from external packages which are called dependency. Is there any need to parse API operations in dependency? There is no need, I think. @ubogdan What's your opinion?

The only valid reason may be the API handlers are stored in a dependecy package. This will make the development harder and, we should deprecate/remove this in future versions.

@vidorifaldy
Copy link
Author

@sdghchj I got the insight from this

https://github.com/swaggo/swag/issues/1014#issuecomment-1183215509

and then I change the command from this
swag init --parseDependecy
to this
go mod vendor && swag init --parseVendor --exclude ./vendor/github.com && rm -rf vendor

It solved
but, I have a question, is it good or not?

@sdghchj
Copy link
Member

sdghchj commented Dec 30, 2022

@vidorifaldy Could you please try the latest PR 1432?

@vidorifaldy
Copy link
Author

@sdghchj still get the same error

@sdghchj
Copy link
Member

sdghchj commented Jan 4, 2023

@sdghchj still get the same error

It seems impossible.

@vidorifaldy
Copy link
Author

@sdghchj thank you so much, It solved on v1.8.10

note: another issue after Merged PR 1432 Issues 1451

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

3 participants