assemblee-virtuelle / assemblee-virtuelle/semapps
Data provider: allow to pass only slug, not full URI, as id
- Dominant language
- TypeScript
- Stars
- 103
- Forks
- 14
- Avg merge
- 1m
- Merged PRs (30d)
- 2
Description
We could allow to pass only the resource slug (or UUID) as the `id`.
In that case, the URL would automatically be guessed based on the container of the default server.
It would throw an error if the default server doesn't have a container with this resource type, or if there are more than one container.
We would need to indicate if the `resourcesWithContainerPath` option of the LdpService is set to false, in which case the container path will always be the root path.
Note that we can also do without this option (see https://github.com/assemblee-virtuelle/semapps/issues/636), it is only to make life easier for developers.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the LdpService data-provider handling and review the resourcesWithContainerPath option, then check the related discussion in issue #636. Trace how the default server finds containers for a resource type and define behavior for slug or UUID ids, missing or multiple containers, and root paths when the option is false; done when these cases are covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100