atlasmap-attic / atlasmap-ui

An Angular2 module for designing Atlasmap mapping definitions
Apache License 2.0
9 stars 8 forks source link

When fields are added to the target document, where should that information be saved? #128

Open gashcrumb opened 6 years ago

gashcrumb commented 6 years ago

From @gashcrumb on September 20, 2017 20:0

So if I map from something to JSON and add a bunch of new fields in the target JSON document, where should this information be stored, should it be stored in the specification attribute in the action's inputDataShape

Currently it seems to get lost.

@igarashitm @zregvart FYI

Copied from original issue: syndesisio/syndesis-ui#993

gashcrumb commented 6 years ago

I guess this is related to or possibly duplicates https://github.com/syndesisio/syndesis-ui/issues/682

gashcrumb commented 6 years ago

Yeah, this is a duplicate of #682

gashcrumb commented 6 years ago

No it isn't :-)

igarashitm commented 6 years ago

I don't even know if it's really needed. Is there any usecase we want to add additional field which is not defined in the schema? The only thing runtime could do is to throw an Exception saying "no such field nor setter method" I guess...

gashcrumb commented 6 years ago

What about mapping to some arbitrary JSON structure?

igarashitm commented 6 years ago

I almost forgot we have a instance inspection which consume example payload.The example payload might not have all fields. It's not really used today though... Also, XML schema could have any for the attribute, which allows any name of attributes. But then, we'll have to check if any field is allowed there and otherwise this field addition should be disabled.