Forum Discussion

Krishnan79's avatar
Krishnan79
New Contributor
7 months ago

Duplicate server variables in OpenAPI

Some one assist on this use case Facing Duplicate server variables in OpenAPI documentation lead to maintenance issues and violate the DRY principle   Example:   servers:   - name: Server 1   ...
  • Humashankar's avatar
    7 months ago

    Hi Krishnan79 

    Try creating a centralized 'variables' section and used the '$ref' keyword to reference variables in each server, eliminating duplication and it improves maintenance as well.