valid-authorization-type
Overview
This rule belongs to the swagger-v1-validation
ruleset and states that:
The type of the authorization scheme specified using property type
of the Authorization Object must have only one of the following values: basicAuth
, apiKey
or oauth2
. Other types are not supported/allowed.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Invalid type of authorization scheme found. |
Code | SWAGGER1_V401 |
Type | Validation |
Rule System | Semantic |
Broad Category | Authorizations |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | swagger1 swagger semantic validation type authorization |
Suggested Fixes
- Value of authorization type is compared in a case-sensitive manner.
- Ensure that the authorization type value matches exactly with the possible list of values and that there are no typos:
basicAuth
,apiKey
oroauth2
. - Ensure that the value for authorization type is not null or empty.