valid-api-key-security-scheme-name
Overview
This rule belongs to the openapi-v3-codegen-syntax-linting
ruleset and states that:
For successful Code Generation, the name of the ApiKey Security Scheme must only use letters, numbers, underscores and dashes. It must not contain any leading/trailing white-space characters.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Invalid name specified for ApiKey Security Scheme. |
Code | OPENAPI3CODEGENSYNTAX_L740 |
Type | Linting |
Rule System | Syntax |
Broad Category | OpenAPI Security Schemes |
Products Impacted | Code Generation, Developer Experience Portal |
Tags | code generation sdks openapi3 openapi syntax linting apimatic security scheme ApiKey name |
Suggested Fixes
- Make sure the name of the ApiKey Security Scheme does not contain any forbidden characters.
- Use only letters, numbers, underscores and dashes.
- Remove any trailing/leading white-space characters, if present.
For More Information
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#components-object
- 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/