tanz
10 months agoNew Contributor
Server Variables - can it be refrenced?
i am using openapi:3.0.0
i have five servers define in swagger
inside it i am using variables specific to servers.
something like this
servers:
- url: https://server1/api/{version}
description: server
variables:
version:
description: versioning of api
enum:
- v1
default: v1
- url: https://server2/api/{version}
description: server
variables:
version:
description: versioning of api
enum:
- v1
default: v1
Can we declare variables once and can we reference in multiple servers?
here i am breaking "DRY" by declaring same variables again and again.