unique-security-requirement
Overview
This rule belongs to the openapi-v3-apimatic-linting
ruleset and states that:
Each security requirement object represents a unique combination of security schemes that need to be satisfied for an API operation. The security list should not contain duplicate security requirement objects.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Warning |
Message | Duplicate security requirement object found within the security list. |
Code | OPENAPI3APIMATIC_L931 |
Type | Linting |
Rule System | Semantic |
Broad Category | OpenAPI Security Requirements |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi apimatic semantic linting unique duplicate security requirement scheme |
Suggested Fixes
- Ensure that an item in
security
list is not equal to another item in the same list.This requires comparison of security requirement objects within the list. - If
x-security-options-meta
is used, make sure that you assign unique names to all the duplicate security items in security options metadata extension to avoid this issue. - Names are compared in a case-sensitive manner.