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.

Affordance for rels other than self are not rendering.

See original GitHub issue
resource.add(
    linkTo(methodOn(UserRestApi.class).getAll(pr.getPage(), pr.getSize())).withSelfRel()
        .andAffordance(afford(methodOn(UserRestApi.class).create(null, null))));

Renders the _templates as expected.

resource.add(
    linkTo(methodOn(UserRestApi.class).create(null, null)).withRel(CREATE)
        .andAffordance(afford(methodOn(UserRestApi.class).create(null, null))));

or

resource.add(Affordances.of(
        linkTo(methodOn(UserRestApi.class).create(null, null)).withRel(CREATE))
        .afford(HttpMethod.POST)
        .withInput(CreateUserCmd.class)
        .withName("create_user")
        .toLink());

Does not render any _templates section.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
ThanksForAllTheFishcommented, Nov 16, 2020

One “use case” to work with other links is practicality @odrotbohm. for instance, we have an API like

GET /events/{id}

{
  _links: {
     ...
     incidents: {
        href: /events/{id}/incident
     }
  }
}

for consumer it is more practical to already know at this point what it is possible on the list of incidents without having to retrieve the list. It just saves a call, so not a big deal imo, but one of those small things that might help adoptions.

I can see how enabling affordances on all links might causes other issues, like the need to come up with a convention to link template to link and having _templates being extremely large, so I am not sure the “use case” actually makes sense

0reactions
odrotbohmcommented, Jun 16, 2021

Lovely. Happy coding!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Subjective authenticity across Instagram Stories and Posts - OSF
With one exception, no research has compared authenticity self-perceptions of masspersonal communication for different SNS features based on their affordances.
Read more >
Subjective Authenticity Across Instagram Stories and Posts
Crucially, this subjective experience that one's self-presentation is authentic—rather than the authenticity of a self-presentation as “observed ...
Read more >
Emotions and Digital Well-Being: on Social Media's Emotional ...
These affordances allow users to (1) express themselves with personal updates, (2) share content when they repost, (3) encourage them to ...
Read more >
Imagined Affordances of the Social Media Ecology
This study supports these findings, as creators often had other social media accounts and though there was some crossover on Instagram reels, as ......
Read more >
Insta-Identity : the Construction of Identity through Instagram ...
In other words, an affordance is determined not only by what the object is but also by the person or thing that is...
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