Skip to main content

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.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageDuplicate security requirement object found within the security list.
CodeOPENAPI3APIMATIC_L931
TypeLinting
Rule SystemSemantic
Broad CategoryOpenAPI Security Requirements
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 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.

For More Information