[
https://issues.apache.org/jira/browse/ATLAS-2429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16347156#comment-16347156
]
Madhan Neethiraj commented on ATLAS-2429:
-----------------------------------------
[~ayubkhan] - attribute is defined with
{{"isOptional":false,"cardinality":"SINGLE"}}, which implicitly means minCount
& maxCount are "1" i.e. minCount can't be less than 1 - as it not an optional
attribute; maxCount can't be greater than 1 as the cardinality is SINGLE.
> ValuesMinCount and ValuesMaxCount in attributeDef always defaults to 1 for
> any value.
> -------------------------------------------------------------------------------------
>
> Key: ATLAS-2429
> URL: https://issues.apache.org/jira/browse/ATLAS-2429
> Project: Atlas
> Issue Type: Bug
> Components: atlas-core
> Affects Versions: 1.0.0
> Reporter: Ayub Pathan
> Priority: Major
> Fix For: 1.0.0
>
>
> {noformat}
> curl -u 'admin:admin' -X POST -d
> '{"structDefs":[{"category":"STRUCT","name":"struct_sample4","attributeDefs":[{"name":"string","typeName":"string","isOptional":false,"cardinality":"SINGLE","valuesMinCount":-2147483648,"valuesMaxCount":2147483647,"isUnique":true,"isIndexable":true}]}]}'
> -H 'Content-Type:application/json'
> http://ctr-e137-1514896590304-36955-01-000003.hwx.site:21000/api/atlas/v2/types/typedefs
> | python -m json.tool
> {
> "classificationDefs": [],
> "entityDefs": [],
> "enumDefs": [],
> "relationshipDefs": [],
> "structDefs": [
> {
> "attributeDefs": [
> {
> "cardinality": "SINGLE",
> "isIndexable": true,
> "isOptional": false,
> "isUnique": true,
> "name": "string",
> "typeName": "string",
> "valuesMaxCount": 1,
> "valuesMinCount": 1
> }
> ],
> "category": "STRUCT",
> "createTime": 1517386162718,
> "createdBy": "admin",
> "description": "struct_sample4",
> "guid": "2daf9320-a668-4543-a287-806923360b3e",
> "name": "struct_sample4",
> "typeVersion": "1.0",
> "updateTime": 1517386162718,
> "updatedBy": "admin",
> "version": 1
> }
> ]
> }
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)