Skip to main content

operation-servers-redefine-root-and-path-servers

Overview

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

If servers are defined at Operation Object level as well as at either Path Item Object level or root OpenAPI Object level, the Operation Object level servers will override the servers defined elsewhere (Path Item Object or at root level).

PropertyValue
EnabledYes
Maximum SeverityInformation
MessageOperation Object level servers override the Path Item Object level/root OpenAPI Object level servers.
CodeOPENAPI3STANDARDS_L042
TypeLinting
Rule SystemSemantic
Broad CategoryOperations
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi standards semantic linting servers operation global path

Suggested Fixes

  • If you do not intend to override any Path Item Object level or root level servers or the Operation level servers do not add any new information as compared to the servers defined elsewhere, consider removing the Operation Object level server entries.

For More Information