required-oauth2-security-scheme-authorization-url
Overview
This rule belongs to the swagger-v2-standards-validation ruleset and states that:
If the flow type is set as implicit or accessCode in the OAuth 2.0 Security Scheme Object, then the OAuth 2.0 Security Scheme Object must specify the authorization URL to be used for this flow, using the authorizationUrl property.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Required authorizationUrl property in OAuth 2.0 Security Scheme Object is missing. |
| Code | SWAGGER20STANDARDS_V378 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Security Schemes |
| Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
| Tags | swagger2 swagger standards semantic validation url authorization oauth2 flow type security scheme security |
Suggested Fixes
- Add missing
authorizationUrlproperty in the OAuth 2.0 Security Scheme Object. - Make sure that the
authorizationUrlproperty is not null or empty. - Choose a different flow type in the OAuth 2.0 Security Scheme Object if the current URL is not applicable for your API authentication.