In my swagger.yml, I have the following:
openapi: 3.0.0
servers:
- url: https://dev.myserver.com/v1
description: dev
- url: https://www.myserver.com/v1
description: production
And in one of the examples of my requestBody, I want to refer to the selected server. I tried something like this but it's giving an error that it's not able to reference to the selected server URL:
examples:
TestExample:
value:
server:
$ref: #/server/url # This is giving an error that it's not able to reference the selected URL
In OpenAPI 3.0, how can I refer to the selected server?