Skip to main content

non-empty-schema-properties-key

Overview

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

In OpenAPI specifications, a schema's property keys should be non-empty strings. Empty property keys can cause issues when working with schemas and can lead to errors when the specification is used to generate code or documentation.

PropertyValue
EnabledYes
Maximum SeverityError
MessageSchema properties keys should not be empty.
CodeOPENAPI3APIMATIC_L685
TypeLinting
Rule SystemSemantic
Broad CategoryOpenAPI Schemas
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi apimatic semantic linting empty property key schema

Suggested Fixes

  • Check the OpenAPI specification to confirm if any property key is empty for the schema.
  • If any property key is empty, remove the empty key from the schema definition.
  • Ensure that all property keys are non-empty strings.

For More Information