how to have a bit of obliqueness when passing data to AWS API Gateway?
<p>I have an iOS app that takes data "profile" from a server, and send it to API Gateway along with one other value "appKnowsThisKey".</p>

<p>I'd like the iOS app to remain agnostic to the structure of "profile".</p>

<p>I've created a Model on API Gateway which does know the keys of the dictionary.</p>

<pre><code>{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "ExampleModel",
"type": "object", "properties": {
    "appKnowsThisKey" : {"type": "string" },
    "profile": { 
        "type": "object", "properties": {
            "key1": {"type": "string" },
            "key2": {"type": "string" },
            "key3": {
                "type": "array", "items": {"type": "string" }
            }
        }
    }
}}
</code></pre>

<p>API Gateway Deployment to iOS has created Swift classes: <code>ExampleModel</code> and <code>ExampleModel_profile</code></p>

<p>I have an object <code>profile</code> in the iOS app holding the values in a <code>[String:AnyObject]</code>.</p>

<p>How can I assign the dictionary in my iOS to the API Gateway Model for profile? e.g., Do I redefine "profile" in ExampleModel to be a <code>string</code> and pass in a JSON string?</p>