Skip to main content

valid-schema-type

Overview

This rule belongs to the swagger-v2-standards-validation ruleset and states that:

The property type in a Schema Object can have only of the following values: array, object, boolean, integer, number, string. Type null and other types are not allowed.

PropertyValue
EnabledYes
Maximum SeverityError
MessageSchema type is invalid.
CodeSWAGGER20STANDARDS_V300
TypeValidation
Rule SystemSemantic
Broad CategorySchemas
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsswagger2 swagger standards semantic validation data type type schema primitive complex object array

Suggested Fixes

  • Type names are compared in a case-sensitive manner.
  • Ensure that the schema type is not empty or null.
  • Remove any trailing or leading whitespace or newline characters from the type value.

For More Information