Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-4336

Restrict attributes of type to be created starting with double underscore

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • None
    • None
    • atlas-core
    • None

    Description

      Background

      Currently type can be created/updated with an attribute whose name starts with "__" like __guid.

      Example:

      "entityDefs": [ { 
        "name": "myType", 
        "superTypes": [], 
        "serviceType": "atlas_core", 
        "typeVersion": "1.0", 
         "attributeDefs": [ 
            { 
               "name": "__myAttrName", 
               "typeName": "string", 
               "cardinality": "SINGLE", 
               "isIndexable": true, 
               "isOptional": true, 
               "isUnique": false } 
          ] 
        }
      ]
      

      This gets mixed up with system attributes.

      Hence attribute names should not be allowed to be started with double underscore or following attribute names (system attribute names) should be restricted when a type is created or updated :

      __classificationNames
      __modifiedBy
      __createdBy
      __state
      __typeName
      __modificationTimestamp
      __propagatedClassificationNames
      __customAttributes
      __isIncomplete
      __guid
      __timestamp
      __labels

      Attachments

        1. ATLAS-4336.patch
          2 kB
          Mandar Ambawane

        Issue Links

          Activity

            People

              mandar_va Mandar Ambawane
              sharmadhas Sharmadha S
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: