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

Péter Gergő Barna commented on ATLAS-1879:
------------------------------------------

[~madhan.neethiraj], 
regarding the Guid issue, the steps to reproduce are exactly the same as in the 
original description of the issue, the only difference is the last step: 
instead of by name, you try to retrieve the type by the guid returned after the 
creation.

POST http://127.0.0.1:21000/api/atlas/v2/types/typedefs

{noformat}
{
 "classificationDefs": [{
  "name": "test_classification_11",
  "description": "",
  "createdBy" : "admin",
  "superTypes": [],
  "attributeDefs": [{
    "name" : "test_class_11",
    "typeName" : "string",
    "isOptional" : true,
    "isUnique" : true,
    "isIndexable" : true,
    "cardinality": "SINGLE",
    "valuesMinCount": 0,
    "valuesMaxCount": 1
}]
 }],
 "entityDefs": [],
 "enumDefs": [],
 "structDefs": []
}

{noformat}
GET 
http://127.0.0.1:21000/api/atlas/v2/types/classification/name/test_classification_11

{noformat}
{
"category": "CLASSIFICATION",
"guid": "83162fe1-4bb4-4a87-b2b8-364e751a1265",
"createdBy": "admin",
"createTime": 1497485890857,
"updateTime": 1497485890857,
"version": 1,
"name": "test_classification_11",
"description": "",
"typeVersion": "1.0",
"attributeDefs": [
  {
"name": "test_class_11",
"typeName": "string",
"isOptional": true,
"cardinality": "SINGLE",
"valuesMinCount": 0,
"valuesMaxCount": 1,
"isUnique": true,
"isIndexable": true
}
],
"superTypes": [],
}

{noformat}
PUT http://127.0.0.1:21000/api/atlas/v2/types/typedefs
Update attribute.
GET 
http://127.0.0.1:21000/api/atlas/v2/types/classification/name/test_classification_11

{noformat}
{
"category": "CLASSIFICATION",
"createdBy": "admin",
"name": "test_classification_11",
"description": "",
"attributeDefs": [
  {
"name": "test_class_11",
"typeName": "string",
"isOptional": true,
"cardinality": "SINGLE",
"valuesMinCount": 0,
"valuesMaxCount": 1,
"isUnique": true,
"isIndexable": false
}
],
"superTypes": [],
}

{noformat}
GET 
http://127.0.0.1:21000/api/atlas/v2/types/classification/guid/83162fe1-4bb4-4a87-b2b8-364e751a1265

{noformat}
{
  "errorCode": "ATLAS-404-00-002",
  "errorMessage": "Given type guid 83162fe1-4bb4-4a87-b2b8-364e751a1265 was 
invalid"
} 

{noformat}


> Updating classification removes some properties
> -----------------------------------------------
>
>                 Key: ATLAS-1879
>                 URL: https://issues.apache.org/jira/browse/ATLAS-1879
>             Project: Atlas
>          Issue Type: Bug
>          Components:  atlas-core
>    Affects Versions: 0.8-incubating
>            Reporter: Laura Ngo
>         Attachments: Atlas-1789.postman_collection.json
>
>
> * Created classification via POST. 
> * Updated via PUT
> * Lost properties
> POST http://127.0.0.1:21000/api/atlas/v2/types/typedefs
> {code}
> {
>  "classificationDefs": [{
>   "name": "test_classification_11",
>   "description": "",
>   "createdBy" : "admin",
>   "superTypes": [],
>   "attributeDefs": [{
>     "name" : "test_class_11",
>     "typeName" : "string",
>     "isOptional" : true,
>     "isUnique" : true,
>     "isIndexable" : true,
>     "cardinality": "SINGLE",
>     "valuesMinCount": 0,
>     "valuesMaxCount": 1
> }]
>  }],
>  "entityDefs": [],
>  "enumDefs": [],
>  "structDefs": []
> }
> {code}
> GET 
> http://127.0.0.1:21000/api/atlas/v2/types/classification/name/test_classification_11
> {code}
> {
> "category": "CLASSIFICATION",
> "guid": "83162fe1-4bb4-4a87-b2b8-364e751a1265",
> "createdBy": "admin",
> "createTime": 1497485890857,
> "updateTime": 1497485890857,
> "version": 1,
> "name": "test_classification_11",
> "description": "",
> "typeVersion": "1.0",
> "attributeDefs": [
>   {
> "name": "test_class_11",
> "typeName": "string",
> "isOptional": true,
> "cardinality": "SINGLE",
> "valuesMinCount": 0,
> "valuesMaxCount": 1,
> "isUnique": true,
> "isIndexable": true
> }
> ],
> "superTypes": [],
> }
> {code}
> PUT http://127.0.0.1:21000/api/atlas/v2/types/typedefs
> Update attribute.
> GET 
> http://127.0.0.1:21000/api/atlas/v2/types/classification/name/test_classification_11
> {code}
> {
> "category": "CLASSIFICATION",
> "createdBy": "admin",
> "name": "test_classification_11",
> "description": "",
> "attributeDefs": [
>   {
> "name": "test_class_11",
> "typeName": "string",
> "isOptional": true,
> "cardinality": "SINGLE",
> "valuesMinCount": 0,
> "valuesMaxCount": 1,
> "isUnique": true,
> "isIndexable": false
> }
> ],
> "superTypes": [],
> }
> {code}
> Some properties are missing after PUT update of attribute "isIndexable"



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to