pre-defined-security-requirement-scheme
Overview
This rule belongs to the swagger-v2-standards-validation
ruleset and states that:
The name specified for the security scheme in the Security Requirement Object must correspond with a Security Scheme definition in the Security Definitions Object.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | The security scheme name does not exist in the Security Definitions Object. |
Code | SWAGGER20STANDARDS_V411 |
Type | Validation |
Rule System | Semantic |
Broad Category | Security Requirements |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | swagger2 swagger standards semantic validation name security definitions security definitions object security scheme security |
Suggested Fixes
- Add a definition for the security scheme under the Security Definitions Object security schemes if you haven't added already.
- Make sure that the name assigned to the security scheme in the Security Requirement Object matches exactly with the name of a pre-defined security scheme under the Security Definitions Object security schemes. Names are compared in a case-sensitive manner.
- If added by mistake, remove the undefined security scheme name entry from the Security Scheme Object.