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

Feature/security or #1158

Merged
merged 8 commits into from
Mar 10, 2022
Merged

Feature/security or #1158

merged 8 commits into from
Mar 10, 2022

Conversation

Lehp
Copy link
Contributor

@Lehp Lehp commented Mar 10, 2022

  • remove unnecessary comment,
  • add or-functionality to parser_test

@Lehp
Copy link
Contributor Author

Lehp commented Mar 10, 2022

@ubogdan I added or to the general check.

How can i use this functionality locally? I tried using the master branch and i saw my code in the vendor-folder, but it didn't work.

@codecov
Copy link

codecov bot commented Mar 10, 2022

Codecov Report

Merging #1158 (626958c) into master (faad956) will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1158      +/-   ##
==========================================
+ Coverage   94.73%   94.76%   +0.02%     
==========================================
  Files          10       10              
  Lines        2433     2443      +10     
==========================================
+ Hits         2305     2315      +10     
  Misses         67       67              
  Partials       61       61              
Impacted Files Coverage Δ
operation.go 95.98% <100.00%> (+0.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update faad956...626958c. Read the comment docs.

Copy link
Contributor

@ubogdan ubogdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ubogdan ubogdan merged commit add313f into swaggo:master Mar 10, 2022
@Lehp
Copy link
Contributor Author

Lehp commented Mar 16, 2022

@ubogdan Hey ubogdan I've been looking atleast 5h for the reason my code doesn't work. Everything executes fine. Every tests is ok. But in the End the file does not contain the object parseSecurityComment returns. Could you give me a hint? I don't know where to search anymore.

The input comment seen in a Test:
image

The result of ParseSecurityComment:
image

Left -> comment in goFile right-> result in swagJson
image

@ubogdan
Copy link
Contributor

ubogdan commented Mar 16, 2022

It's quite late on my end...

Try yo move the declaration var securityMap = make(map[string][]string) inside the for loop.(operations.go from 636 to 639 😄 )

https://github.com/swaggo/swag/compare/3a778dc..32b2467#diff-8b221d1ef8bed3732b54a25e03a71dabd47bc88034b268ad3f92f3c45f4744a3R661-R686

@Lehp
Copy link
Contributor Author

Lehp commented Mar 21, 2022

@ubogdan
Issue resolved itself. I was very confused but the problem wasn't my code but my lack of understanding of swaggo infrastructure. go install github.com/swaggo/swag/cmd/swag@master fixed the issue for me

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

Successfully merging this pull request may close these issues.

3 participants