-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/51800/#review149429
-----------------------------------------------------------


Fix it, then Ship it!





webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java (line 
657)
<https://reviews.apache.org/r/51800/#comment217047>

    Should be:
                Referenceable entity = 
InstanceSerialization.fromJsonReferenceable(entityDefinition, true);
                JSONArray traits = new JSONArray();
                for (String traitName : entity.getTraits()) {
                    IStruct trait = entity.getTrait(traitName);
                    traits.put(new 
JSONObject(InstanceSerialization.toJson(trait, true)));
                }


- Shwetha GS


On Sept. 16, 2016, 8:49 a.m., Vimal Sharma wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51800/
> -----------------------------------------------------------
> 
> (Updated Sept. 16, 2016, 8:49 a.m.)
> 
> 
> Review request for atlas.
> 
> 
> Repository: atlas
> 
> 
> Description
> -------
> 
> Given entity id and trait name, support rest API that returns the trait 
> instance for the entity. Currently, the other way of getting it is 
> getEntity() which returns full entity with all trait instances
> 
> 
> Diffs
> -----
> 
>   client/src/main/java/org/apache/atlas/AtlasClient.java 5ed79bc 
>   
> repository/src/main/java/org/apache/atlas/services/DefaultMetadataService.java
>  6a937f4 
>   
> repository/src/test/java/org/apache/atlas/service/DefaultMetadataServiceTest.java
>  52dcfde 
>   server-api/src/main/java/org/apache/atlas/services/MetadataService.java 
> 60d8790 
>   webapp/src/main/java/org/apache/atlas/web/resources/EntityResource.java 
> 82016d0 
>   
> webapp/src/test/java/org/apache/atlas/web/resources/EntityJerseyResourceIT.java
>  a1988ef 
> 
> Diff: https://reviews.apache.org/r/51800/diff/
> 
> 
> Testing
> -------
> 
> 
> File Attachments
> ----------------
> 
> ATLAS-712-v2.patch
>   
> https://reviews.apache.org/media/uploaded/files/2016/09/13/b5079426-19d0-48f2-88f7-08e4e645bb32__ATLAS-712-v2.patch
> 
> 
> Thanks,
> 
> Vimal Sharma
> 
>

Reply via email to