open-api
open-api copied to clipboard
error parsing server url with variable in protocol
this is my actual server key in the open api definition:
servers: [
{
url: "{protocol}://{environment}/{version}",
variables: {
protocol: {
default: "https",
enum: [
"http",
"https"
]
},
environment: {
default: "api.myapi.io",
enum: [
"api.myapi.io",
"api-staging.myapi.io",
"localhost:8000"
]
},
version: {
default: "v1",
enum: [
"v1"
]
}
}
}
],
changing protocol variable with an http or an https it works perfectly ( url: "https://{environment}/{version}");
it's very important to have the protocol as variable cause i'm importing this definition into Postman and when I test locally i need to quickly switch from https to http.
feel free to open a pr