security-options-meta-count-matches-security-items-count
Overview
This rule belongs to the swagger-v2-apimatic-linting ruleset and states that:
You can extend the security information you apply globally or at operation level by using the x-security-options-meta extension. It can help you provide more details for each of the security options available. However, the number of items inside the x-security-options-meta extension must match the number of items inside the security list.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Warning |
| Message | Number of items inside the x-security-options-meta extension do not match the number of items in the security list. |
| Code | SWAGGER20APIMATIC_L001 |
| Type | Linting |
| Rule System | Semantic |
| Broad Category | Security |
| Products Impacted | Code Generation, Developer Experience Portal |
| Tags | swagger2 swagger apimatic semantic linting count metadata security |
Suggested Fixes
- Ensure that a metadata object has been added in the
x-security-options-metaextension corresponding to eachsecurityitem. - Ensure that the count of
x-security-options-metaandsecuritylists match exactly.
For More Information
- https://docs.apimatic.io/specification-extensions/swagger-codegen-extensions/#applied-authentication-options-extension
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#swagger-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#operation-object
- https://www.apimatic.io/
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md
- https://docs.apimatic.io/rulesets/overview/