desktop icon indicating copy to clipboard operation
desktop copied to clipboard

Server Variable Object are not implemented

Open Herrick19 opened this issue 5 years ago • 0 comments

Hi,

OpenAPI support a feature called "Server Variable Object" that allows to define variable in Servers as you can see here: http://spec.openapis.org/oas/v3.0.3#server-variable-object

Stoplight has not implemented this section and it's causing issues as: 1- No way to configure this using the Forms, you need to go in "Code" to deal with this. 2- In Preview/Try It, nothing works as there is no way to change the variables 3- Generated documentation is not usuable as the variables are not parsed.

Here is an example of the yaml definition: `--- servers:

  • url: https://{sInfrastructureenvironmenttypeDescription}.api.appcluster01.{sInfrastructureregionCode}.ezmax.com/rest description: The server endpoint where to send your API requests. variables: sInfrastructureenvironmenttypeDescription: enum: - prod - stg - qa - dev default: prod description: The environment on on which to call the API. Should always be "prod" unless instructed otherwise by support. sInfrastructureregionCode: enum: - ca-central-1 - local default: ca-central-1 description: The region where your services are hosted. `

It would be useful if the feature could be implemented.

Thanks in advance

Herrick19 avatar Jun 07 '20 05:06 Herrick19