Skip to main content

no-trailing-leading-spaces-in-parameter-name

Overview

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

The name of a parameter should not contain any leading or trailing white-space characters.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageLeading or trailing white-space character found in parameter name.
CodeOPENAPI3APIMATICSYNTAX_L330
TypeLinting
Rule SystemSyntax
Broad CategoryOpenAPI Parameters
Products ImpactedDeveloper Experience Portal
Tagsopenapi3 openapi syntax linting apimatic parameter name RFC6570 leading trailing whitespace character

Suggested Fixes

  • Ensure that parameter name follows the regex pattern ^[A-Za-z0-9?_()]+$.
  • Remove all leading or trailing white-space characters such as spaces, tabs, or line breaks from parameter name.

For More Information