File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -29,12 +29,17 @@ def __init__(self, zap):
29
29
30
30
def import_file (self , file , apikey = '' ):
31
31
"""
32
+ Import an Open API definition from a local file.
32
33
This component is optional and therefore the API will only work if it is installed
33
34
"""
34
35
return six .next (six .itervalues (self .zap ._request (self .zap .base + 'openapi/action/importFile/' , {'file' : file , 'apikey' : apikey })))
35
36
36
- def import_url (self , url , apikey = '' ):
37
+ def import_url (self , url , hostoverride = None , apikey = '' ):
37
38
"""
39
+ Import an Open API definition from a URL, hostOverride allows the host to be replaced
38
40
This component is optional and therefore the API will only work if it is installed
39
41
"""
40
- return six .next (six .itervalues (self .zap ._request (self .zap .base + 'openapi/action/importUrl/' , {'url' : url , 'apikey' : apikey })))
42
+ params = {'url' : url , 'apikey' : apikey }
43
+ if hostoverride is not None :
44
+ params ['hostOverride' ] = hostoverride
45
+ return six .next (six .itervalues (self .zap ._request (self .zap .base + 'openapi/action/importUrl/' , params )))
You can’t perform that action at this time.
0 commit comments