Repository: incubator-atlas Updated Branches: refs/heads/master 92490b9e2 -> 177011cf7
ATLAS-208 Remove n characters in the REST API json response (patel_satya via shwethags) Project: http://git-wip-us.apache.org/repos/asf/incubator-atlas/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-atlas/commit/177011cf Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/177011cf Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/177011cf Branch: refs/heads/master Commit: 177011cf78cdb6ddc434051fee2adac6a20cbb1c Parents: 92490b9 Author: Shwetha GS <[email protected]> Authored: Sun Nov 1 08:16:54 2015 +0530 Committer: Shwetha GS <[email protected]> Committed: Sun Nov 1 08:16:54 2015 +0530 ---------------------------------------------------------------------- release-log.txt | 1 + .../java/org/apache/atlas/web/resources/EntityResource.java | 6 +++--- .../java/org/apache/atlas/web/resources/TypesResource.java | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/177011cf/release-log.txt ---------------------------------------------------------------------- diff --git a/release-log.txt b/release-log.txt index ac5ad64..b5dc76e 100644 --- a/release-log.txt +++ b/release-log.txt @@ -4,6 +4,7 @@ Apache Atlas Release Notes --trunk - unreleased INCOMPATIBLE CHANGES: +ATLAS-208 Remove "\n" characters in the REST API json response (patel_satya via shwethags) ATLAS-58 Make hive hook reliable (shwethags) ATLAS-54 Rename configs in hive hook (shwethags) ATLAS-3 Mixed Index creation fails with Date types (sumasai via shwethags) http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/177011cf/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java ---------------------------------------------------------------------- diff --git a/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java b/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java index 98edc66..21ea05f 100755 --- a/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java +++ b/webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java @@ -118,7 +118,7 @@ public class EntityResource { JSONObject response = new JSONObject(); response.put(AtlasClient.REQUEST_ID, Servlets.getRequestId()); response.put(AtlasClient.GUID, new JSONArray(guids)); - response.put(AtlasClient.DEFINITION, metadataService.getEntityDefinition(new JSONArray(guids).getString(0))); + response.put(AtlasClient.DEFINITION, new JSONObject(metadataService.getEntityDefinition(new JSONArray(guids).getString(0)))); return Response.created(locationURI).entity(response).build(); @@ -157,7 +157,7 @@ public class EntityResource { Response.Status status = Response.Status.NOT_FOUND; if (entityDefinition != null) { - response.put(AtlasClient.DEFINITION, entityDefinition); + response.put(AtlasClient.DEFINITION, new JSONObject(entityDefinition)); status = Response.Status.OK; } else { response.put(AtlasClient.ERROR, @@ -244,7 +244,7 @@ public class EntityResource { Response.Status status = Response.Status.NOT_FOUND; if (entityDefinition != null) { - response.put(AtlasClient.DEFINITION, entityDefinition); + response.put(AtlasClient.DEFINITION, new JSONObject(entityDefinition)); status = Response.Status.OK; } else { response.put(AtlasClient.ERROR, Servlets.escapeJsonString(String.format("An entity with type={%s}, " + http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/177011cf/webapp/src/main/java/org/apache/atlas/web/resources/TypesResource.java ---------------------------------------------------------------------- diff --git a/webapp/src/main/java/org/apache/atlas/web/resources/TypesResource.java b/webapp/src/main/java/org/apache/atlas/web/resources/TypesResource.java index e4e18f5..2b8c54f 100755 --- a/webapp/src/main/java/org/apache/atlas/web/resources/TypesResource.java +++ b/webapp/src/main/java/org/apache/atlas/web/resources/TypesResource.java @@ -123,7 +123,7 @@ public class TypesResource { JSONObject response = new JSONObject(); response.put(AtlasClient.TYPENAME, typeName); - response.put(AtlasClient.DEFINITION, typeDefinition); + response.put(AtlasClient.DEFINITION, new JSONObject(typeDefinition)); response.put(AtlasClient.REQUEST_ID, Servlets.getRequestId()); return Response.ok(response).build();
