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

JSON:API endpoint paths resolver when "Remove customizations to resource types" is enabled. #9

Open
soft4net opened this issue Sep 27, 2020 · 4 comments

Comments

@soft4net
Copy link

By default in Commerce API and centarro/js-sdk all resources has non standard JSON:API endpoints naming. Maybe it's worth considering adding a path resolver when standard paths are restored. More details can be found here:
https://www.drupal.org/docs/contributed-modules/commerce-api/remove-customizations-to-resource-types

@mglaman
Copy link
Contributor

mglaman commented Oct 14, 2020

That's a good idea. @soft4net, do you think it's suitable as a flag in the HttpClient constructor?

@soft4net
Copy link
Author

soft4net commented Oct 14, 2020

The question is do you still want to support for long term this option in Commerce API - to disable path customizations. For transitioning old projects (like in my case this is saviour feature). But I think over time maintaining it might rise some unnecessary issues. I think being here agnostic is good approach.

Regarding your question, yes i think this will be a good place. In addition should i create new ticket basically addressed for both Commerce API and here for adding language path support or all translations request should be handled within Headers?

@mglaman
Copy link
Contributor

mglaman commented Oct 15, 2020

This SDK is definitely geared towards the Centarro Commerce product. But that is also built on the open source software. It is probably best to handle a generic resource type mapping than a toggle. This way it is more flexible

@soft4net
Copy link
Author

I hope you are not meant by this, that some features from this SDK will not be compatible with Commerce API interface? :)

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

No branches or pull requests

2 participants