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

OpenAPIImpl.addSecurityRequirement does not assign created list to this.security #440

Closed
gako opened this issue Aug 21, 2020 · 0 comments · Fixed by #442
Closed

OpenAPIImpl.addSecurityRequirement does not assign created list to this.security #440

gako opened this issue Aug 21, 2020 · 0 comments · Fixed by #442
Milestone

Comments

@gako
Copy link

gako commented Aug 21, 2020

Calling addSecuritryRequirement with a SecurityRequirement has no effect if this.security is null because the newly create list is not assigned to this.security.

Current implementation :
public OpenAPI addSecurityRequirement(SecurityRequirement securityRequirement) { ModelUtil.add(securityRequirement, this.security, ArrayList<SecurityRequirement>::new); return this; }

Correct implementation:

public OpenAPI addSecurityRequirement(SecurityRequirement securityRequirement) { this.security = ModelUtil.add(securityRequirement, this.security, ArrayList<SecurityRequirement>::new); return this; }

phillip-kruger added a commit that referenced this issue Aug 21, 2020
…ed list to this.security

Signed-off-by:Phillip Kruger <phillip.kruger@gmail.com>
@phillip-kruger phillip-kruger added this to the 2.0.7 milestone Aug 21, 2020
phillip-kruger added a commit that referenced this issue Aug 21, 2020
Fix for #440:OpenAPIImpl.addSecurityRequirement does not assign creat…
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 a pull request may close this issue.

2 participants