atlas-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ATLAS-208) Remove "\n" characters in the REST API json response
Date Thu, 15 Oct 2015 10:08:05 GMT

    [ https://issues.apache.org/jira/browse/ATLAS-208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14958613#comment-14958613
] 

ASF GitHub Bot commented on ATLAS-208:
--------------------------------------

GitHub user SatyaNarayan1 opened a pull request:

    https://github.com/apache/incubator-atlas/pull/16

    ATLAS-208 Remove "\n" characters in the REST API json response

    Entity and Type definition string was directly getting added to response JSON object.
converting it  to JSONObject before adding it into definition attribute of response object.

    This fixes "\n" issue in definition for below 3 API which are returning json with "\n"
    api/atlas/types/{typeName}
    api/atlas/entity/{guid}
    api/atlas/entity? type,property,value
    
    http://localhost:21000/api/atlas/types/Dimension
    {"typeName":"Dimension",**"definition":{"enumTypes":[],"structTypes":[],"traitTypes":[{"superTypes":[],"hierarchicalMetaTypeName":"org.apache.atlas.typesystem.types.TraitType","typeName":"Dimension","attributeDefinitions":[]}],"classTypes":[]}**,"requestId":"qtp2027897550-12
- 7fd6a1d5-fece-49d7-a422-28ee7f2cf810"}

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/SatyaNarayan1/incubator-atlas master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-atlas/pull/16.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #16
    
----
commit 9ed50d17e979c14a5687c3285caec1c2f62dc874
Author: Satya Narayan <satnara1@in.ibm.com>
Date:   2015-10-15T09:56:52Z

    ATLAS-208 Remove "\n" characters in the REST API json response

----


> Remove "\n" characters in the REST API json response
> ----------------------------------------------------
>
>                 Key: ATLAS-208
>                 URL: https://issues.apache.org/jira/browse/ATLAS-208
>             Project: Atlas
>          Issue Type: Bug
>    Affects Versions: 0.6-incubating
>            Reporter: Ayub Khan
>            Priority: Minor
>
> "\n" characters are seen in REST API response, which is not needed and can be removed..
> curl -k -s --negotiate -u : http://localhost:21000/api/atlas/types/traitWithSuperTypefxgy2bhnev
| python -m json.tool
> {
>     "definition": "{\n  \"enumTypes\":[\n    \n  ],\n  \"structTypes\":[\n    \n  ],\n
 \"traitTypes\":[\n    {\n      \"superTypes\":[\n        \"traitSuperType1fxgy2bhnev\",\n
       \"traitSuperType2fxgy2bhnev\"\n      ],\n      \"hierarchicalMetaTypeName\":\"org.apache.atlas.typesystem.types.TraitType\",\n
     \"typeName\":\"traitWithSuperTypefxgy2bhnev\",\n      \"attributeDefinitions\":[\n  
     {\n          \"name\":\"string\",\n          \"dataTypeName\":\"string\",\n         
\"multiplicity\":\"optional\",\n          \"isComposite\":false,\n          \"isUnique\":false,\n
         \"isIndexable\":true,\n          \"reverseAttributeName\":null\n        }\n     
]\n    }\n  ],\n  \"classTypes\":[\n    \n  ]\n}",
>     "requestId": "1146437560@qtp-1778535015-267 - d982526c-f6b6-4fe5-a4ed-722cbc29eb38",
>     "typeName": "traitWithSuperTypefxgy2bhnev"
> }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message