You can use the Graphical Data Mapping editor to create and transform JSON messages with the data model defined from a JSON schema or REST API swagger document, which can be in JSON or YAML format.
The following requirements apply to both JSON schema and to the model definitions from a Swagger document; for more information, see Swagger.
You
can use an external tool to validate the JSON schema file before importing
it and using it for message maps. For example, see http://jsonlint.com.
This type could have an transform applied in the map that will set the length in excess of 10 characters. This would not cause a map design validation or runtime error.
"NullableNums": {
"oneOf": [
{
"type": "integer",
},
{
"type": "null"
}
]
}
"Address" : {
"oneOf": [
{"type": "null"},
{"$ref":"#/definitions/Address"}
]
}
In these cases, the map presents the JSON type in the map ready for wiring transforms. The properties show that the type is defined as nillable.
"oneOf": [
{
"$ref": "#/definitions/Account"
},
{
"type": "array",
"items": {
"$ref": "#/definitions/Account"
}
}
]
In this case the New Message Map wizard, or the Map Editor Add Input or Output dialog provides two entries for the JSON type, one as an Object and the other as an Array (in the example, these are Account and JSONArray_Account).
"Contact" : {
"properties": {
"conType": {
"type": "string"
}
},
"oneOf": [
{"type": "null"},
{"$ref":"#/definitions/Address"},
{"$ref":"#/definitions/TelContacts"}
]
}
In this case the map initially displays the JSON object "Contact" with only the "conType" child, or with no content when the JSON object has no properties. You can right-click "Contact" and apply a mapping cast to one or more of the types from the list provided in the JSON schema; in this example, the types are "Contact_Address" and "Contact_TelContacts". For more information, see Casting with JSON schema types.
Unable to locate object named "mlib://SafesForceAllModelsShlib/Contact#/-/simpleType{http://www.ibm.com/iib/msl/json}Contact". LeadToContact.map Map Reference Problem
The null input or output object /Contact.json could not be found. LeadToContact.map Map Problem
When
the JSON schema file that is used by a message map is modified and
the map has not been edited and saved again, you might have to invoke
the clean action through the menu option .