Skip to main content

required-server-variable-default-value

Overview

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

The Server Variable Object must specify a default value for the variable using the 'default' property that can be substituted in the server URL in case no other value is supplied at the time of making the request.

PropertyValue
EnabledYes
SeverityError
MessageRequired property default in Server Variable Object is missing.
CodeOPENAPI3STANDARDS_V030
TypeValidation
Rule SystemSemantic
Broad CategoryServer Variables
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi standards semantic validation default variable server

Suggested Fixes

  • Add missing default property in the Server Variable Object.
  • Make sure that the default property value is not null or empty.

For More Information