Skip to content

Commit

Permalink
Add scope to client docs (#408)
Browse files Browse the repository at this point in the history
Adds the "scope" attribute to the exported clients, so that they appear in the docstrings of routes that have a scope defined.

After running:

```
python generate_base_client.py
tox -e docs
```

I checked the html build files and scopes are showing up as expected.
  • Loading branch information
sderickson authored Jan 25, 2022
1 parent 62e49c1 commit 2f8899f
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions generate_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,29 @@ def main():

o = subprocess.check_output(
(['python', '-m', 'stone.cli', 'python_client', dropbox_pkg_path] +
specs + ['-a', 'host', '-a', 'style', '-a', 'auth'] +
['--', '-w', 'user,app,noauth', '-m', 'base', '-c', 'DropboxBase', '-t', 'dropbox']))
specs + ['-a', 'host', '-a', 'style', '-a', 'auth', '-a', 'scope'] +
[
'--',
'-w', 'user,app,noauth',
'-m', 'base',
'-c', 'DropboxBase',
'-t', 'dropbox',
'-a', 'scope'
]))
if o:
print('Output:', o)

o = subprocess.check_output(
(['python', '-m', 'stone.cli', 'python_client', dropbox_pkg_path] +
specs + ['-a', 'host', '-a', 'style', '-a', 'auth'] +
['--', '-w', 'team', '-m', 'base_team', '-c', 'DropboxTeamBase', '-t', 'dropbox']))
specs + ['-a', 'host', '-a', 'style', '-a', 'auth', '-a', 'scope'] +
[
'--',
'-w', 'team',
'-m', 'base_team',
'-c', 'DropboxTeamBase',
'-t', 'dropbox',
'-a', 'scope'
]))
if o:
print('Output:', o)

Expand Down

0 comments on commit 2f8899f

Please sign in to comment.