-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use semicolon(;) in Path Parameters #1710
Comments
Any update guys? |
Related: #1840 |
@amirmasud I saw below description at the bottom of https://swagger.io/docs/specification/serialization/. Did you try it? Does it work? |
There was an answer suggested a few years ago and no further questions, so I'm assuming it was sufficient and closing. |
@amirmasud I just ran across this again while researching another issue, and after consulting the ABNF in RFC 3986, I don't know why you'd need to do anything here anyway - segment = *pchar
query = *( pchar / "/" / "?" )
fragment = *( pchar / "/" / "?" )
pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
pct-encoded = "%" HEXDIG HEXDIG
unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
/ "*" / "+" / "," / ";" / "=" If your tooling is percent-encoding when RFC 3986 says it doesn't need to, that's a tooling bug. |
Ugh... actually |
@amirmasud OK, my apologies, this is actually a spec problem, although it took me quite some time to figure it out because the relationship between We should fix this in 3.2. |
Digging more deeply into this, I am wondering if you can use the But you pretty much have to just document the string format on your own anyway, since (as you noted) |
The tricky thing here is that
|
I want to write an OpenAPI 3.0 swagger API doc for some OSRM APIs. There is a
coordinates
path parameter which is: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 useallowReserved: 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
The text was updated successfully, but these errors were encountered: