Skip to main content

maximum-operation-parameter-name-length

Overview

This rule belongs to the openapi-v3-codegen-linting ruleset and states that:

In an OpenAPI specification, operation parameters are used to describe inputs for an API operation. The parameter name is a unique identifier for a parameter and should be descriptive of the parameter's purpose. This rule ensures that the length of operation parameter names does not exceed 50 characters, which is considered a best practice.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageOperation parameter name should not exceed 50 characters.
CodeOPENAPI3CODEGEN_L204
TypeLinting
Rule SystemSemantic
Broad CategoryOpenAPI Operations
Products ImpactedCode Generation, Developer Experience Portal
Tagscode generation sdks openapi3 openapi semantic linting apimatic operation parameter name length 50 characters

Suggested Fixes

  • Review the OpenAPI specification and identify any operation parameter names that exceed 50 characters.
  • Modify the parameter names to shorten them to 50 characters or less.
  • Consider using a descriptive but concise naming convention that conveys the purpose of the parameter while also keeping the length of the name within the recommended limit.

For More Information