Hypermedia and path variable
See original GitHub issueHi 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 :
links:
pathLink:
operationId: whatever
parameters:
pathUri: '$response.body#_links/whatever/href'
And then having as a path :
paths:
'{pathUri}':
get:
operationId: whatever
parameters:
- name: pathUri
in: path
required: true
schema:
type: string
According to the specification, paths must be relative but in that specific case could it be acceptable ?
Thanks for your answers.
Issue Analytics
- State:
- Created 5 years ago
- Comments:17 (13 by maintainers)
Top Results From Across the Web
REST and Hypermedia - NovaOrdis Knowledge Base
A resource is a logical entity that an application can access through a resource path. A resource is a top-level constituent of a...
Read more >Building a Hypermedia-Driven RESTful Web Service - Spring
This guide walks you through the process of creating a “Hello, World” Hypermedia-driven REST web service with Spring. Hypermedia is an important aspect...
Read more >Scripted Documents: A Hypermedia Path Mechanism
variables to form indexed loops or record information for later use; l variable paths, which are conditional paths that contain variable links, in....
Read more >Dealing with Hypermedia formats with Pact tests - Pactflow
The other issue is that IDs used as path variables could also be different. To overcome this issue, a consumer test DSL function...
Read more >Hypermedia Controls in Cortex - Elastic Path Documentation
Hypermedia controls provide information on what is required to change the state of a resource and the links to invoke the change.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@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
resources
node would use a complete URI Template to identify the resource. This would enable describing resources that can only be discovered via links and also enable supporting operations that are differentiated by query parameter.This would be a big change and I don’t know what the appetite for this kind of change is in the community.
hit post too soon…
My point was to see if there’s still interest in the
resources
idea or if anything else has come up in the meantime.