Skip to main content

required-oauth2-security-scheme-scopes

Overview

This rule belongs to the swagger-v2-standards-validation ruleset and states that:

For all flow types, the OAuth 2.0 Security Scheme Object must specify the available scopes for the OAuth2 security scheme token URL, using the scopes property.

PropertyValue
EnabledYes
Maximum SeverityError
MessageRequired scopes property in OAuth 2.0 Security Scheme Object is missing.
CodeSWAGGER20STANDARDS_V380
TypeValidation
Rule SystemSemantic
Broad CategorySecurity Schemes
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsswagger2 swagger standards semantic validation scopes oauth2 flow type security scheme security

Suggested Fixes

  • Add missing scopes property in the OAuth 2.0 Security Scheme Object.
  • Make sure that the scopes property is a valid object not set as null.

For More Information