- Notifications
You must be signed in to change notification settings - Fork302
How to implement atomic operations#995
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
The new JSON:API spec has added Atomic Operations:https://jsonapi.org/ext/atomic/ Edit: |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 6 comments 6 replies
-
thats for version 1.1 of the spec which this package do not support yet. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Yes, I am aware. |
BetaWas this translation helpful?Give feedback.
All reactions
-
@SafaAlfulaij Thanks for starting this discussion. As stated those extensions are a draft and to quote from the page "describes features from an upcoming version of the of the JSON:API specification and is subject to change without notice." This needs to be kept in mind when discussing this. My initial thought is that implementation of such a feature might actually be best done or experimented with in an external library. When matured it can still be considered to be added to this library. But even if we consider developing such a feature within DJA itself it is important that it is a separate optional feature (not like the current polymorphic support which can not easily be separated from the main of the code). This will most likely mean to improve the API of the general DJA classes. This will be more work but eventually will be a win for all DJA users as well. |
BetaWas this translation helpful?Give feedback.
All reactions
-
As per the recent comment of the json-api team. the core and specs are alreasy fixed. they are now waiting for reference implementations to tweaks any edge cases. those are very minor issues. so 3rd part proof o concept extensons can be developed and pull requests created for review. since the both spec versions will be backward compatible. having a new implementation would be great before merging intro here. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Fair enough. Some points that I'll put here for future:
|
BetaWas this translation helpful?Give feedback.
All reactions
-
also before implementing an exension, we need to implement the baseline core features of v 1.1 rc3+ :D |
BetaWas this translation helpful?Give feedback.
All reactions
-
Curious where things stand on both v1.1 support (having trouble finding in the docs) and potential for atomic extension support? |
BetaWas this translation helpful?Give feedback.
All reactions
-
JSON:API v1.1 is now final. Our progress in implementing it can be found in thisdiscussion. As atomic operation is an extension to JSON:API spec, I think it makes most sense to implement support for it in a 3rdParty library and in DJA we focus on getting the new v1.1 standard implemented. If anyone wants to pick this up and create a library, that would be great. If a library is well established, it can always be considered again to re-integrate it into DJA. See also myreply. |
BetaWas this translation helpful?Give feedback.
All reactions
-
Since this is not yet available in this library I made my own sketch in Flask before implementing it myself in my Django project. Maybe it helps someone:https://github.com/Nekidev/jsonapi-atomic |
BetaWas this translation helpful?Give feedback.
All reactions
-
Here is a first alpha version for anatomic operations extension. Helpfull if someone could contribute. 🙏 |
BetaWas this translation helpful?Give feedback.
All reactions
❤️ 1
-
Any update on this? Will official support be added to this project? Or should we plan on using jokiefer's extension? |
BetaWas this translation helpful?Give feedback.
All reactions
-
Thanks for following up on this. As stated in my commenthere we highly encourage implementing atomic operations in a 3rd party library as it is also an extension to JSON:API spec as such. Thanks@jokiefer that you started to work on this and@avelosa it would be great if you could join his effort by using and testingdrf-json-api-atomic-operations. Once it is in a usable state feel free to open a PR to add the library to our list of3rd party libraries. I will also update the initial description of this discussion, so it is clear for people what the decision is when they stumble upon it. |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1