Skip to main content

unique-properties-in-schema-required-list

Overview

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

A property can only be marked as required once in the list of required properties, specified using property required of the Schema Object i.e. the items in this list must be unique.

PropertyValue
EnabledYes
Maximum SeverityError
MessageProperty is already marked as required.
CodeOPENAPI3STANDARDS_V335
TypeValidation
Rule SystemSemantic
Broad CategorySchemas
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi standards semantic validation required properties property name object json schema validation json schema

Suggested Fixes

  • Remove redundant entry for the property name in the list.
  • Ensure that the items in the list are unique.
  • Items in the list are compared in a case-sensitive manner.

For More Information