Make the field "pickupServicePointId" optional in edge-patron when creating requests from secure patrons
Description
Context:
The current vision of the workflow for LOC Request placing for Instances and Holdings with no Items assumes the possibility of creating a mediated (secure) request without specifying the pickupServicePointId (the specific pickupServicePointId is expected to be determined later).
This behavior should be supported both when working in the FOLIO UI and for requests made via Locate. However, in the current API specification of edge-patronand mod-patron, the field pickupServicePointId is marked as required.
Therefore, in the validation schemas for secure patron requests, the pickupServicePointId field needs to be made optional, ensuring the successful creation of mediated requests. At the same time, the behavior for regular (non-secure) requests should remain unchanged.
Update the validation schema for requests to make the pickupServicePointId field optional for mediated (secure) requests.
Ensure that mediated (secure) requests can be successfully created without specifying the pickupServicePointId.
Maintain the current validation for regular (non-secure) requests where pickupServicePointId remains required (endpoint: POST /patron/account/{id}/instance/{instanceId}/hold).
Adjust the API to support the ability to handle mediated (secure) requests without requiring pickupServicePointId.
Ensure successful processing and creation of mediated requests, with the expectation that pickupServicePointId can be provided later.
Keep existing behavior unchanged for non-secure requests, ensuring pickupServicePointId remains mandatory for them.
Please note: These changes apply only to instance-level hold requests and do not affect item-level hold requests, which remain outside the scope of this update.
Context:
The current vision of the workflow for LOC Request placing for Instances and Holdings with no Items assumes the possibility of creating a mediated (secure) request without specifying the
pickupServicePointId
(the specific pickupServicePointId is expected to be determined later).This behavior should be supported both when working in the FOLIO UI and for requests made via Locate. However, in the current API specification of
edge-patron
andmod-patron
, the fieldpickupServicePointId
is marked as required.Therefore, in the validation schemas for secure patron requests, the
pickupServicePointId
field needs to be made optional, ensuring the successful creation of mediated requests. At the same time, the behavior for regular (non-secure) requests should remain unchanged.Required changes:
Module
edge-patron
- endpoint: POST /patron/account/instance/{instanceId}/hold - https://folio-org.atlassian.net/browse/EDGPATRON-183Update the validation schema for requests to make the
pickupServicePointId
field optional for mediated (secure) requests.Ensure that mediated (secure) requests can be successfully created without specifying the
pickupServicePointId
.Maintain the current validation for regular (non-secure) requests where
pickupServicePointId
remains required (endpoint: POST /patron/account/{id}/instance/{instanceId}/hold).Module
mod-patron
- endpoint: POST /patron/account/{id}/instance/{instanceId}/hold - https://folio-org.atlassian.net/browse/MODPATRON-228Adjust the API to support the ability to handle mediated (secure) requests without requiring
pickupServicePointId
.Ensure successful processing and creation of mediated requests, with the expectation that
pickupServicePointId
can be provided later.Keep existing behavior unchanged for non-secure requests, ensuring
pickupServicePointId
remains mandatory for them.Please note: These changes apply only to instance-level hold requests and do not affect item-level hold requests, which remain outside the scope of this update.