openapi-core
openapi-core copied to clipboard
Server urls with variables aren't supported
If one has openapiv3 with server urls:
- url: https://app-pr-{prId}.herokuapp.com/api/v1
description: Staging
variables:
prId:
default: '1'
Then using https://app-pr-56.herokuapp.com/api/v1
will result into
InvalidServer('Invalid request server https://app-pr-56.herokuapp.com/api/v1/user/login',)
.
Workaround for now is just to skip domain with url: /api/v1
.
In my opinion this is a bug, not an enhancement. The specification defines the variables property for the server object (https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md#server-object)
Our validation currently fails due to this and we would really appreciate some help / support.