Skip to main content

valid-schema-component-key

Overview

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

For successful Code Generation, the Schema Component key must only use letters, numbers, underscores and dashes. It must not contain any leading/trailing white-space characters.

PropertyValue
EnabledYes
Maximum SeverityError
MessageSchema Component key is invalid.
CodeOPENAPI3CODEGENSYNTAX_L130
TypeLinting
Rule SystemSyntax
Broad CategoryOpenAPI Components
Products ImpactedCode Generation, Developer Experience Portal
Tagscode generation sdks openapi3 openapi syntax linting apimatic schema name key

Suggested Fixes

  • Make sure the schema component key does not contain any forbidden characters.
  • Use only letters, numbers, underscores and dashes.
  • Remove any trailing/leading white-space characters, if present.
  • If the key of the schema component cannot be changed, remove the schema component definition and its references (if any), to avoid issues.

For More Information