You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The rule oas3-operation-security-defined complains that optional/no auth security as defined in the comment below is not part of the security schema: OAI/OpenAPI-Specification#14 (comment)
Strictly speaking that is true, but not very helpful as you can't specify a "no auth" definition in the security schemas.
To Reproduce
Snippet for a security definition in a path:
security:
- {}
- Bearer: []
The second line is the problem, the third line works as expected (as it's defined in the security schema:
m-mohr
changed the title
Optional authentication not supported by oas3-operation-security-defined
oas3-operation-security-defined: Optional authentication not supported
Jan 7, 2020
…-defined (#895)
* Fixes#892: Support optional authentication for rule oas3-operation-security-defined
* Fixes#892: Adding a test
* Fixes#892: Update docs
* Made changes as requested in the PR review
* Apply suggestions from code review
Co-Authored-By: Jakub Rożek <jakub@rozek.tech>
Co-authored-by: Jakub Rożek <jakub@rozek.tech>
Describe the bug
The rule oas3-operation-security-defined complains that optional/no auth security as defined in the comment below is not part of the security schema:
OAI/OpenAPI-Specification#14 (comment)
Strictly speaking that is true, but not very helpful as you can't specify a "no auth" definition in the security schemas.
To Reproduce
Snippet for a security definition in a path:
The second line is the problem, the third line works as expected (as it's defined in the security schema:
Expected behavior
Either have an option for the rule to allow empty no auth security definitions or allow them always.
Environment (remove any that are not applicable):
The text was updated successfully, but these errors were encountered: