开源的api文档管理系统

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

开源的api⽂档管理系统
1、国外的话Swagger
swagger-ui
2、国内的Showdoc
国内开源的⾮常好⽤的⼀款API⽂档管理系统,安装也⾮常⽅便,只需将源代码放到项⽬⽬录下⾃动安装运⾏即可,不要要注意PHP版本必须⼤于5.3.
3、界⾯简洁功能强⼤的EOAPI
5、postMan
6、docute: ⽆需编译的⽂档撰写⼯具
像 gitbook 之类的⼯具需要编译后发布,⽽ docute 让你直接写 markdown ⽂件作为⽂档来显⽰⽽不需要编译成 html 这⼀步,你的⽂档⽬录⾥只需要⼀个⾸页 index.html 和你的配置⽂件 config.js。

docute 会直接渲染这些 markdown ⽂件为⼀个单页应⽤。

配合 github pages 发布到 ./docs ⽬录效果更佳,当然发布到任何地⽅都可以。

7、SmartWiki 接⼝⽂档在线管理系统
8、SosoApi
SosoApi,编辑Swagger UI的神器
9、CrapApi开源接⼝管理系统演⽰地址
CrapApi:⼀个由angularjs+bootstrap+springMVC搭建的⾼性能的免费开源的API接⼝、⽂档管理系统(应⽤接⼝管理系统)
主要功能:api接⼝管理、数据字典管理、接⼝数据模拟、接⼝⽂档管理(⽀持markdown、kindereditor等编辑器)、⽀持本地部署或在线使⽤、⽀持通过建表语句导⼊数据字典...
其他功能:项⽬管理、⽤户管理、模块管理、接⼝管理、接⼝版本管理、接⼝拷贝、接⼝⽂档pdf下载、接⼝mock、模块加密访问、
接⼝在线调试、数据字典管理、数据字典加密访问多管理员、多权限、多⾓⾊管理、⾃定义菜单、⾃定义⽹站样式、⽂档留⾔、
错误码管理、接⼝排序、DOC、PDF、TEXT、EXCEL等资源管理、⽀持版本号控制、⽂档内容检索、操作⽇志记录、
根据⽇志恢复数据、markdown编辑器、kindeditor编辑器、angularjs编辑器、Lucene搜索、项⽬成员管理...
11、Web API⽂档⽣成⼯具apidoc
这个需要在编辑后⽣成静态的HTML页⾯,然后上传到服务器。

使⽤apidoc ⽣成Restful web Api⽂档
NodeJS、NPM安装配置步骤(windows版本)
Apidoc安装与使⽤
具体步骤:
Windows安装⽅法:
1、官⽹下载Node
2、安装
3、将npm 替换为淘宝镜像cnpm
C:\Users\Administrator>npm install -g cnpm --registry=https://
4、使⽤cnpm安装apidoc
C:\Users\Administrator>cnpm install apidoc -g
安装的地址:
[apidoc@0.17.5] link C:\Users\Administrator\AppData\Roaming\npm\apidoc@ -> C:\Users\Administrator\AppData\Roaming\npm\node_modules\apidoc\bin\apidoc
C:\Users\Administrator\AppData\Roaming\npm\node_modules\apidoc
apidoc 监视⽂件变动⾃动⽣成⼯具
监控api_doc.json⽂件改变,然后⾃动⽣成HTML
watch.js⽂件,然后node 执⾏该⽂件
/**
* watch.js
* Created by lincoln on 16-1-6.
*/
var gaze = require('gaze');
var exec = require('child_process').exec;
var fs = require('fs')
var fs = require('fs')
function init(){
fs.mkdirSync('./api');
fs.mkdirSync('./doc');
createConfigureFile();
beginWatch();
}
/**
{
'name': '测试',
'version': '0.0.1',
'description': 'API⽂档测试',
'title': 'API⽂档测试',
'url' : 'http://121.41.44.218',
'sampleUrl' : 'http://121.41.44.218',
'template':{
'forceLanguage':'zh-cn'
}
}
*/
function createConfigureFile(){
var configure = {
'name': '测试',
'version': '0.0.1',
'description': 'API⽂档测试',
'title': 'API⽂档测试',
'url' : 'http://xxxxxx',
'sampleUrl' : 'http://xxx',
'template':{
'forceLanguage':'zh-cn'
}
}
fs.writeFileSync('./api/apidoc.json',JSON.stringify(configure));
}
function beginWatch(){
gaze('./api/*.*',function(error,watcher){
this.on('all', function(event, filepath) {
console.log(filepath + ' was ' + event);
runGeneartion();
})
});
}
function runGeneartion(){
var com = exec('apidoc -i ./api -o ./doc ')
com.stdout.on('data', function (data) {
console.log('⽣成Api->'+data);
});
com.stderr.on('data', function (data) {
console.log('⽣成错误啦->' + data);
});
}
if(fs.existsSync('./api') && fs.existsSync('./doc')){
beginWatch();
}else{
init();
}
安装gaze包,然后执⾏watch.js⽂件:
➜ apidoc cnpm install gaze [gaze@*] installed at node_modules/.1.1.2@gaze (14 packages, use 2s, speed 54.93kB/s, json 85.75kB, tarball 0B) All packages installed (14 packages installed from npm registry, use 2s, speed 54.62kB/s, json 17(85.75kB), tarball 0B) ➜ apidoc node watch.js /WEB/apidoc/api/apidoc.json was changed ⽣成Api->info: Done.
api参数:
Usage: C:\Program Files\nodejs\node.exe apidoc [options]
Options:
-f, --file-filters RegEx-Filter to select files that should be parsed (multiple -f can be used)
-e, --exclude-filters RegEx-Filter to select files / dirs that should not be parsed (many -e can b
-i, --input Input / source dirname. [./]
-o, --output Output dirname. [./doc/]
-t, --template Use template for output files. [C:\Users\Administrator\AppData\Roaming\npm -c, --config Path to directory containing config file (apidoc.json) [./] -p, --private Include private APIs in output. [false]
-v, --verbose Verbose debug output. [false]
-h, --help Show this help information.
--debug Show debug messages. [false]
--color Turn off log color. [true]
--parse Parse only the files and return the data, no file creation. [false]
--parse-filters Optional user defined filters. Format name=filename
--parse-languages Optional user defined languages. Format name=filename
--parse-parsers Optional user defined parsers. Format name=filename
--parse-workers Optional user defined workers. Format name=filename
--silent Turn all output off. [false]
--simulate Execute but not write any file. [false]
--markdown Turn off default markdown parser or set a file to a custom parser. [true] --line-ending Turn off autodetect line-ending. Allowed values: LF, CR, CRLF.
--encoding Set the encoding of the source code. [utf8]. [utf8]
执⾏⽣成⽂档命令
D:\code\api_doc>apidoc -i example/ -o doc/ info: Done. D:\POCO\api_doc>。

相关文档
最新文档