All *NotifyServiceInboundPatternsRemoveIT* classes has the supports() method: returning true, the class is used to manage the incoming patch request. This boolean is calculated by matching the path sting to the string /notifyServiceInboundPatterns . This path is used as the initial part of many NotifyServiceInboundPatternOperation classes.
org.dspace.app.rest.repository.patch.operation.ldn.NotifyServiceInboundPatternsRemoveOperation
is the backend service to delete all the inboundPatterns of a given notifyServiceEntity. It's supports() method is evaluated as true even if the http patch call had the path /notifyServiceInboundPatterns[1]/constraint - and it is wrong because the correct backend to be triggered should be org.dspace.app.rest.repository.patch.operation.ldn.NotifyServiceInboundPatternConstraintRemoveOperation
That said - the solution is to add the condition
&& path.endsWith(OPERATION_PATH)
to the supports() method return condition on NotifyServiceInboundPatternsRemoveOperation class.
Bug issue at DSpace github
All *NotifyServiceInboundPatternsRemoveIT* classes has the supports() method: returning true, the class is used to manage the incoming patch request. This boolean is calculated by matching the path sting to the string /notifyServiceInboundPatterns . This path is used as the initial part of many NotifyServiceInboundPatternOperation classes.
org.dspace.app.rest.repository.patch.operation.ldn.NotifyServiceInboundPatternsRemoveOperation is the backend service to delete all the inboundPatterns of a given notifyServiceEntity. It's supports() method is evaluated as true even if the http patch call had the path /notifyServiceInboundPatterns[1]/constraint - and it is wrong because the correct backend to be triggered should be org.dspace.app.rest.repository.patch.operation.ldn.NotifyServiceInboundPatternConstraintRemoveOperation
That said - the solution is to add the condition
&& path.endsWith(OPERATION_PATH)
to the supports() method return condition on NotifyServiceInboundPatternsRemoveOperation class.