Answering my own topic..
I have read some more about JSONModel, and it seems the only way to use that for exporting JSON is to first create wrapper classes which inherit from JSONModel.
This means use of swagger-codegen for Objective C is heavily flawed at the moment:
* No Objective C wrapper classes are generated beyond the top level in the swagger definition.
* Code for reading parsed data (from output of web-API-call) must use valueForKey for any values beyond the top level object, which makes longer and less abstract code.
* Code for writing JSON to parameters for a web-API-call must model all missing classes, since that seems to be the only way with JSONModel. This means we must duplicate a large chunk of the swagger definition inside the Objective C code as manually written objects (which should have been generated).
Am I still missing something?
Is swagger-codegen supposed to be able to generate complete wrapper code for objects containing other objects?
If so, how do I make it happen with a swagger definition like the one I attached to the post above?
A colleague of mine recently filed this issue on a similar topic:
https://github.com/swagger-api/swagger-codegen/issues/819What I describe in this thread is with the data types inside the definitions section of the swagger definition.
Thanks and regards!
John