Some basic validation of an API call is performed so that the result is unambiguous, and can immediately be used by the caller.
Current behaviour
Replace the UUIDs below with those that match an existing pipeline and storage space, and users can create a location in a space that has no defined purpose.
Your environment (version of Archivematica, OS version, etc)
Archivematica 1.10.
Additional context
I haven't tried other combination of API call here, there may be other aspects of validation of this call we will want to correct, e.g. fields, or prevention of creating duplicate locations (identical space, purpose, path). As well as the docs to say that isn't and isn't a required field. The docs might also elaborate on the response, for example, should it be possible to set quota shown above as null?
I believe the response this might warrant from the server is a 400 with some explanation of the error encountered.
For Artefactual use:
Please make sure these steps are taken before moving this issue from Review to Done:
All PRs related to this issue are properly linked 👍
All PRs related to this issue have been merged 👍
Test plan for this issue has been implemented and passed 👍
Documentation regarding this issue has been written and it has been added to the release notes, if needed 👍
NB. It is also possible to inject a completely different value into this field which we might also want to avoid by asking the API to push-back on receiving a non-valid location purpose.
Expected behaviour
Some basic validation of an API call is performed so that the result is unambiguous, and can immediately be used by the caller.
Current behaviour
Replace the UUIDs below with those that match an existing pipeline and storage space, and users can create a location in a space that has no defined purpose.
Purpose is a required field when making the identical change in the UI. Without the purpose field, the new location cannot be used.
The response from the call will look as follows:
Steps to reproduce
As above.
Your environment (version of Archivematica, OS version, etc)
Archivematica 1.10.
Additional context
I haven't tried other combination of API call here, there may be other aspects of validation of this call we will want to correct, e.g. fields, or prevention of creating duplicate locations (identical space, purpose, path). As well as the docs to say that isn't and isn't a required field. The docs might also elaborate on the response, for example, should it be possible to set
quota
shown above asnull
?I believe the response this might warrant from the server is a
400
with some explanation of the error encountered.For Artefactual use: Please make sure these steps are taken before moving this issue from Review to Done: