It is important to note that the API Gateway currently uses JSON Schema v2. This means that any element not explicitly set using the optional construct is considered required. We have a development incident (FR-814) for expanding this support but we are currently using JSON v2. To answer your specific questions:
You can make the e object and h value optional using this construct: "optional": true. The applicable part of the JSON schema for this would be something as follows
"e": { "type": "object",
"properties": { "f": { "type": "string" },
"h": { "type": "integer",
"optional": true } } }
You do not have to specify a value type for an object unless locking it down to a specific type. Not specifying the type attribute means that either strings or integers would be permitted.
You can specify that an array is built from objects using the following:
"qwerty": { "type": "array",
"items": {
"type": "object" } }
You can specify that an array is built of individual strings as follows:
"qwerty": { "type": "array",
"items": {
"type": "string" } }
There are a large quantity of attributes that can be used in this regard--especially for arrays. You can specify a maximum or minimum number of items, enforce uniqueness. I would encourage you to look into the linked specification to see what other components meet your needs.