File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -406,15 +406,18 @@ def document_api(
406
406
If this parameter is set, the `uri` parameter is ignored and the uri
407
407
will be created from this template.
408
408
"""
409
- # Use the discovery_uri_template to create the uri if provided
409
+ # Use the discovery_uri_template to create the uri if provided,
410
+ # ignoring the `uri` argument of `document_api`
410
411
if discovery_uri_template :
411
412
uri = uritemplate .expand (
412
413
discovery_uri_template , {"api" : name , "apiVersion" : version }
413
414
)
414
-
415
- uri = uri or uritemplate .expand (
416
- FLAGS .discovery_uri_template , {"api" : name , "apiVersion" : version }
417
- )
415
+ else :
416
+ # Use `uri` argument of `document_api` or
417
+ # create the uri from `FLAGS.discovery_uri_template`
418
+ uri = uri or uritemplate .expand (
419
+ FLAGS .discovery_uri_template , {"api" : name , "apiVersion" : version }
420
+ )
418
421
419
422
http = build_http ()
420
423
resp , content = http .request (uri )
You can’t perform that action at this time.
0 commit comments