valid-operation-id
Overview
This rule belongs to the openapi-v3-codegen-syntax-linting
ruleset and states that:
The id of an Operation Object specified using the operationId
property is a unique identifier of the operation in the complete API document. This id is used by the code generation engine to generate relevant components tied to an endpoint. Therefore, the id must be short and code-friendly. The id must only use letters, numbers, underscores and dashes. It must not contain any leading/trailing white-space characters. Names are often used for naming the files generated as part of the code generation process, so, any forbidden file name characters are not allowed either.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Operation id is invalid. |
Code | OPENAPI3CODEGENSYNTAX_L190 |
Type | Linting |
Rule System | Syntax |
Broad Category | OpenAPI Operations |
Products Impacted | Code Generation, Developer Experience Portal |
Tags | code generation sdks openapi3 openapi syntax linting apimatic operation id id operation |
Suggested Fixes
- Make sure that the id does not contain any forbidden characters.
- Use only letters, numbers, underscores and dashes.
- Remove any trailing/leading white-space characters, if present.