Skip to content
This repository was archived by the owner on Jul 14, 2020. It is now read-only.
This repository was archived by the owner on Jul 14, 2020. It is now read-only.

Server Variable Object are not implemented #394

Description

@Herrick19

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions