Skip to main content

server-parameter-cannot-be-constant

Overview

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

A server URL template with a parameter allows the user to substitute a value into the URL at runtime, such as for different environments. Declaring a parameter as a constant would make it impossible to substitute different values into the URL. Hence, server URL parameter cannot be declared as constant.

PropertyValue
EnabledYes
Maximum SeverityError
MessageServer URL parameter declared as constant which is not allowed.
CodeOPENAPI3APIMATIC_L123
TypeLinting
Rule SystemSemantic
Broad CategoryOpenAPI Servers
Products ImpactedAPI Transformer, Code Generation
Tagsopenapi3 openapi apimatic semantic linting server parameter type url

Suggested Fixes

  • Remove any attributes of the server URL parameter that makes it constant.

For More Information