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

Allow plugins to override mediatypes registered by oteapi-core #208

Open
jesper-friis opened this issue Nov 19, 2022 · 5 comments
Open

Allow plugins to override mediatypes registered by oteapi-core #208

jesper-friis opened this issue Nov 19, 2022 · 5 comments
Labels
BLOCKING This issue or PR blocks further development, i.e., it is critical

Comments

@jesper-friis
Copy link
Contributor

Currently there is no semantics in how the strategies in oteapi-core stores information in the session. This is addressed by oteapi-dlite by storing everything in a semantically well-defined collection accessible from the session. But oteapi-dlite is not able to e.g. register a json parser with mediatype application/json since that mediatype is already taken by oteapi-core.

The same is the case for accessService.

Current this issue blocks proper use of oteapi-dlite.

The easiest solution would be to move all current strategies in oteapi-core into a separate plugin.

But it might still be useful for the user to have a way to define the precedence between plugins and strategies in the case when two plugins provides a strategy for the same mediaType/accessService.

@jesper-friis jesper-friis added the BLOCKING This issue or PR blocks further development, i.e., it is critical label Nov 19, 2022
@CasperWA
Copy link
Contributor

Have you tried to do this?
My idea to implement this was that I'd expect two values to appear for a single media type and then have always choose the one that isn't coming from the core, if this happens. But it might be that two values are not returned for the same entry point registration. So have you tried this?

@jesper-friis
Copy link
Contributor Author

Yes, I tried it and oteapi troughs an exception about conflicting mediatypes.

Splitting the dataresource datamodel into download and parse may solve my problem, since the new parseType would determine which parse strategy to use.

What happens if a plugin defines a download strategy with the same schema as oteapi-core?

@jesper-friis
Copy link
Contributor Author

This has been solved - closing it

@CasperWA
Copy link
Contributor

How has this been solved? The last point was that an exception was thrown, has this been resolved by some PR?

@CasperWA
Copy link
Contributor

Wrongly closed.

@CasperWA CasperWA reopened this Mar 27, 2023
@jesper-friis jesper-friis added BLOCKING This issue or PR blocks further development, i.e., it is critical and removed BLOCKING This issue or PR blocks further development, i.e., it is critical labels Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BLOCKING This issue or PR blocks further development, i.e., it is critical
Projects
None yet
Development

No branches or pull requests

2 participants