I have been using swagger and other tools to generate API documents, which can be cumbersome to install and configure, and some need to write a large number of comments to generate an interface, so I have the idea of developing an extension for Thinkphp to automatically generate documents according to comments. Now, the plug-in has been completed, and has been used in a number of projects, the use effect is very good, I recommend to you, I hope to help you.

features

  • Out of the box, annotate the installation according to the documentation.
  • Version management, can generate different versions of API interface documents, arbitrary switch.
  • Multiple applications and single applications are compatible.
  • Supports controller group to achieve multi-module management.
  • Rich common annotation definitions, business logic layers, model references.
  • According to the reference model, data table field annotations can be obtained to generate parameter documents.
  • Support configuration, API document page access requires password authentication.
  • Support online debugging, and set the global request header Authorize, interface debugging time and effort.
  • Support cache interface data, no need to generate a data every time access, more can be switched at any time.
  • Complete documentation and use examples.

Documentation and Examples

GitHub address: github.com/HGthecode/t…

The official documentation address: hgthecode. Making. IO/thinkphp – ap…

Example address: apidoc.demo.hg-code.com/apidoc/

Installation and use of the above documents have been described in detail, here will not repeat, please go to the official website to view