question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hypermedia and path variable

See original GitHub issue

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 :

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:open
  • Created 5 years ago
  • Comments:17 (13 by maintainers)

github_iconTop GitHub Comments

4reactions
darrelmillercommented, Apr 23, 2018

@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.

resources:
  '{uriTemplate}':
    get:
      operationId: whatever
      parameters:
        - name: pathUri
          in: path
          required: true
          schema:
            type: string

This would be a big change and I don’t know what the appetite for this kind of change is in the community.

0reactions
handrewscommented, Nov 2, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found