-
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
Hypermedia and path variable #1553
Comments
@boubasse No it is currently not possible and it is something we would really like to fix. I have debated doing something like you suggest but the problem is that Having said this, if we are able to support multi-segment path parameters #1459 then it would become possible to describe a path as you suggest. |
@darrelmiller It means that currently the power of hypermedias cannot be specified. At least, I think it should be interesting to consider removing the slash from path. Using relative URI in hypermedias would theoritically respect the OAS, wouldn't it ? |
I confess I've always found the choice of path concatenation over RFC 3986 reference resolution confusing. Reference resolution has its own slightly counter-intuitive aspects, but it is how literally every other hypermedia format works that I'm aware of. |
@handrews That leading slash in paths makes me sad every time I see it. @boubasse I don't think removing the slash is feasible in a non-breaking way. So, I think we are stuck with it until at least 4.0 However, there is another more radical thing that might be doable in a point release. We possibly could introduce a new top level concept called 'resources'. The
This would be a big change and I don't know what the appetite for this kind of change is in the community. |
@darrelmiller I think it's a great idea to introduce the "resources" node. |
@darrelmiller By the way, I forgot to say that it will be very useful for the 3GPP to have this kind of object/node. |
If I understand this correctly, the resources node would differ from a path node in two ways:
|
@darrelmiller if you're willing to consider a resources object, it might be worth considering compatibility with JSON Hyper-Schema as it is resource-oriented. Hyper-Schema would not directly solve all of the problems here, but it might be part of a solution, or perhaps parts of the solution could match Hyper-Schema in a way that would make it easier to use them together. Should I go into that more here, file a new issue for it, or leave it alone for now? |
@cmheazel The URI template may resolve to a relative reference, in which case it would still respect the root servers object. I don't know if a resource object would have a servers object. One of the challenges of this conversation will be to decide how closely the child objects mirror those of the path object children. @handrews Just from a naming perspective, I'm not sure if |
@darrelmiller But if the URI template resolves to a relative reference, isn't that a path node? What does the resources node provide us besides relaxed constraints on the URI template? |
@cmheazel The other benefit is being about to use query parameters to differentiate between operations. Currently with Path Item Object we can't do this:
|
@darrelmiller Nice! I'm liking this better and better. |
@darrelmiller OK I'll add some thoughts on Hyper-Schema here. A few preliminary points:
|
Based on today's TSC call, I'm going to write up some best practice ideas for using JSON Hyper-Schema as an "alternate" schema format (#1532), as that seems more promising than a new top-level object of |
@handrews regarding
and the example provided in https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#linkObject
This seems to be a fragment, yes, but it corresponds to a property of the response.body which is a json object. Off Topic: |
@boubasse @darrelmiller I am finally coming back to this, especially now that |
hit post too soon.. My point was to see if there's still interest in the |
Hi everyone,
I'm facing an issue an i don't know if there is a solution yet.
Is it possible to pass an absolute URI from a links object as a variable for a path ?
Example :
And then having as a path :
According to the specification, paths must be relative but in that specific case could it be acceptable ?
Thanks for your answers.
The text was updated successfully, but these errors were encountered: