Skip to content

Remove FLAGS.discovery_uri_template from function document_api #2444

@parthea

Description

@parthea

See review feedback from PR #2443 where FLAGS shouldn't be referenced directly in functions.

See the code below, specifically line 410 where we have FLAGS.discovery_uri_template

def document_api(
name, version, uri, doc_destination_dir, artifact_destination_dir=DISCOVERY_DOC_DIR
):
"""Document the given API.
Args:
name (str): Name of the API.
version (str): Version of the API.
uri (str): URI of the API's discovery document
doc_destination_dir (str): relative path where the reference
documentation should be saved.
artifact_destination_dir (str): relative path where the discovery
artifacts should be saved.
"""
http = build_http()
resp, content = http.request(
uri
or uritemplate.expand(
FLAGS.discovery_uri_template, {"api": name, "apiVersion": version}
)
)

Metadata

Metadata

Assignees

Labels

type: cleanupAn internal cleanup or hygiene concern.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions