Merge pull request #2345 from hapifhir/mimetype-to-mediatype

Change name of mimetype to mediatype
This commit is contained in:
Tadgh 2021-02-02 13:01:23 -05:00 committed by GitHub
commit 589d323175
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 8 deletions

View File

@ -24,7 +24,6 @@ package ca.uhn.fhir.rest.server.messaging;
import ca.uhn.fhir.model.api.IModelJson;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.common.net.MediaType;
import org.apache.commons.lang3.Validate;
import javax.annotation.Nullable;
@ -44,8 +43,8 @@ public abstract class BaseResourceMessage implements IResourceMessage, IModelJso
@JsonProperty("transactionId")
private String myTransactionId;
@JsonProperty("mimeType")
private String myMimeType;
@JsonProperty("mediaType")
private String myMediaType;
/**
* Returns an attribute stored in this message.
@ -149,12 +148,12 @@ public abstract class BaseResourceMessage implements IResourceMessage, IModelJso
myTransactionId = theTransactionId;
}
public String getMimeType() {
return myMimeType;
public String getMediaType() {
return myMediaType;
}
public void setMimeType(String theMimeType) {
myMimeType = theMimeType;
public void setMediaType(String theMediaType) {
myMediaType = theMediaType;
}
public enum OperationTypeEnum {

View File

@ -19,7 +19,7 @@ class ResourceOperationMessageTest {
public void testSerializationAndDeserializationOfResourceModifiedMessage() throws JsonProcessingException {
ResourceOperationJsonMessage jsonMessage = new ResourceOperationJsonMessage();
ResourceOperationMessage payload = new ResourceOperationMessage();
payload.setMimeType(Constants.CT_FHIR_JSON_NEW);
payload.setMediaType(Constants.CT_FHIR_JSON_NEW);
jsonMessage.setPayload(payload);
ObjectMapper mapper = new ObjectMapper();
String serialized = mapper.writeValueAsString(jsonMessage);