openapi-core icon indicating copy to clipboard operation
openapi-core copied to clipboard

Server urls with variables aren't supported

Open domenkozar opened this issue 6 years ago • 1 comments

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.

domenkozar avatar Jul 20 '18 12:07 domenkozar

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.

mnboos avatar Mar 05 '19 12:03 mnboos