-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Web] Add new webapi endpoint and interactive webapi docs with Swagge…
…r-UI The new webapi served on /api creates separate endpoints for each exported python function, e.g. api/web/login Webapi functions are exported with webapi = WebapiNamespace("Webapi") @webapi.post def exported_post_func(self, arg): ... @webapi.get def exported_get_func(self): ... The interactive webapi documenation is generated with swagger-ui and served on http://0.0.0.0:8112/webapidoc The function doc of the exported functions is parsed with GoogleStyleDocPlugin that relies on 'docstring_parser' which only supported on python >= 3.6. With python < 3.6, these doc strings are not included in the api docs.
- Loading branch information
Showing
19 changed files
with
1,565 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
|
||
from __future__ import unicode_literals | ||
|
||
import os | ||
import tempfile | ||
from email.utils import formatdate | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.