a tools for sphinx gen doc from rest api
Project description
a tools for sphinx gen doc from json api
Overview
Add a longer description here.
INSTALL
pip install sphinxcontrib-sphinx-rest-api-doc
Basic usage
.. rest: path_to_model.json
example in model file
{
"title": "测试资源",
"desc": "测试测试测试",
"method": {
"get": {
"list": false,
"path": "/api/xx/xx/xx",
"params": {
"id":"ddede"
},
"desc": "dwdwedewfeferferferferfewr",
"headers": {
"auth":"auth"
},
"codes": {
"400":"de",
"200":"2"
}
}
},
"model": {
"id":"",
"desc":"dede"
}
}
CONFIG
in config.py
extensions += ['sphinxcontrib.SphinxRest',]
rest_api_source_root = os.path.join(PROJECT_DIR, "_static", "models")
rest_api_domain = "timger.com.cn"
rest_api_http_request_example_title = "Request Example"
rest_api_http_response_example_title = "Response Example"
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for sphinxcontrib-sphinx-rest-api-doc-0.0.11.dev15.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c45a7fc42703536b01ffec54ba903bfe11c90e21a3e4c2eb2b66fb02915f66c |
|
MD5 | 1cca7181e7dea0bea2231b1365b914a0 |
|
BLAKE2b-256 | 5f6ef78608b4ad92c643215069dbf0a63e13cb82cb48f7a635f673e5327b9a01 |