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

what does the flag parseDependency exist for? #515

Open
importcjj opened this issue Sep 11, 2019 · 3 comments
Open

what does the flag parseDependency exist for? #515

importcjj opened this issue Sep 11, 2019 · 3 comments

Comments

@importcjj
Copy link
Contributor

importcjj commented Sep 11, 2019

what does the flag parseDependency exist for?

@ubogdan
Copy link
Contributor

ubogdan commented Sep 11, 2019

I believe this is mostly related to go modules where some packages like "github/user/package" does not exists in your project tree. In order to get the definition for a package like google.golang.org/api/calendar/v3 in your swagger doc , you need this package to pe donwloaded and parsed.

@importcjj
Copy link
Contributor Author

I found the parser takes more than one minute to finish generating! And I think it's just because the parser reads all the comments and parses them. Maybe we should filter those comments which are not related.

@importcjj importcjj changed the title what the flag parseDependency exists for? what does the flag parseDependency exist for? Sep 12, 2019
@importcjj
Copy link
Contributor Author

some feature requests:

  1. Parsing the API info should not be so strict, that means we can show the failed message, but not to stop the parsing.

  2. I think the parse all the dependencies should be the default behavior, it even can speed up the parsing.

  3. code about parseDependency, parseVendor those two flags and some code in the function registerSchemaType are confused. The flag parseDependency is defaulted to be false, so swag will not parse the external dependencies, but in the function registerSchemaType, this rule is broken. at https://github.com/swaggo/swag/blob/master/operation.go#L233, isn't it?

  4. Is there any easy way to send requests with a custom access token? My APIs almost need an access token.

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