mirror of
https://github.com/apache/olingo-odata4.git
synced 2025-03-06 00:29:05 +00:00
[OLINGO-718] ETag removed from json reference payload
This commit is contained in:
parent
b3dcaa25b3
commit
aeb258b5ab
@ -656,7 +656,6 @@ public class ODataJsonSerializer implements ODataSerializer {
|
||||
|
||||
json.writeStartObject();
|
||||
writeContextURL(contextURL, json);
|
||||
writeMetadataETag(metadata, json);
|
||||
json.writeStringField(Constants.JSON_ID, uriHelper.buildCanonicalURL(edmEntitySet, entity));
|
||||
json.writeEndObject();
|
||||
|
||||
@ -681,7 +680,6 @@ public class ODataJsonSerializer implements ODataSerializer {
|
||||
json.writeStartObject();
|
||||
|
||||
writeContextURL(contextURL, json);
|
||||
writeMetadataETag(metadata, json);
|
||||
if (options != null && options.getCount() != null && options.getCount().getValue()) {
|
||||
writeCount(entityCollection, json);
|
||||
}
|
||||
|
@ -793,7 +793,6 @@ public class ODataJsonSerializerTest {
|
||||
final String resultString = IOUtils.toString(serializerResult.getContent());
|
||||
|
||||
Assert.assertEquals("{\"@odata.context\":\"$metadata#$ref\","
|
||||
+ "\"@odata.metadataEtag\":\"W/\\\"metadataETag\\\"\","
|
||||
+ "\"@odata.id\":\"ESAllPrim(32767)\"}",
|
||||
resultString);
|
||||
}
|
||||
@ -822,7 +821,6 @@ public class ODataJsonSerializerTest {
|
||||
final String resultString = IOUtils.toString(serializerResult.getContent());
|
||||
|
||||
Assert.assertEquals("{\"@odata.context\":\"$metadata#Collection($ref)\","
|
||||
+ "\"@odata.metadataEtag\":\"W/\\\"metadataETag\\\"\","
|
||||
+ "\"value\":[{\"@odata.id\":\"ESAllPrim(32767)\"},"
|
||||
+ "{\"@odata.id\":\"ESAllPrim(-32768)\"},"
|
||||
+ "{\"@odata.id\":\"ESAllPrim(0)\"}]}",
|
||||
@ -843,7 +841,6 @@ public class ODataJsonSerializerTest {
|
||||
final String resultString = IOUtils.toString(serializerResult.getContent());
|
||||
|
||||
Assert.assertEquals("{\"@odata.context\":\"$metadata#Collection($ref)\","
|
||||
+ "\"@odata.metadataEtag\":\"W/\\\"metadataETag\\\"\","
|
||||
+ "\"value\":[]}", resultString);
|
||||
}
|
||||
|
||||
@ -1046,7 +1043,6 @@ public class ODataJsonSerializerTest {
|
||||
|
||||
Assert.assertThat(resultString, CoreMatchers.startsWith("{"
|
||||
+ "\"@odata.context\":\"$metadata#Collection($ref)\","
|
||||
+ "\"@odata.metadataEtag\":\"W/\\\"metadataETag\\\"\","
|
||||
+ "\"@odata.count\":\"3\",\"value\":["));
|
||||
Assert.assertThat(resultString, CoreMatchers.endsWith("],"
|
||||
+ "\"@odata.nextLink\":\"/next\"}"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user