Skip to main content

at-least-one-item-in-schema-all-of-list

Overview

This rule belongs to the openapi-v3-standards-validation ruleset and states that:

The allOf property in a Schema Object is a logical operator that helps infer data validity based on results of its subschemas. Therefore, if declared, it must contain at least one subschema in its list i.e. the allOf array must not be empty.

PropertyValue
EnabledYes
Maximum SeverityError
MessageSchema Object allOf list is empty.
CodeOPENAPI3STANDARDS_V343
TypeValidation
Rule SystemSemantic
Broad CategorySchemas
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi standards semantic validation all of json schema schema

Suggested Fixes

  • Ensure that the allOf list contains at least one subschema.
  • If the allOf list in the Schema Object is not expected to contain any subschemas, remove its declaration from the Schema Object.

For More Information