Skip to main content

type-declaration-type-and-schema-are-mutually-exclusive

Overview

This rule belongs to the raml-validation ruleset and states that:

The properties schema and type in a type declaration are mutually exclusive. This means that in a type declaration, only one of these properties must be present at a time but not both. It is recommended to use the type property because a future RAML version might remove the schema alias with that property.

PropertyValue
EnabledYes
Maximum SeverityError
MessageType declaration contains both schema and type properties.
CodeRAML_V203
TypeValidation
Rule SystemSemantic
Broad CategoryTypes
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsraml semantic validation schema type declaration type

Suggested Fixes

  • Remove the schema property from the type declaration.

For More Information