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):
2929
3030 def import_file (self , file , apikey = '' ):
3131 """
32+ Import an Open API definition from a local file.
3233 This component is optional and therefore the API will only work if it is installed
3334 """
3435 return six .next (six .itervalues (self .zap ._request (self .zap .base + 'openapi/action/importFile/' , {'file' : file , 'apikey' : apikey })))
3536
36- def import_url (self , url , apikey = '' ):
37+ def import_url (self , url , hostoverride = None , apikey = '' ):
3738 """
39+ Import an Open API definition from a URL, hostOverride allows the host to be replaced
3840 This component is optional and therefore the API will only work if it is installed
3941 """
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