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.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | The default value for server variable object is null or empty. |
Code | OPENAPI3APIMATIC_L124 |
Type | Linting |
Rule System | Semantic |
Broad Category | OpenAPI Servers |
Products Impacted | API Transformer, Code Generation |
Tags | openapi3 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.