21132: Note ArvadosAPIClient is a Resource
authorBrett Smith <brett.smith@curii.com>
Sat, 18 Nov 2023 17:22:54 +0000 (12:22 -0500)
committerBrett Smith <brett.smith@curii.com>
Sat, 18 Nov 2023 17:22:54 +0000 (12:22 -0500)
The real impact of this change is marginal, but it establishes a pattern
for documenting request objects, which will be more substantial.

Arvados-DCO-1.1-Signed-off-by: Brett Smith <brett.smith@curii.com>

sdk/python/discovery2pydoc.py

index d2f206c80f2e70b3b6d1df7cdf7a0068936bcd57..e37784e06dbcd72b29f64283812504338ccd918a 100755 (executable)
@@ -95,6 +95,7 @@ to list the specific keys you need. Refer to the API documentation for details.
 '''
 
 _MODULE_PRELUDE = '''
+import googleapiclient.discovery
 import sys
 from typing import Any, Dict, List
 if sys.version_info < (3, 8):
@@ -354,7 +355,7 @@ def main(arglist: Optional[Sequence[str]]=None) -> int:
     for name, resource_spec in resources:
         print(document_resource(name, resource_spec), file=args.out_file)
 
-    print('''class ArvadosAPIClient:''', file=args.out_file)
+    print('''class ArvadosAPIClient(googleapiclient.discovery.Resource):''', file=args.out_file)
     for name, _ in resources:
         class_name = classify_name(name)
         docstring = f"Return an instance of `{class_name}` to call methods via this client"