Integration mapping file imports
Overview
Integration mapping files define an import reference in addition to a combine composition. The import reference for mapping files is analogous to the import reference for JSON schema files.
In addition, the differences between the import reference and combine composition are roughly analogous. On the one hand, the combine composition will stitch together all mappers with the same name. On the other hand, the import reference will keep everything in a separate namespace.
Choose between the composition and the reference based on whether you want the combination behavior or the import behavior. The combination behavior is ideal when logically extending another mapping file. The import behavior is ideal when reusing a standard mapping or mapper for a shared schema.
Import syntax
{
"schemaName": "gw.px.ete.contact-1.0",
"import" : {
"address" : "gw.px.ete.address-1.0"
},
"mappers": {
"Contact" : {
"schemaDefinition" : "Contact",
"root" : "entity.Contact",
"properties" : {
"EmailAddress1" : {
"path" : "Contact.EmailAddress1"
},
"HomePhone" : {
"path" : "Contact.HomePhone"
},
"HomePhoneCountry" : {
"path" : "Contact.HomePhoneCountry"
},
"AllAddresses" : {
"path" : "Contact.AllAddresses",
"mapper" : "address#/mappers/Address"
},
"PrimaryAddress" : {
"path" : "Contact.PrimaryAddress",
"mapper" : "address#/mappers/Address"
}
}
}
}
}Import overrides
{
"schemaName" : "customer.contact-1.0",
"combine" : ["gw.px.ete.contact-1.0"],
"import" : {
"address" : "customer.address-1.0"
}
}Overriding
a mapping file import will cause all inherited mapper references to the
address alias to reference mappers from the
customer.address-1.0 mapping rather than the
gw.px.ete.address-1.0 mapping.