Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data provider: allow to pass only slug, not full URI, as id #1222

Open
srosset81 opened this issue Jan 7, 2024 · 3 comments
Open

Data provider: allow to pass only slug, not full URI, as id #1222

srosset81 opened this issue Jan 7, 2024 · 3 comments

Comments

@srosset81
Copy link
Contributor

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 #636), it is only to make life easier for developers.

@simonLouvet
Copy link
Contributor

Why do you want to remove the resource from the url sent to data provider. Isn't removing the root of the url as in #636 enough?

@srosset81
Copy link
Contributor Author

My proposal is the same as #636, except that I want to code it directly in the data provider.

@simonLouvet
Copy link
Contributor

Ok.
I would like this type of behaviour to be managed by middleware/adapter/proxy/plugin/mixin on the dataprovider for modularity/maintenance. I can't find it in the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants