JSONAPI-Resources / JSONAPI-Resources/jsonapi-resources
self links for jsonapi_resource routes
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 2.3k
- Forks
- 546
- PR merge metrics
- No merged PRs in 30d
Description
It appears that the link generation for resources that are singleton resources (jsonapi_resource) are not generating correctly and instead it produces a link using jsonapi_resource rules. For example I would expect a self link in the singlton case to be:
http://example.com/api/myobject
but I am instead getting
http://example.com/api/myobjects/123
Looking through the source it appears this is not handled, am just missing it? Thanks!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the self-link generation entry point for singleton jsonapi_resource routes and compare it with the plural resource route behavior described in the issue. Reproduce the example and verify that the singleton route produces /api/myobject rather than /api/myobjects/123.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100