We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
ApiGateway Model Schema should be a Dict not a string
troposphere.apigateway.Model class contains a property called schema, it is defined as 'basestring', this property should be a dict.

Ideally, you should supply a class to represent 'Schema'

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `troposphere/apigateway.py`
Content:
```
1 from . import AWSObject, AWSProperty
2 from .validators import positive_integer
3 
4 
5 def validate_authorizer_ttl(ttl_value):
6     """ Validate authorizer ttl timeout
7     :param ttl_value: The TTL timeout in seconds
8     :return: The provided TTL value if valid
9     """
10     ttl_value = int(positive_integer(ttl_value))
11     if ttl_value > 3600:
12         raise ValueError("The AuthorizerResultTtlInSeconds should be <= 3600")
13     return ttl_value
14 
15 
16 class Account(AWSObject):
17     resource_type = "AWS::ApiGateway::Account"
18 
19     props = {
20         "CloudWatchRoleArn": (basestring, False)
21     }
22 
23 
24 class StageKey(AWSProperty):
25 
26     props = {
27         "RestApiId": (basestring, False),
28         "StageName": (basestring, False)
29     }
30 
31 
32 class ApiKey(AWSObject):
33     resource_type = "AWS::ApiGateway::ApiKey"
34 
35     props = {
36         "Description": (basestring, False),
37         "Enabled": (bool, False),
38         "Name": (basestring, False),
39         "StageKeys": ([StageKey], False)
40     }
41 
42 
43 class Authorizer(AWSObject):
44     resource_type = "AWS::ApiGateway::Authorizer"
45 
46     props = {
47         "AuthorizerCredentials": (basestring, False),
48         "AuthorizerResultTtlInSeconds": (validate_authorizer_ttl, False),
49         "AuthorizerUri": (basestring, True),
50         "IdentitySource": (basestring, True),
51         "IdentityValidationExpression": (basestring, False),
52         "Name": (basestring, True),
53         "ProviderARNs": ([basestring], False),
54         "RestApiId": (basestring, False),
55         "Type": (basestring, True)
56     }
57 
58 
59 class BasePathMapping(AWSObject):
60     resource_type = "AWS::ApiGateway::BasePathMapping"
61 
62     props = {
63         "BasePath": (basestring, False),
64         "DomainName": (basestring, True),
65         "RestApiId": (basestring, True),
66         "Stage": (basestring, False)
67     }
68 
69 
70 class ClientCertificate(AWSObject):
71     resource_type = "AWS::ApiGateway::ClientCertificate"
72 
73     props = {
74         "Description": (basestring, False)
75     }
76 
77 
78 class MethodSetting(AWSProperty):
79 
80     props = {
81         "CacheDataEncrypted": (bool, False),
82         "CacheTtlInSeconds": (positive_integer, False),
83         "CachingEnabled": (bool, False),
84         "DataTraceEnabled": (bool, False),
85         "HttpMethod": (basestring, True),
86         "LoggingLevel": (basestring, False),
87         "MetricsEnabled": (bool, False),
88         "ResourcePath": (basestring, True),
89         "ThrottlingBurstLimit": (positive_integer, False),
90         "ThrottlingRateLimit": (positive_integer, False)
91     }
92 
93 
94 class StageDescription(AWSProperty):
95 
96     props = {
97         "CacheClusterEnabled": (bool, False),
98         "CacheClusterSize": (basestring, False),
99         "CacheDataEncrypted": (bool, False),
100         "CacheTtlInSeconds": (positive_integer, False),
101         "CachingEnabled": (bool, False),
102         "ClientCertificateId": (basestring, False),
103         "DataTraceEnabled": (bool, False),
104         "Description": (basestring, False),
105         "LoggingLevel": (basestring, False),
106         "MethodSettings": ([MethodSetting], False),
107         "MetricsEnabled": (bool, False),
108         "StageName": (basestring, False),
109         "ThrottlingBurstLimit": (positive_integer, False),
110         "ThrottlingRateLimit": (positive_integer, False),
111         "Variables": (dict, False)
112     }
113 
114 
115 class Deployment(AWSObject):
116     resource_type = "AWS::ApiGateway::Deployment"
117 
118     props = {
119         "Description": (basestring, False),
120         "RestApiId": (basestring, True),
121         "StageDescription": (StageDescription, False),
122         "StageName": (basestring, False)
123     }
124 
125 
126 class IntegrationResponse(AWSProperty):
127 
128     props = {
129         "ResponseParameters": (dict, False),
130         "ResponseTemplates": (dict, False),
131         "SelectionPattern": (basestring, False),
132         "StatusCode": (basestring, False)
133     }
134 
135 
136 class Integration(AWSProperty):
137 
138     props = {
139         "CacheKeyParameters": ([basestring], False),
140         "CacheNamespace": (basestring, False),
141         "Credentials": (basestring, False),
142         "IntegrationHttpMethod": (basestring, False),
143         "IntegrationResponses": ([IntegrationResponse], False),
144         "PassthroughBehavior": (basestring, False),
145         "RequestParameters": (dict, False),
146         "RequestTemplates": (dict, False),
147         "Type": (basestring, True),
148         "Uri": (basestring, False)
149     }
150 
151 
152 class MethodResponse(AWSProperty):
153 
154     props = {
155         "ResponseModels": (dict, False),
156         "ResponseParameters": (dict, False),
157         "StatusCode": (basestring, True)
158     }
159 
160 
161 class Method(AWSObject):
162     resource_type = "AWS::ApiGateway::Method"
163 
164     props = {
165         "ApiKeyRequired": (bool, False),
166         "AuthorizationType": (basestring, True),
167         "AuthorizerId": (basestring, False),
168         "HttpMethod": (basestring, True),
169         "Integration": (Integration, False),
170         "MethodResponses": ([MethodResponse], False),
171         "RequestModels": (dict, False),
172         "RequestParameters": (dict, False),
173         "ResourceId": (basestring, True),
174         "RestApiId": (basestring, True)
175     }
176 
177 
178 class Model(AWSObject):
179     resource_type = "AWS::ApiGateway::Model"
180 
181     props = {
182         "ContentType": (basestring, False),
183         "Description": (basestring, False),
184         "Name": (basestring, False),
185         "RestApiId": (basestring, True),
186         "Schema": (basestring, False)
187     }
188 
189 
190 class Resource(AWSObject):
191     resource_type = "AWS::ApiGateway::Resource"
192 
193     props = {
194         "ParentId": (basestring, True),
195         "PathPart": (basestring, True),
196         "RestApiId": (basestring, True)
197     }
198 
199 
200 class S3Location(AWSProperty):
201 
202     props = {
203         "Bucket": (basestring, False),
204         "ETag": (basestring, False),
205         "Key": (basestring, False),
206         "Version": (basestring, False)
207     }
208 
209 
210 class RestApi(AWSObject):
211     resource_type = "AWS::ApiGateway::RestApi"
212 
213     props = {
214         "Body": (dict, False),
215         "BodyS3Location": (S3Location, False),
216         "CloneFrom": (basestring, False),
217         "Description": (basestring, False),
218         "FailOnWarnings": (basestring, False),
219         "Name": (basestring, False),
220         "Parameters": ([basestring], False)
221     }
222 
223 
224 class Stage(AWSObject):
225     resource_type = "AWS::ApiGateway::Stage"
226 
227     props = {
228         "CacheClusterEnabled": (bool, False),
229         "CacheClusterSize": (basestring, False),
230         "ClientCertificateId": (basestring, False),
231         "DeploymentId": (basestring, True),
232         "Description": (basestring, False),
233         "MethodSettings": ([MethodSetting], False),
234         "RestApiId": (basestring, True),
235         "StageName": (basestring, True),
236         "Variables": (dict, False)
237     }
238 
239 
240 class ApiStage(AWSProperty):
241     props = {
242         "ApiId": (basestring, False),
243         "Stage": (basestring, False),
244     }
245 
246 
247 class QuotaSettings(AWSProperty):
248     props = {
249         "Limit": (positive_integer, False),
250         "Offset": (positive_integer, False),
251         "Period": (basestring, False),
252     }
253 
254 
255 class ThrottleSettings(AWSProperty):
256     props = {
257         "BurstLimit": (positive_integer, False),
258         "RateLimit": (positive_integer, False),
259     }
260 
261 
262 class UsagePlan(AWSObject):
263     resource_type = "AWS::ApiGateway::UsagePlan"
264 
265     props = {
266         "ApiStages": ([ApiStage], False),
267         "Description": (basestring, False),
268         "Quota": (QuotaSettings, False),
269         "Throttle": (ThrottleSettings, False),
270         "UsagePlanName": (basestring, False),
271     }
272
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/troposphere/apigateway.py b/troposphere/apigateway.py
--- a/troposphere/apigateway.py
+++ b/troposphere/apigateway.py
@@ -1,5 +1,6 @@
-from . import AWSObject, AWSProperty
+from . import AWSHelperFn, AWSObject, AWSProperty
 from .validators import positive_integer
+import json
 
 
 def validate_authorizer_ttl(ttl_value):
@@ -183,9 +184,23 @@
         "Description": (basestring, False),
         "Name": (basestring, False),
         "RestApiId": (basestring, True),
-        "Schema": (basestring, False)
+        "Schema": ((basestring, dict), False)
     }
 
+    def validate(self):
+        if 'Schema' in self.properties:
+            schema = self.properties.get('Schema')
+            if isinstance(schema, basestring):
+                # Verify it is a valid json string
+                json.loads(schema)
+            elif isinstance(schema, dict):
+                # Convert the dict to a basestring
+                self.properties['Schema'] = json.dumps(schema)
+            elif isinstance(schema, AWSHelperFn):
+                pass
+            else:
+                raise ValueError("Schema must be a str or dict")
+
 
 class Resource(AWSObject):
     resource_type = "AWS::ApiGateway::Resource"

{"golden_diff": "diff --git a/troposphere/apigateway.py b/troposphere/apigateway.py\n--- a/troposphere/apigateway.py\n+++ b/troposphere/apigateway.py\n@@ -1,5 +1,6 @@\n-from . import AWSObject, AWSProperty\n+from . import AWSHelperFn, AWSObject, AWSProperty\n from .validators import positive_integer\n+import json\n \n \n def validate_authorizer_ttl(ttl_value):\n@@ -183,9 +184,23 @@\n         \"Description\": (basestring, False),\n         \"Name\": (basestring, False),\n         \"RestApiId\": (basestring, True),\n-        \"Schema\": (basestring, False)\n+        \"Schema\": ((basestring, dict), False)\n     }\n \n+    def validate(self):\n+        if 'Schema' in self.properties:\n+            schema = self.properties.get('Schema')\n+            if isinstance(schema, basestring):\n+                # Verify it is a valid json string\n+                json.loads(schema)\n+            elif isinstance(schema, dict):\n+                # Convert the dict to a basestring\n+                self.properties['Schema'] = json.dumps(schema)\n+            elif isinstance(schema, AWSHelperFn):\n+                pass\n+            else:\n+                raise ValueError(\"Schema must be a str or dict\")\n+\n \n class Resource(AWSObject):\n     resource_type = \"AWS::ApiGateway::Resource\"\n", "issue": "ApiGateway Model Schema should be a Dict not a string\ntroposphere.apigateway.Model class contains a property called schema, it is defined as 'basestring', this property should be a dict.\r\n\r\nIdeally, you should supply a class to represent 'Schema'\n", "before_files": [{"content": "from . import AWSObject, AWSProperty\nfrom .validators import positive_integer\n\n\ndef validate_authorizer_ttl(ttl_value):\n    \"\"\" Validate authorizer ttl timeout\n    :param ttl_value: The TTL timeout in seconds\n    :return: The provided TTL value if valid\n    \"\"\"\n    ttl_value = int(positive_integer(ttl_value))\n    if ttl_value > 3600:\n        raise ValueError(\"The AuthorizerResultTtlInSeconds should be <= 3600\")\n    return ttl_value\n\n\nclass Account(AWSObject):\n    resource_type = \"AWS::ApiGateway::Account\"\n\n    props = {\n        \"CloudWatchRoleArn\": (basestring, False)\n    }\n\n\nclass StageKey(AWSProperty):\n\n    props = {\n        \"RestApiId\": (basestring, False),\n        \"StageName\": (basestring, False)\n    }\n\n\nclass ApiKey(AWSObject):\n    resource_type = \"AWS::ApiGateway::ApiKey\"\n\n    props = {\n        \"Description\": (basestring, False),\n        \"Enabled\": (bool, False),\n        \"Name\": (basestring, False),\n        \"StageKeys\": ([StageKey], False)\n    }\n\n\nclass Authorizer(AWSObject):\n    resource_type = \"AWS::ApiGateway::Authorizer\"\n\n    props = {\n        \"AuthorizerCredentials\": (basestring, False),\n        \"AuthorizerResultTtlInSeconds\": (validate_authorizer_ttl, False),\n        \"AuthorizerUri\": (basestring, True),\n        \"IdentitySource\": (basestring, True),\n        \"IdentityValidationExpression\": (basestring, False),\n        \"Name\": (basestring, True),\n        \"ProviderARNs\": ([basestring], False),\n        \"RestApiId\": (basestring, False),\n        \"Type\": (basestring, True)\n    }\n\n\nclass BasePathMapping(AWSObject):\n    resource_type = \"AWS::ApiGateway::BasePathMapping\"\n\n    props = {\n        \"BasePath\": (basestring, False),\n        \"DomainName\": (basestring, True),\n        \"RestApiId\": (basestring, True),\n        \"Stage\": (basestring, False)\n    }\n\n\nclass ClientCertificate(AWSObject):\n    resource_type = \"AWS::ApiGateway::ClientCertificate\"\n\n    props = {\n        \"Description\": (basestring, False)\n    }\n\n\nclass MethodSetting(AWSProperty):\n\n    props = {\n        \"CacheDataEncrypted\": (bool, False),\n        \"CacheTtlInSeconds\": (positive_integer, False),\n        \"CachingEnabled\": (bool, False),\n        \"DataTraceEnabled\": (bool, False),\n        \"HttpMethod\": (basestring, True),\n        \"LoggingLevel\": (basestring, False),\n        \"MetricsEnabled\": (bool, False),\n        \"ResourcePath\": (basestring, True),\n        \"ThrottlingBurstLimit\": (positive_integer, False),\n        \"ThrottlingRateLimit\": (positive_integer, False)\n    }\n\n\nclass StageDescription(AWSProperty):\n\n    props = {\n        \"CacheClusterEnabled\": (bool, False),\n        \"CacheClusterSize\": (basestring, False),\n        \"CacheDataEncrypted\": (bool, False),\n        \"CacheTtlInSeconds\": (positive_integer, False),\n        \"CachingEnabled\": (bool, False),\n        \"ClientCertificateId\": (basestring, False),\n        \"DataTraceEnabled\": (bool, False),\n        \"Description\": (basestring, False),\n        \"LoggingLevel\": (basestring, False),\n        \"MethodSettings\": ([MethodSetting], False),\n        \"MetricsEnabled\": (bool, False),\n        \"StageName\": (basestring, False),\n        \"ThrottlingBurstLimit\": (positive_integer, False),\n        \"ThrottlingRateLimit\": (positive_integer, False),\n        \"Variables\": (dict, False)\n    }\n\n\nclass Deployment(AWSObject):\n    resource_type = \"AWS::ApiGateway::Deployment\"\n\n    props = {\n        \"Description\": (basestring, False),\n        \"RestApiId\": (basestring, True),\n        \"StageDescription\": (StageDescription, False),\n        \"StageName\": (basestring, False)\n    }\n\n\nclass IntegrationResponse(AWSProperty):\n\n    props = {\n        \"ResponseParameters\": (dict, False),\n        \"ResponseTemplates\": (dict, False),\n        \"SelectionPattern\": (basestring, False),\n        \"StatusCode\": (basestring, False)\n    }\n\n\nclass Integration(AWSProperty):\n\n    props = {\n        \"CacheKeyParameters\": ([basestring], False),\n        \"CacheNamespace\": (basestring, False),\n        \"Credentials\": (basestring, False),\n        \"IntegrationHttpMethod\": (basestring, False),\n        \"IntegrationResponses\": ([IntegrationResponse], False),\n        \"PassthroughBehavior\": (basestring, False),\n        \"RequestParameters\": (dict, False),\n        \"RequestTemplates\": (dict, False),\n        \"Type\": (basestring, True),\n        \"Uri\": (basestring, False)\n    }\n\n\nclass MethodResponse(AWSProperty):\n\n    props = {\n        \"ResponseModels\": (dict, False),\n        \"ResponseParameters\": (dict, False),\n        \"StatusCode\": (basestring, True)\n    }\n\n\nclass Method(AWSObject):\n    resource_type = \"AWS::ApiGateway::Method\"\n\n    props = {\n        \"ApiKeyRequired\": (bool, False),\n        \"AuthorizationType\": (basestring, True),\n        \"AuthorizerId\": (basestring, False),\n        \"HttpMethod\": (basestring, True),\n        \"Integration\": (Integration, False),\n        \"MethodResponses\": ([MethodResponse], False),\n        \"RequestModels\": (dict, False),\n        \"RequestParameters\": (dict, False),\n        \"ResourceId\": (basestring, True),\n        \"RestApiId\": (basestring, True)\n    }\n\n\nclass Model(AWSObject):\n    resource_type = \"AWS::ApiGateway::Model\"\n\n    props = {\n        \"ContentType\": (basestring, False),\n        \"Description\": (basestring, False),\n        \"Name\": (basestring, False),\n        \"RestApiId\": (basestring, True),\n        \"Schema\": (basestring, False)\n    }\n\n\nclass Resource(AWSObject):\n    resource_type = \"AWS::ApiGateway::Resource\"\n\n    props = {\n        \"ParentId\": (basestring, True),\n        \"PathPart\": (basestring, True),\n        \"RestApiId\": (basestring, True)\n    }\n\n\nclass S3Location(AWSProperty):\n\n    props = {\n        \"Bucket\": (basestring, False),\n        \"ETag\": (basestring, False),\n        \"Key\": (basestring, False),\n        \"Version\": (basestring, False)\n    }\n\n\nclass RestApi(AWSObject):\n    resource_type = \"AWS::ApiGateway::RestApi\"\n\n    props = {\n        \"Body\": (dict, False),\n        \"BodyS3Location\": (S3Location, False),\n        \"CloneFrom\": (basestring, False),\n        \"Description\": (basestring, False),\n        \"FailOnWarnings\": (basestring, False),\n        \"Name\": (basestring, False),\n        \"Parameters\": ([basestring], False)\n    }\n\n\nclass Stage(AWSObject):\n    resource_type = \"AWS::ApiGateway::Stage\"\n\n    props = {\n        \"CacheClusterEnabled\": (bool, False),\n        \"CacheClusterSize\": (basestring, False),\n        \"ClientCertificateId\": (basestring, False),\n        \"DeploymentId\": (basestring, True),\n        \"Description\": (basestring, False),\n        \"MethodSettings\": ([MethodSetting], False),\n        \"RestApiId\": (basestring, True),\n        \"StageName\": (basestring, True),\n        \"Variables\": (dict, False)\n    }\n\n\nclass ApiStage(AWSProperty):\n    props = {\n        \"ApiId\": (basestring, False),\n        \"Stage\": (basestring, False),\n    }\n\n\nclass QuotaSettings(AWSProperty):\n    props = {\n        \"Limit\": (positive_integer, False),\n        \"Offset\": (positive_integer, False),\n        \"Period\": (basestring, False),\n    }\n\n\nclass ThrottleSettings(AWSProperty):\n    props = {\n        \"BurstLimit\": (positive_integer, False),\n        \"RateLimit\": (positive_integer, False),\n    }\n\n\nclass UsagePlan(AWSObject):\n    resource_type = \"AWS::ApiGateway::UsagePlan\"\n\n    props = {\n        \"ApiStages\": ([ApiStage], False),\n        \"Description\": (basestring, False),\n        \"Quota\": (QuotaSettings, False),\n        \"Throttle\": (ThrottleSettings, False),\n        \"UsagePlanName\": (basestring, False),\n    }\n", "path": "troposphere/apigateway.py"}], "after_files": [{"content": "from . import AWSHelperFn, AWSObject, AWSProperty\nfrom .validators import positive_integer\nimport json\n\n\ndef validate_authorizer_ttl(ttl_value):\n    \"\"\" Validate authorizer ttl timeout\n    :param ttl_value: The TTL timeout in seconds\n    :return: The provided TTL value if valid\n    \"\"\"\n    ttl_value = int(positive_integer(ttl_value))\n    if ttl_value > 3600:\n        raise ValueError(\"The AuthorizerResultTtlInSeconds should be <= 3600\")\n    return ttl_value\n\n\nclass Account(AWSObject):\n    resource_type = \"AWS::ApiGateway::Account\"\n\n    props = {\n        \"CloudWatchRoleArn\": (basestring, False)\n    }\n\n\nclass StageKey(AWSProperty):\n\n    props = {\n        \"RestApiId\": (basestring, False),\n        \"StageName\": (basestring, False)\n    }\n\n\nclass ApiKey(AWSObject):\n    resource_type = \"AWS::ApiGateway::ApiKey\"\n\n    props = {\n        \"Description\": (basestring, False),\n        \"Enabled\": (bool, False),\n        \"Name\": (basestring, False),\n        \"StageKeys\": ([StageKey], False)\n    }\n\n\nclass Authorizer(AWSObject):\n    resource_type = \"AWS::ApiGateway::Authorizer\"\n\n    props = {\n        \"AuthorizerCredentials\": (basestring, False),\n        \"AuthorizerResultTtlInSeconds\": (validate_authorizer_ttl, False),\n        \"AuthorizerUri\": (basestring, True),\n        \"IdentitySource\": (basestring, True),\n        \"IdentityValidationExpression\": (basestring, False),\n        \"Name\": (basestring, True),\n        \"ProviderARNs\": ([basestring], False),\n        \"RestApiId\": (basestring, False),\n        \"Type\": (basestring, True)\n    }\n\n\nclass BasePathMapping(AWSObject):\n    resource_type = \"AWS::ApiGateway::BasePathMapping\"\n\n    props = {\n        \"BasePath\": (basestring, False),\n        \"DomainName\": (basestring, True),\n        \"RestApiId\": (basestring, True),\n        \"Stage\": (basestring, False)\n    }\n\n\nclass ClientCertificate(AWSObject):\n    resource_type = \"AWS::ApiGateway::ClientCertificate\"\n\n    props = {\n        \"Description\": (basestring, False)\n    }\n\n\nclass MethodSetting(AWSProperty):\n\n    props = {\n        \"CacheDataEncrypted\": (bool, False),\n        \"CacheTtlInSeconds\": (positive_integer, False),\n        \"CachingEnabled\": (bool, False),\n        \"DataTraceEnabled\": (bool, False),\n        \"HttpMethod\": (basestring, True),\n        \"LoggingLevel\": (basestring, False),\n        \"MetricsEnabled\": (bool, False),\n        \"ResourcePath\": (basestring, True),\n        \"ThrottlingBurstLimit\": (positive_integer, False),\n        \"ThrottlingRateLimit\": (positive_integer, False)\n    }\n\n\nclass StageDescription(AWSProperty):\n\n    props = {\n        \"CacheClusterEnabled\": (bool, False),\n        \"CacheClusterSize\": (basestring, False),\n        \"CacheDataEncrypted\": (bool, False),\n        \"CacheTtlInSeconds\": (positive_integer, False),\n        \"CachingEnabled\": (bool, False),\n        \"ClientCertificateId\": (basestring, False),\n        \"DataTraceEnabled\": (bool, False),\n        \"Description\": (basestring, False),\n        \"LoggingLevel\": (basestring, False),\n        \"MethodSettings\": ([MethodSetting], False),\n        \"MetricsEnabled\": (bool, False),\n        \"StageName\": (basestring, False),\n        \"ThrottlingBurstLimit\": (positive_integer, False),\n        \"ThrottlingRateLimit\": (positive_integer, False),\n        \"Variables\": (dict, False)\n    }\n\n\nclass Deployment(AWSObject):\n    resource_type = \"AWS::ApiGateway::Deployment\"\n\n    props = {\n        \"Description\": (basestring, False),\n        \"RestApiId\": (basestring, True),\n        \"StageDescription\": (StageDescription, False),\n        \"StageName\": (basestring, False)\n    }\n\n\nclass IntegrationResponse(AWSProperty):\n\n    props = {\n        \"ResponseParameters\": (dict, False),\n        \"ResponseTemplates\": (dict, False),\n        \"SelectionPattern\": (basestring, False),\n        \"StatusCode\": (basestring, False)\n    }\n\n\nclass Integration(AWSProperty):\n\n    props = {\n        \"CacheKeyParameters\": ([basestring], False),\n        \"CacheNamespace\": (basestring, False),\n        \"Credentials\": (basestring, False),\n        \"IntegrationHttpMethod\": (basestring, False),\n        \"IntegrationResponses\": ([IntegrationResponse], False),\n        \"PassthroughBehavior\": (basestring, False),\n        \"RequestParameters\": (dict, False),\n        \"RequestTemplates\": (dict, False),\n        \"Type\": (basestring, True),\n        \"Uri\": (basestring, False)\n    }\n\n\nclass MethodResponse(AWSProperty):\n\n    props = {\n        \"ResponseModels\": (dict, False),\n        \"ResponseParameters\": (dict, False),\n        \"StatusCode\": (basestring, True)\n    }\n\n\nclass Method(AWSObject):\n    resource_type = \"AWS::ApiGateway::Method\"\n\n    props = {\n        \"ApiKeyRequired\": (bool, False),\n        \"AuthorizationType\": (basestring, True),\n        \"AuthorizerId\": (basestring, False),\n        \"HttpMethod\": (basestring, True),\n        \"Integration\": (Integration, False),\n        \"MethodResponses\": ([MethodResponse], False),\n        \"RequestModels\": (dict, False),\n        \"RequestParameters\": (dict, False),\n        \"ResourceId\": (basestring, True),\n        \"RestApiId\": (basestring, True)\n    }\n\n\nclass Model(AWSObject):\n    resource_type = \"AWS::ApiGateway::Model\"\n\n    props = {\n        \"ContentType\": (basestring, False),\n        \"Description\": (basestring, False),\n        \"Name\": (basestring, False),\n        \"RestApiId\": (basestring, True),\n        \"Schema\": ((basestring, dict), False)\n    }\n\n    def validate(self):\n        if 'Schema' in self.properties:\n            schema = self.properties.get('Schema')\n            if isinstance(schema, basestring):\n                # Verify it is a valid json string\n                json.loads(schema)\n            elif isinstance(schema, dict):\n                # Convert the dict to a basestring\n                self.properties['Schema'] = json.dumps(schema)\n            elif isinstance(schema, AWSHelperFn):\n                pass\n            else:\n                raise ValueError(\"Schema must be a str or dict\")\n\n\nclass Resource(AWSObject):\n    resource_type = \"AWS::ApiGateway::Resource\"\n\n    props = {\n        \"ParentId\": (basestring, True),\n        \"PathPart\": (basestring, True),\n        \"RestApiId\": (basestring, True)\n    }\n\n\nclass S3Location(AWSProperty):\n\n    props = {\n        \"Bucket\": (basestring, False),\n        \"ETag\": (basestring, False),\n        \"Key\": (basestring, False),\n        \"Version\": (basestring, False)\n    }\n\n\nclass RestApi(AWSObject):\n    resource_type = \"AWS::ApiGateway::RestApi\"\n\n    props = {\n        \"Body\": (dict, False),\n        \"BodyS3Location\": (S3Location, False),\n        \"CloneFrom\": (basestring, False),\n        \"Description\": (basestring, False),\n        \"FailOnWarnings\": (basestring, False),\n        \"Name\": (basestring, False),\n        \"Parameters\": ([basestring], False)\n    }\n\n\nclass Stage(AWSObject):\n    resource_type = \"AWS::ApiGateway::Stage\"\n\n    props = {\n        \"CacheClusterEnabled\": (bool, False),\n        \"CacheClusterSize\": (basestring, False),\n        \"ClientCertificateId\": (basestring, False),\n        \"DeploymentId\": (basestring, True),\n        \"Description\": (basestring, False),\n        \"MethodSettings\": ([MethodSetting], False),\n        \"RestApiId\": (basestring, True),\n        \"StageName\": (basestring, True),\n        \"Variables\": (dict, False)\n    }\n\n\nclass ApiStage(AWSProperty):\n    props = {\n        \"ApiId\": (basestring, False),\n        \"Stage\": (basestring, False),\n    }\n\n\nclass QuotaSettings(AWSProperty):\n    props = {\n        \"Limit\": (positive_integer, False),\n        \"Offset\": (positive_integer, False),\n        \"Period\": (basestring, False),\n    }\n\n\nclass ThrottleSettings(AWSProperty):\n    props = {\n        \"BurstLimit\": (positive_integer, False),\n        \"RateLimit\": (positive_integer, False),\n    }\n\n\nclass UsagePlan(AWSObject):\n    resource_type = \"AWS::ApiGateway::UsagePlan\"\n\n    props = {\n        \"ApiStages\": ([ApiStage], False),\n        \"Description\": (basestring, False),\n        \"Quota\": (QuotaSettings, False),\n        \"Throttle\": (ThrottleSettings, False),\n        \"UsagePlanName\": (basestring, False),\n    }\n", "path": "troposphere/apigateway.py"}]}