# enunciate-docs **Repository Path**: wf2311/enunciate-docs ## Basic Information - **Project Name**: enunciate-docs - **Description**: No description available - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2017-10-30 - **Last Updated**: 2020-12-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 项目简介 [`enunciate`][1]是一款基于Java Web项目根据`java-doc`快速生成接口文档的使用工具,官方项目地址:[https://github.com/stoicflame/enunciate][2],官方网址:[http://enunciate.webcohesion.com/][3]。具体文档可参考`enunciate`的[wiki][4]。 本项目fork自[enunciate/doc][5],对首页的接口列表显示进行了部分优化: 1. 增加显示接口的`描述`和`版本`; 2. 点击接口可跳转到具体的接口详情; 3. 分离同路径不同请求方式且不同功能的接口显示(原项目中是同路径不同请求方式不管功能同不同都合并为同一条数据显示); # 快速开始 以springmvc项目为例: 1. 在`pom.xml`项目中引入如下代码片段: ``` 2.10.0 com.webcohesion.enunciate enunciate-slim-maven-plugin ${enunciate.version} docs ${project.basedir}/enunciate.xml ${project.build.directory}/generated-resources/static/rest 1.8 1.8 com.webcohesion.enunciate enunciate-docs ${enunciate.version}-C com.webcohesion.enunciate enunciate-spring-web ${enunciate.version} com.webcohesion.enunciate enunciate-jackson ${enunciate.version} com.webcohesion.enunciate enunciate-swagger ${enunciate.version} ``` 根据上述配置在项目的根目录下建立配置文件`enunciate.xml`,具体配置可参考[官方示例项目][6]以及[wiki][7],也可以不创建配置文件,使用默认配置; 2. 在相关的接口上以`javadoc`规范编写注释说明; 3. 在当先项目路径下以命令行运行命令`mvn -DskipTests clean package`,运行成功后,在项目的`/target/generated-resources/static/rest`目录下就生成了相应的接口文档。 **目前仅测试了`springmvc`以及`springboot`项目下的使用**。 [1]: https://github.com/stoicflame/enunciate [2]: https://github.com/stoicflame/enunciate [3]: http://enunciate.webcohesion.com/ [4]: https://github.com/stoicflame/enunciate/wiki [5]: https://github.com/stoicflame/enunciate/tree/v2.10.0/docs [6]: https://github.com/stoicflame/enunciate-sample [7]: https://github.com/stoicflame/enunciate/wiki/User-Guide