Ask a Question

OpenAPI : How to add varying variable in Server Object?

CaptainLuffy
Occasional Visitor

OpenAPI : How to add varying variable in Server Object?

Hi,
Apologies if this has been answered before.

 

I have a requirement where server base url and path can have 0 or multiple values present in URI.

for example,

https://localhost/pathVariable
https://localhost/abc/def/pathVariable

I want to use `pathVariable` In path segment. But I’m not sure what type of server base url I should write which will allow any length between server base url and parh. How can I achieve that?

 

Thank you.

1 REPLY 1
KJans
Staff

Hi, this might be of interest (on the OpenAPI spec)

 

https://oai.github.io/Documentation/specification-servers.html

 

You might be better off asking this in the swagger forum (https://community.smartbear.com/t5/Swagger-Open-Source-Tools/bd-p/SwaggerOSTools) rather than the swaggerhub one, since this one is more about swaggerhub's functionality rather than the OpenAPI format.

 

cancel
Showing results for 
Search instead for 
Did you mean: