-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Documentation update & Broken for relationships #777
Comments
Your first example looks to be a simple mistake in the docs, which #782 will fix As for example 2, it seems you encounter an issue when trying to delete a single link in a to-many relationship? https://jsonapi.org/format/1.2/#crud-updating-to-many-relationships
Going by the wording, i would say its reasonable to expect the users of Kitsu to supply the argument for I'm happy to PR the changes to the documentation to make this clearer, or add the logic to the |
You're correct here, which was likely an oversight from me when initialy writing the documentation - the PATCH documentation has its respective equivalents already. The documentation for
If you would like to add a PR that adds the following example, that would be great 👍
I would perhaps put it above the Bulk Extension delete example as that appears to still be an extension-only behaviour in JSON:API 1.1 too. |
Documentation updated in 10.0.3 (2022-10-30) |
Hello,
thank you for this library. One of the most intuitive one for the JSON api. I was wondering if there is any chance to update the documentation? I think the documentation is a little bit out of date. For example:
Example 1:
(doc)
(In here as well: https://github.com/wopian/kitsu/blob/master/packages/kitsu/example/basic.js)
(correct)
Example 2:
(broken for relationships)
api.delete('posts/123/relationships/comments', 321);
(working)
api.delete('posts/123/relationships/comments', [321]);
In this case, could you please clarify if the [1,2] version needs to be used to delete from relationships rather than only using the “bulk extension”?
Additionally, adding a to-many relationship example can be useful:
I hope my examples are explanatory. Thanks again for this library.
The text was updated successfully, but these errors were encountered: