unique-security-requirement-scheme-name
Overview
This rule belongs to the openapi-v3-standards-validation
ruleset and states that:
The security requirement keys are patterned fields that must have unique values within the Security Requirement Object. The keys represent the names of the security schemes that need to be applied on an operation.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Duplicate entry found for security scheme name in the Security Requirement Object. |
Code | OPENAPI3STANDARDS_V450 |
Type | Validation |
Rule System | Semantic |
Broad Category | Security Requirements |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi standards semantic validation name security schemes security requirement security |
Suggested Fixes
- Remove duplicate security scheme name entries from the Security Requirement Object.
- Security requirement key value is compared in a case-sensitive manner.
For More Information
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#patterned-fields-3
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#security-requirement-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#security-scheme-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#format
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#patterned-fields-3
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#security-requirement-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#security-scheme-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#format
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#openapi-specification
- https://docs.apimatic.io/rulesets/overview/