Skip to main content

singular-key-of-non-array-schema-component

Overview

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

Schema key names for non-array schemas should be singular to provide clear and concise naming. Plural schema names can cause confusion, so it's important to use singular nouns to describe the data type accurately. For example, user instead of users.

PropertyValue
EnabledNo
Maximum SeverityWarning
MessageThe schema key for a non-array schema should be singular.
CodeOPENAPI3CODEGEN_L135
TypeLinting
Rule SystemSemantic
Broad CategoryOpenAPI Components
Products ImpactedCode Generation, Developer Experience Portal
Tagscode generation sdks openapi3 openapi semantic linting apimatic components schemas key array singular plural

Suggested Fixes

  • When defining non-array properties make sure to use singular shcema key.

For More Information