Closed nassir90 closed 1 year ago
That's great looks all good.
I just have a question @nassir90: does the PUT endpoint maintain the ordering of documents inside the DB or create a new model with a different ID?
As far as I know this behaviour was met in the old api/document/
I'm not sure what you mean. The document put endpoint didn't return anything other than 201 before? Could you give an example of the before / after json representation that you're talking about.
There is now a put endpoint that allows the contents of a document to be updated.
The behavior of this endpoint and the data schema it expects is described in
serializers.py
under thePutDocumentSerializer
class.This PR also includes tests to ensure that the update functionality actually works.