5

I want to write a swagger API doc for some OSRM APIs. There is a coordinates path parameter which is:

String of format {longitude},{latitude};{longitude},{latitude}[;{longitude},{latitude} ...] .

for example: 51.3462,32.5280;51.3452,32.5280;51.3619,32.5236

how can I make this format in OpenAPI 3.0 not to be percent encoded?

to allow the usage of semicolon(;) for Query Parameters we can use allowReserved: true but it's not available in path parameters.

There is another option to use arrays and utilize serialization to use style: matrix but it helps for objects to be e.g. /point;x=20;y=30 not arrays. it makes arrays for example /users/;id=3,4,5 not /users/id=3;4;5.

Is there any solution to serialize arrays by semicolon instead of comma? or let the type be string and contains semicolon?

Community
  • 1
  • 1
  • 1
    I think your use case cannot be described using OpenAPI. I'd suggest opening an issue in the [OpenAPI Specification repository](https://github.com/OAI/OpenAPI-Specification/issues) to discuss your use case with the maintainers of the spec. – Helen Oct 15 '18 at 19:24
  • 2
    Thanks I made an [issue](https://github.com/OAI/OpenAPI-Specification/issues/1710) there. – Amir Masud Zare Bidaki Oct 15 '18 at 20:09

0 Answers0