mirror of
https://github.com/hapifhir/hapi-fhir.git
synced 2025-02-17 02:15:22 +00:00
added patch for operation outcome
This commit is contained in:
parent
e992043a22
commit
de701a6b7f
@ -48,7 +48,7 @@ import java.util.Set;
|
||||
abstract class BaseOutcomeReturningMethodBinding extends BaseMethodBinding<MethodOutcome> {
|
||||
static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(BaseOutcomeReturningMethodBinding.class);
|
||||
|
||||
private static EnumSet<RestOperationTypeEnum> ourOperationsWhichAllowPreferHeader = EnumSet.of(RestOperationTypeEnum.CREATE, RestOperationTypeEnum.UPDATE);
|
||||
private static EnumSet<RestOperationTypeEnum> ourOperationsWhichAllowPreferHeader = EnumSet.of(RestOperationTypeEnum.CREATE, RestOperationTypeEnum.UPDATE, RestOperationTypeEnum.PATCH);
|
||||
|
||||
private boolean myReturnVoid;
|
||||
|
||||
@ -91,11 +91,11 @@ abstract class BaseOutcomeReturningMethodBinding extends BaseMethodBinding<Metho
|
||||
return Constants.STATUS_HTTP_200_OK;
|
||||
|
||||
case UPDATE:
|
||||
case PATCH:
|
||||
if (response == null || response.getCreated() == null || Boolean.FALSE.equals(response.getCreated())) {
|
||||
return Constants.STATUS_HTTP_200_OK;
|
||||
}
|
||||
return Constants.STATUS_HTTP_201_CREATED;
|
||||
|
||||
case VALIDATE:
|
||||
case DELETE:
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user