-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[security] feature add or-option #1151
Conversation
Please fix the unit tests to go forward with a code review. |
Hey ubogdan thx for your res. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments.
operation.go
Outdated
return nil | ||
} | ||
|
||
func (operation *Operation) ProcessSecurityOption(securityOption string, securityMap SecurityMap) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need additional export. Even make this a private function even move the code inside the for loop.
operation.go
Outdated
@@ -629,30 +629,38 @@ func (operation *Operation) ParseRouterComment(commentLine string) error { | |||
return nil | |||
} | |||
|
|||
type SecurityMap map[string][]string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Useless definition. Please remove.
unit tests are failing... |
I'm having file-permission errors running tests locally. Is it a git convention that tests on the repo only run when someone approves the workflow? |
@Lehp Workflow approval is required because you are first time contributor on this repo. |
Codecov Report
@@ Coverage Diff @@
## master #1151 +/- ##
==========================================
+ Coverage 94.73% 94.76% +0.02%
==========================================
Files 10 10
Lines 2433 2443 +10
==========================================
+ Hits 2305 2315 +10
Misses 67 67
Partials 61 61
Continue to review full report at Codecov.
|
@ubogdan do you know why this tests fails locally for me? |
See notes : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I just realized the README.nd wasn't updated so that the users can benefit from this feature. Would you mind creating another PR with the documentation update ?. |
Describe the PR
Feature to generate OR-security option for swagger files.
Relation issue
e.g. https://github.com/swaggo/swag/pull/118/files
Additional context
Sorry for not waiting for any approval Was watching at the source code and almost accidentally coded this.
I desperately need this function to make this repo useful for my company.