question: @ Override public PatchResult applyPatch ( PatchData patchData ) { String typeName = patchData . getTypeName ( ) ; String applyVersion = patchData . getApplyToVersion ( ) ; TypesDef updatedTypeDef ; PatchResult result ; try { if ( checkIfTypeExists ( typeName , metadataService ) ) { TypesDef typesDef = getTypeDef ( typeName ) ; String currentVersion = getTypeVersion ( typeName ) ; if ( currentVersion == null || currentVersion . equalsIgnoreCase ( applyVersion ) || currentVersion . startsWith ( applyVersion + "." ) ) { updatedTypeDef = updateTypesDef ( typesDef , patchData ) ; if ( updatedTypeDef != null ) { metadataService . updateType ( TypesSerialization . toJson ( updatedTypeDef ) ) ; LOG . info ( "updated " + patchData . getTypeName ( ) + " type from version " + patchData . getApplyToVersion ( ) + " to " + patchData . getUpdateToVersion ( ) ) ; result = new PatchResult ( "patch applied successfully!" , PatchStatus . SUCCESS ) ; } else { LOG . error ( "failed to create updated typedef for type=" + typeName + "; applyToVersion=" + applyVersion + "; updateToVersion=" + patchData . getUpdateToVersion ( ) ) ; result = new PatchResult ( "patch failed!" , PatchStatus . FAILED ) ; } } else { LOG . info ( "patch skipped for " + patchData . getTypeName ( ) ) ; result = new PatchResult ( "patch skipped!" , PatchStatus . SKIPPED ) ; } } else { LOG . error ( "failed to apply patch (typeName=" + typeName + "; applyToVersion=" + applyVersion + "; updateToVersion=" + patchData . getUpdateToVersion ( ) + "): type doesn't exist" ) ; result = new PatchResult ( "patch failed!" , PatchStatus . FAILED ) ; } } catch ( AtlasException e ) { LOG . error ( "error in updating type for " + patchData . getTypeName ( ) ) ; result = new PatchResult ( "unable to update type" , PatchStatus . FAILED ) ; } catch ( JSONException e ) { LOG . error ( "error in updating typedef for  " + patchData . getTypeName ( ) ) ; result = new PatchResult ( "unable to update typedef" , PatchStatus . FAILED ) ; } return result ; }
target:  SAMPLE PATCH DATA  { "patches": [ { "action": "ADD_ATTRIBUTE", "typeName": "hive_column", "applyToVersion": "1.0", "updateToVersion": "2.0", "params": { "optionalParam1" : "true", "optionalParam2" : "false" }, "attributeDefinitions": [ { "name": "position", "dataTypeName": "string", "multiplicity": "optional", "isComposite": false, "isUnique": false, "isIndexable": false, "reverseAttributeName": null } ] } ] }