You can use the Graphical Data Mapping editor to create or transform a JSON message with a data model defined from a JSON schema or a Swagger document.
When you create a message map for a Mapping node, you can choose to have the input and output message body data defined through a JSON type in a supported JSON schema.
When you select this option, the map is created with the input and output data fully defined by the JSON schema data definitions in the referenced JSON schema file. When you create a message map to transform JSON data in this way, the map must be located in the same shared library or REST API as the JSON schema file.
When working with a JSON model, you can use a JSON schema or Swagger document in either JSON or YAML format. You can also use the JSON elements and types to perform mapping casts; for more information, see Casting elements in a message map.
Use a message map to transform data to or from a JSON data model in a JSON schema, by following these steps: