Skip to content

Use semicolon(;) in Path Parameters #1710

Open
@amirmasud

Description

@amirmasud

I want to write an OpenAPI 3.0 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?

In location-related APIs, Latitude and Longitude pairs are used often separated by comma (lng,lat) so to separate locations we need another delimiter which can be the semicolon.

I'd appreciate if you take it into consideration.

Thanks in advance

Metadata

Metadata

Assignees

Labels

param serializationIssues related to parameter and/or header serialization

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions