stoplightio / http-spec

Utilities to normalize OpenAPI v2 and v3 objects for the Stoplight ecosystem.

Home Page:https://stoplight.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for server variables

lottamus opened this issue · comments

User story.

As an OpenAPI v3 spec, all of my servers and server variables will be included after transforming to an IHttpService.

Is your feature request related to a problem?

This feature allows us to display server variables in Docs and replace server variables with their default values in @stoplight/request-maker.

Describe the solution you'd like

When mapping over the http service's servers, we should also include any server variables as defined by the IServer interface

Additional context

Make sure we're looking for servers at the global level, and at the Path Item level (i.e servers can sit next to get, post, etc.) and operation level (servers can sit inside get, post, etc.)