Skip to content

Commit 52e6a5f

Browse files
authored
Add scopes to JS and TS docs (#891)
Update js and ts to include route scopes in their doc strings.
1 parent e733cd9 commit 52e6a5f

File tree

5 files changed

+1524
-261
lines changed

5 files changed

+1524
-261
lines changed

generator/generate_routes.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,13 @@ def main():
8484

8585
if verbose:
8686
print('Generating JS client routes for user routes')
87-
subprocess.check_output(
87+
o = subprocess.check_output(
8888
(['python3', '-m', 'stone.cli', 'js_client', dropbox_pkg_path] +
89-
specs + ['-a', 'host', '-a', 'style', '-a', 'auth'] +
90-
['--', 'routes.js', '-c', 'Dropbox', '--wrap-response-in', 'DropboxResponse', '--wrap-error-in', 'DropboxResponseError']),
89+
specs + ['-a', 'host', '-a', 'style', '-a', 'auth', '-a', 'scope'] +
90+
['--', 'routes.js', '-c', 'Dropbox', '--wrap-response-in', 'DropboxResponse', '--wrap-error-in', 'DropboxResponseError', '-a', 'scope']),
9191
cwd=stone_path)
92+
if verbose:
93+
print(o)
9294

9395
if verbose:
9496
print('Generating TSD types')
@@ -102,8 +104,8 @@ def main():
102104
print('Generating TSD client routes for user routes')
103105
subprocess.check_output(
104106
(['python3', '-m', 'stone.cli', 'tsd_client', typescript_template_path] +
105-
specs + ['-a', 'host', '-a', 'style'] +
106-
['--', 'index.d.tstemplate', 'index.d.ts', '--wrap-response-in', 'DropboxResponse', '--wrap-error-in', 'DropboxResponseError', '--import-namespaces', '--types-file', './dropbox_types']),
107+
specs + ['-a', 'host', '-a', 'style', '-a', 'scope'] +
108+
['--', 'index.d.tstemplate', 'index.d.ts', '--wrap-response-in', 'DropboxResponse', '--wrap-error-in', 'DropboxResponseError', '--import-namespaces', '--types-file', './dropbox_types', '-a', 'scope']),
107109
cwd=stone_path)
108110

109111
typescript_generated_files = glob.glob('typescript/*.d.ts')

0 commit comments

Comments
 (0)