atlasmap-attic / atlasmap-runtime

AtlasMap runtime engine and design time services
http://atlasmap.io
Other
3 stars 8 forks source link

Add logging dependency or split out json handling of atlas-model module #6

Open mattrpav opened 6 years ago

mattrpav commented 6 years ago

The atlas-model module includes Jackson JsonDeserializer and JsonSerializer classes for prettifying AtlasMapping json definitions to provide type-free, extensible field action support while maintaining a DSL-like syntax in JSON (say that 10x fast).

In doing so, there is no mechanism to output unsupported or type-o'd field action names. For example, if someone has "puppercase" instead of "Uppercase" in the json, we quietly skip over and continue on.

Option 1: Add slf4j dependency to the model class module

Option 2: Break off the ActionsJsonDeserializer, ActionsJsonSerializer, AtlasJsonModule and AtlasJsonMapper classes to a separate module

"outputField" : [ { "jsonType" : "io.atlasmap.v2.MockField", "actions" : [ { "Uppercase" : null }, { "Lowercase" : null }, { "SubString" : { "startIndex" : 2, "endIndex" : 5 } }, { "SubStringAfter" : { "match" : "a", "startIndex" : 2, "endIndex" : 5 } }, { "SubStringBefore" : { "match" : "z", "startIndex" : 2, "endIndex" : 5 } } ], "value" : "map-output-value", "fieldType" : "STRING", "name" : "map-output" } ]

mattrpav commented 6 years ago

The manual creation of field action names would most likely bubble up during a non-iPaaS use case.. for example, a Fuse developer using Camel and creating Atlas Mapping definition file by hand

mattrpav commented 6 years ago

Discussed with John and Tomo

Decision: Use Option #1.. add slf4j logging as a dependency to the atlas-model maven module

Rationale: Its not that big a change

Next steps:

  1. Add a logging statement to the 'default' clause in the case statement in JsonDeserializer
  2. Add a logging statement to the 'default' clause in the case statement in JsonSerializer