Skip to main content

non-empty-server-variable-default

Overview

This rule belongs to the openapi-v3-apimatic-linting ruleset and states that:

The default value for a server variable object must be specified and should not be null or empty. The default value is used to resolve the server URL. Not defining a default value can result in unexpected behavior when resolving the URL for the API.

PropertyValue
EnabledYes
Maximum SeverityError
MessageThe default value for server variable object is null or empty.
CodeOPENAPI3APIMATIC_L124
TypeLinting
Rule SystemSemantic
Broad CategoryOpenAPI Servers
Products ImpactedAPI Transformer, Code Generation
Tagsopenapi3 openapi apimatic semantic linting server variable default url

Suggested Fixes

  • Make sure that the default value for server variable object is not null or empty.

For More Information