PHPackages                             hg/apidoc-thinkphp - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. hg/apidoc-thinkphp

ActiveThink-extend[API Development](/categories/api)

hg/apidoc-thinkphp
==================

thinkphp API文档自动生成

v3.1.9(3y ago)1291.9k26[16 issues](https://github.com/HGthecode/thinkphp-apidoc/issues)MITPHPPHP &gt;=7.1.0

Since Jun 4Pushed 3y ago2 watchersCompare

[ Source](https://github.com/HGthecode/thinkphp-apidoc)[ Packagist](https://packagist.org/packages/hg/apidoc-thinkphp)[ RSS](/packages/hg-apidoc-thinkphp/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (2)Versions (54)Used By (0)

注意、注意、注意！！！
============

[](#注意注意注意)

本项目已迁移至  ，全新Apidoc兼容ThinkPHP、Laravel、Hyperf、Webman等基于Composer的PHP框架，更多实用功能。本项目不再维护，请移步新项目。

 [![](https://camo.githubusercontent.com/085ef2f041b154b199b3bc4d3e641ba8b581b456e3647359339365e110f19a6d/68747470733a2f2f617069646f632e64656d6f2e68672d636f64652e636f6d2f696d616765732f6c6f676f2e706e67)](https://camo.githubusercontent.com/085ef2f041b154b199b3bc4d3e641ba8b581b456e3647359339365e110f19a6d/68747470733a2f2f617069646f632e64656d6f2e68672d636f64652e636f6d2f696d616765732f6c6f676f2e706e67)

 ThinkPHP ApiDoc
=================

[](#--thinkphp-apidoc)

 基于 ThinkPHP 的API接口开发工具

[![](https://camo.githubusercontent.com/a2dd63843a0083bb13e7ba583b98af7247deb0f5594e7369afd1a4026b22ac7a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68672f617069646f63)](https://packagist.org/packages/hg/apidoc)[![](https://camo.githubusercontent.com/41cef39ba980fdca314ffb1ac412e7182957dead120d42ffb0bed31da4f721b1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68672f617069646f63)](https://packagist.org/packages/hg/apidoc)[![](https://camo.githubusercontent.com/bc5f8472863383705d29e5994289fbf3e8b5cb770899018ddcb6686b52330013/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f68672f617069646f63)](https://packagist.org/packages/hg/apidoc)[![](https://camo.githubusercontent.com/a815c31b27d851aa0a17bfb65e09f716ab675558c3b8c68f4725b82c5e85f327/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f4847746865636f64652f7468696e6b7068702d617069646f63)](https://github.com/HGthecode/thinkphp-apidoc)[![](https://camo.githubusercontent.com/95889f6e9a9a62c805fdee55b2056d1edcd8661616f1b1a0e4b1814f83393362/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f4847746865636f64652f7468696e6b7068702d617069646f63)](https://github.com/HGthecode/thinkphp-apidoc)

🤷‍♀️ Apidoc是什么？
---------------

[](#‍️-apidoc是什么)

如今，前后端分离的开发模式以必不可少，基于ThinkPHP可以很方便的作为Api接口的开发。可是一个Api开发过程中需要快速调试，开发完成后需要给其它开发者对接等，这时一个功能全面的Api文档工具，就显得特别重要。

大多数开发者可能都是通过各种工具配合来达到这一目的，其各种工具的安装和配置也是繁琐。甚至还有通过word等文本工具手写api文档的，这样的开发效率与可维护性是非常差的。

综合种种Api开发中的痛点，我们专为ThinkPHP开发了Apidoc的扩展，本插件可通过简单的注解即可生成Api文档，及帮助开发者提高生产效率的在线调试、快速生成Crud、一键生成整个模块Api等，涵盖Api开发方方面面。

✨特性
---

[](#特性)

- 开箱即用：无繁杂的配置、安装后按文档编写注释即可自动生成API文档。
- 在线调试：在线文档可直接调试，支持全局参数、Mock调试数据、事件执行，接口调试省时省力。
- 轻松使用：支持公共注释定义、业务逻辑层、数据表字段等引用，几句注释即可完成。
- 安全高效：支持访问密码验证、应用/版本独立密码；支持文档缓存。
- 多应用/多版本：可适应各种单应用、多应用、多版本的项目的Api管理。
- Markdown文档：支持.md文件的文档展示。
- 控制器分组：支持控制器多级分组，更精细化管理接口目录。
- 多语言：可结合TP多语言能力，实现接口文档的语言切换。

📌兼容
---

[](#兼容)

ThinkPHP 5.1

ThinkPHP 6.x

📖使用文档
-----

[](#使用文档)

[ThinkPHP ApiDoc V3.x文档](https://hg-code.gitee.io/thinkphp-apidoc/)

🏆支持我们
-----

[](#支持我们)

如果本项目对您有所帮助，请点个Star支持我们

- [Github](https://github.com/HGthecode/thinkphp-apidoc) -&gt; [![Star me on GitHub](https://camo.githubusercontent.com/3c4e6870a037d16ca2b10f9b4c2ff0cfd4c50fe833e2f21e2097c8c102495981/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f4847746865636f64652f7468696e6b7068702d617069646f633f7374796c653d736f6369616c)](https://github.com/HGthecode/thinkphp-apidoc)
- [Gitee](https://gitee.com/hg-code/thinkphp-apidoc) -&gt; [![star](https://camo.githubusercontent.com/cbbf72135870e90685ce43eca201df19dc639b656ffe14ea2331a251782de84f/68747470733a2f2f67697465652e636f6d2f68672d636f64652f7468696e6b7068702d617069646f632f62616467652f737461722e737667)](https://gitee.com/hg-code/thinkphp-apidoc/stargazers)

💡鸣谢
---

[](#鸣谢)

[ThinkPHP](http://www.thinkphp.cn/)

[doctrine/annotations](https://github.com/doctrine/annotations)

🔗链接
---

[](#链接)

[ApiDoc UI](https://github.com/HGthecode/apidoc-ui)

[ApiDoc Demo](https://github.com/HGthecode/thinkphp-apidoc-demo)

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~15 days

Recently: every ~39 days

Total

53

Last Release

1398d ago

Major Versions

v1.1.1 → v2.0.02021-01-22

v1.x-dev → v2.1.32021-02-22

v2.6.1 → v3.0.02021-08-30

PHP version history (2 changes)v1.0.1PHP &gt;=7.1.0

v1.1.1PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/c4a6183ebb107c8b91e2096db047bb66b53f106bcefc3282f8165bcd592e1c07?d=identicon)[HGthecode](/maintainers/HGthecode)

---

Top Contributors

[![HGthecode](https://avatars.githubusercontent.com/u/36032426?v=4)](https://github.com/HGthecode "HGthecode (73 commits)")

---

Tags

phpapimarkdownthinkphpapidocPHP-API

### Embed Badge

![Health badge](/badges/hg-apidoc-thinkphp/health.svg)

```
[![Health](https://phpackages.com/badges/hg-apidoc-thinkphp/health.svg)](https://phpackages.com/packages/hg-apidoc-thinkphp)
```

###  Alternatives

[hg/apidoc

根据注解生成API文档，兼容Laravel、ThinkPHP、Hyperf、Webman等框架；在线调试、Markdown文档、多应用/多版本、Mock数据、授权访问、接口生成器、代码生成器等众多实用功能

22090.3k1](/packages/hg-apidoc)[allure-framework/allure-php-api

Allure PHP commons

3411.3M7](/packages/allure-framework-allure-php-api)[webit/w-firma-api

wFirma.pl API

1821.5k](/packages/webit-w-firma-api)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
