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
you can let Mendix create the Entities automatically based on the a JSON in an Import Mapping.
Create a JSON Structure basedon your JSON
Create an Import Mapping and in the Schema Source select the prior created JSON Structure
Now open the import mapping and click “Map automatically”
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.