Skip to content

Commit 266ea28

Browse files
authored
Add validation for completer jmespaths (aws#9992)
Add validation for completer jmespaths Modified the protocol test `test_completion_files.py` to also verify that all jmespaths in the completers correspond with the model. Also checks that the resulting field is a string, so that autocompletion works correctly. Additionally, removed 306 resource ids and their completions across 53 services. Previously, nearly all of them, if used, would throw an error; the exceptions are a few in CloudFormation which failed silently. If the completions are desired, they can be added back later, but in their current form, they don't work.
1 parent c645308 commit 266ea28

56 files changed

Lines changed: 211 additions & 5030 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"type": "bugfix",
3+
"category": "Autocomplete",
4+
"description": "Removed invalid autocompletion models."
5+
}

awscli/botocore/data/acm-pca/2017-08-22/completions-1.json

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,12 @@
44
"CertificateAuthority": {
55
"operation": "ListCertificateAuthorities",
66
"resourceIdentifier": {
7-
"Status": "CertificateAuthorities[].Status",
8-
"RevocationConfiguration": "CertificateAuthorities[].RevocationConfiguration"
7+
"Status": "CertificateAuthorities[].Status"
98
}
109
}
1110
},
1211
"operations": {
1312
"UpdateCertificateAuthority": {
14-
"RevocationConfiguration": {
15-
"completions": [
16-
{
17-
"parameters": {},
18-
"resourceName": "CertificateAuthority",
19-
"resourceIdentifier": "RevocationConfiguration"
20-
}
21-
]
22-
},
2313
"Status": {
2414
"completions": [
2515
{

awscli/botocore/data/appstream/2016-12-01/completions-1.json

Lines changed: 5 additions & 115 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,26 @@
44
"DirectoryConfig": {
55
"operation": "DescribeDirectoryConfigs",
66
"resourceIdentifier": {
7-
"DirectoryName": "DirectoryConfigs[].DirectoryName",
8-
"OrganizationalUnitDistinguishedNames": "DirectoryConfigs[].OrganizationalUnitDistinguishedNames",
9-
"ServiceAccountCredentials": "DirectoryConfigs[].ServiceAccountCredentials"
7+
"DirectoryName": "DirectoryConfigs[].DirectoryName"
108
}
119
},
1210
"Fleet": {
1311
"operation": "DescribeFleets",
1412
"resourceIdentifier": {
15-
"ImageName": "Fleets[].ImageName",
16-
"MaxUserDurationInSeconds": "Fleets[].MaxUserDurationInSeconds",
17-
"DisconnectTimeoutInSeconds": "Fleets[].DisconnectTimeoutInSeconds"
13+
"ImageName": "Fleets[].ImageName"
1814
}
1915
},
2016
"ImageBuilder": {
2117
"operation": "DescribeImageBuilders",
2218
"resourceIdentifier": {
2319
"ImageArn": "ImageBuilders[].ImageArn",
24-
"VpcConfig": "ImageBuilders[].VpcConfig",
25-
"InstanceType": "ImageBuilders[].InstanceType",
26-
"EnableDefaultInternetAccess": "ImageBuilders[].EnableDefaultInternetAccess",
27-
"DomainJoinInfo": "ImageBuilders[].DomainJoinInfo"
20+
"InstanceType": "ImageBuilders[].InstanceType"
2821
}
2922
},
3023
"Image": {
3124
"operation": "DescribeImages",
3225
"resourceIdentifier": {
33-
"AppstreamAgentVersion": "Images[].AppstreamAgentVersion",
34-
"ImagePermissions": "Images[].ImagePermissions"
26+
"AppstreamAgentVersion": "Images[].AppstreamAgentVersion"
3527
}
3628
},
3729
"Stack": {
@@ -40,11 +32,8 @@
4032
"Name": "Stacks[].Name",
4133
"Description": "Stacks[].Description",
4234
"DisplayName": "Stacks[].DisplayName",
43-
"StorageConnectors": "Stacks[].StorageConnectors",
4435
"RedirectURL": "Stacks[].RedirectURL",
45-
"FeedbackURL": "Stacks[].FeedbackURL",
46-
"UserSettings": "Stacks[].UserSettings",
47-
"ApplicationSettings": "Stacks[].ApplicationSettings"
36+
"FeedbackURL": "Stacks[].FeedbackURL"
4837
}
4938
}
5039
},
@@ -199,24 +188,6 @@
199188
"resourceIdentifier": "DirectoryName"
200189
}
201190
]
202-
},
203-
"OrganizationalUnitDistinguishedNames": {
204-
"completions": [
205-
{
206-
"parameters": {},
207-
"resourceName": "DirectoryConfig",
208-
"resourceIdentifier": "OrganizationalUnitDistinguishedNames"
209-
}
210-
]
211-
},
212-
"ServiceAccountCredentials": {
213-
"completions": [
214-
{
215-
"parameters": {},
216-
"resourceName": "DirectoryConfig",
217-
"resourceIdentifier": "ServiceAccountCredentials"
218-
}
219-
]
220191
}
221192
},
222193
"UpdateFleet": {
@@ -256,33 +227,6 @@
256227
}
257228
]
258229
},
259-
"VpcConfig": {
260-
"completions": [
261-
{
262-
"parameters": {},
263-
"resourceName": "ImageBuilder",
264-
"resourceIdentifier": "VpcConfig"
265-
}
266-
]
267-
},
268-
"MaxUserDurationInSeconds": {
269-
"completions": [
270-
{
271-
"parameters": {},
272-
"resourceName": "Fleet",
273-
"resourceIdentifier": "MaxUserDurationInSeconds"
274-
}
275-
]
276-
},
277-
"DisconnectTimeoutInSeconds": {
278-
"completions": [
279-
{
280-
"parameters": {},
281-
"resourceName": "Fleet",
282-
"resourceIdentifier": "DisconnectTimeoutInSeconds"
283-
}
284-
]
285-
},
286230
"Description": {
287231
"completions": [
288232
{
@@ -300,24 +244,6 @@
300244
"resourceIdentifier": "DisplayName"
301245
}
302246
]
303-
},
304-
"EnableDefaultInternetAccess": {
305-
"completions": [
306-
{
307-
"parameters": {},
308-
"resourceName": "ImageBuilder",
309-
"resourceIdentifier": "EnableDefaultInternetAccess"
310-
}
311-
]
312-
},
313-
"DomainJoinInfo": {
314-
"completions": [
315-
{
316-
"parameters": {},
317-
"resourceName": "ImageBuilder",
318-
"resourceIdentifier": "DomainJoinInfo"
319-
}
320-
]
321247
}
322248
},
323249
"UpdateImagePermissions": {
@@ -329,15 +255,6 @@
329255
"resourceIdentifier": "Name"
330256
}
331257
]
332-
},
333-
"ImagePermissions": {
334-
"completions": [
335-
{
336-
"parameters": {},
337-
"resourceName": "Image",
338-
"resourceIdentifier": "ImagePermissions"
339-
}
340-
]
341258
}
342259
},
343260
"UpdateStack": {
@@ -368,15 +285,6 @@
368285
}
369286
]
370287
},
371-
"StorageConnectors": {
372-
"completions": [
373-
{
374-
"parameters": {},
375-
"resourceName": "Stack",
376-
"resourceIdentifier": "StorageConnectors"
377-
}
378-
]
379-
},
380288
"RedirectURL": {
381289
"completions": [
382290
{
@@ -394,24 +302,6 @@
394302
"resourceIdentifier": "FeedbackURL"
395303
}
396304
]
397-
},
398-
"UserSettings": {
399-
"completions": [
400-
{
401-
"parameters": {},
402-
"resourceName": "Stack",
403-
"resourceIdentifier": "UserSettings"
404-
}
405-
]
406-
},
407-
"ApplicationSettings": {
408-
"completions": [
409-
{
410-
"parameters": {},
411-
"resourceName": "Stack",
412-
"resourceIdentifier": "ApplicationSettings"
413-
}
414-
]
415305
}
416306
}
417307
}

awscli/botocore/data/appsync/2017-07-25/completions-1.json

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@
66
"resourceIdentifier": {
77
"name": "graphqlApis[].name",
88
"apiId": "graphqlApis[].apiId",
9-
"authenticationType": "graphqlApis[].authenticationType",
10-
"logConfig": "graphqlApis[].logConfig",
11-
"userPoolConfig": "graphqlApis[].userPoolConfig",
12-
"openIDConnectConfig": "graphqlApis[].openIDConnectConfig"
9+
"authenticationType": "graphqlApis[].authenticationType"
1310
}
1411
}
1512
},
@@ -258,15 +255,6 @@
258255
}
259256
]
260257
},
261-
"logConfig": {
262-
"completions": [
263-
{
264-
"parameters": {},
265-
"resourceName": "GraphqlApi",
266-
"resourceIdentifier": "logConfig"
267-
}
268-
]
269-
},
270258
"authenticationType": {
271259
"completions": [
272260
{
@@ -275,24 +263,6 @@
275263
"resourceIdentifier": "authenticationType"
276264
}
277265
]
278-
},
279-
"userPoolConfig": {
280-
"completions": [
281-
{
282-
"parameters": {},
283-
"resourceName": "GraphqlApi",
284-
"resourceIdentifier": "userPoolConfig"
285-
}
286-
]
287-
},
288-
"openIDConnectConfig": {
289-
"completions": [
290-
{
291-
"parameters": {},
292-
"resourceName": "GraphqlApi",
293-
"resourceIdentifier": "openIDConnectConfig"
294-
}
295-
]
296266
}
297267
},
298268
"UpdateResolver": {

awscli/botocore/data/autoscaling-plans/2018-01-06/completions-1.json

Lines changed: 1 addition & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
"ScalingPlan": {
55
"operation": "DescribeScalingPlans",
66
"resourceIdentifier": {
7-
"ScalingPlanName": "ScalingPlans[].ScalingPlanName",
8-
"ScalingPlanVersion": "ScalingPlans[].ScalingPlanVersion",
9-
"ApplicationSource": "ScalingPlans[].ApplicationSource",
10-
"ScalingInstructions": "ScalingPlans[].ScalingInstructions"
7+
"ScalingPlanName": "ScalingPlans[].ScalingPlanName"
118
}
129
}
1310
},
@@ -21,15 +18,6 @@
2118
"resourceIdentifier": "ScalingPlanName"
2219
}
2320
]
24-
},
25-
"ScalingPlanVersion": {
26-
"completions": [
27-
{
28-
"parameters": {},
29-
"resourceName": "ScalingPlan",
30-
"resourceIdentifier": "ScalingPlanVersion"
31-
}
32-
]
3321
}
3422
},
3523
"DescribeScalingPlanResources": {
@@ -41,15 +29,6 @@
4129
"resourceIdentifier": "ScalingPlanName"
4230
}
4331
]
44-
},
45-
"ScalingPlanVersion": {
46-
"completions": [
47-
{
48-
"parameters": {},
49-
"resourceName": "ScalingPlan",
50-
"resourceIdentifier": "ScalingPlanVersion"
51-
}
52-
]
5332
}
5433
},
5534
"DescribeScalingPlans": {
@@ -61,36 +40,9 @@
6140
"resourceIdentifier": "ScalingPlanName"
6241
}
6342
]
64-
},
65-
"ScalingPlanVersion": {
66-
"completions": [
67-
{
68-
"parameters": {},
69-
"resourceName": "ScalingPlan",
70-
"resourceIdentifier": "ScalingPlanVersion"
71-
}
72-
]
73-
},
74-
"ApplicationSources": {
75-
"completions": [
76-
{
77-
"parameters": {},
78-
"resourceName": "ScalingPlan",
79-
"resourceIdentifier": "ApplicationSource"
80-
}
81-
]
8243
}
8344
},
8445
"UpdateScalingPlan": {
85-
"ApplicationSource": {
86-
"completions": [
87-
{
88-
"parameters": {},
89-
"resourceName": "ScalingPlan",
90-
"resourceIdentifier": "ApplicationSource"
91-
}
92-
]
93-
},
9446
"ScalingPlanName": {
9547
"completions": [
9648
{
@@ -99,24 +51,6 @@
9951
"resourceIdentifier": "ScalingPlanName"
10052
}
10153
]
102-
},
103-
"ScalingInstructions": {
104-
"completions": [
105-
{
106-
"parameters": {},
107-
"resourceName": "ScalingPlan",
108-
"resourceIdentifier": "ScalingInstructions"
109-
}
110-
]
111-
},
112-
"ScalingPlanVersion": {
113-
"completions": [
114-
{
115-
"parameters": {},
116-
"resourceName": "ScalingPlan",
117-
"resourceIdentifier": "ScalingPlanVersion"
118-
}
119-
]
12054
}
12155
}
12256
}

0 commit comments

Comments
 (0)