non-conflicting-api-key-header-and-additional-header
Overview
This rule belongs to the openapi-v3-apimatic-linting
ruleset and states that:
An additional header cannot have the same name as the API key, this leads to unwanted behavior and conflicts.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Conflicting API key and additional header detected. |
Code | OPENAPI3APIMATIC_L873 |
Type | Linting |
Rule System | Semantic |
Broad Category | OpenAPI Security Schemes |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi apimatic semantic linting additional header api key |
Suggested Fixes
- Name of the additional header must not match the name of the API key definition.
- Change the name of either additional header or API key in case of a conflict.
For More Information
- https://docs.apimatic.io/specification-extensions/swagger-codegen-extensions/#additional-headers
- https://docs.apimatic.io/define-apis/additional-headers/
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#security-scheme-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md
- https://docs.apimatic.io/rulesets/overview/