Create entity from JSON template

Greetings, My use-case is to consume a REST API that returns an object as JSON, given its Swagger representation. I (manually) created the domain’s entity from its JSON representation, but surely there may be an automated way, that I could not find. The domain designer has an “Import web service/XML file” capability, which is neat, but I could not find the equivalent allowing to create an entity from a JSON file. Thanks in advance
1 answers

Hi Jean-Paul, 

you can let Mendix create the Entities automatically based on the a JSON in an Import Mapping.

  1. Create a JSON Structure basedon your JSON
  2. Create an Import Mapping and in the Schema Source select the prior created JSON Structure
  3. Now open the import mapping and click “Map automatically”
  4. Mendix will now Map the Objects and Attributes based on the Names on existing entities. 
    and for your case will create new entities if it could not map to existing ones.