-
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
Colon support in Path Parameters #1681
Comments
My personal reaction is no, this is unlikely to be supported. OAS path parameters are (loosely) modelled on RFC6570 which uses Generally, the OAS defines one and only one way of defining a particular intent and (again, personally) that's the way I'd like it to stay. I note that there are multiple projects related to vert.x and OpenAPI, and these seem to cope with the translation of colon-delimited parameters to RFC6570-style templates without problem. For example https://github.com/outofcoffee/vertx-oas#vertx-oas and https://github.com/ckaratzas/vertx-openapi-spec-generator |
@MikeRalphson Thanks. I had already looked into the two vert.x projects that you linked, and they both produce swagger.json which contains colons in the paths rather than curley braces. Sadly, I have yet to come across an implementation which does the conversion. I do get what you are saying though, but there are scenarios where frameworks adhere to colons, regexpresions or whatever that are pretty fundimental to their framework syntax that it is too hard to replace into curley braces. If it was that easy - then I would have done it in Vert.x. |
I'm afraid I can't see this as anything other than a tooling bug. Whether the tools use |
I agree with @MikeRalphson that this is a tooling bug and that OAS should specify exactly one syntax for a feature. The colon syntax is limited by not allowing for a closing delimiter other than the next / in a path, so supporting it would limit those who use the RFC 6570 syntax to define variables that do not directly correlate to a single path component. |
Hi @webron! Do you know why swagger editor doesn't signal an error when Thx++, R |
Closing due to inactivity - but please feel free to reopen the issue if necessary. |
This is relation to swagger-api/swagger-js#1338 which was rejected as Colon substitution is not part of the OpenAPI Specification.
May I ask for colon in Path parameters to be considered please?
My scenario is using a JAVA framework, Vert.x to generate Swagger JSON.
Unfortunately, it's was too invasive for me to change the routing in that framework to use {} braces in PATH parameter substitution, so I hacked the front end java script to find a colon : and replace based on that.
More info on back story with screenshots available in pull request linked above.
The text was updated successfully, but these errors were encountered: