Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

An example of automatic generation of interface documents by composer

Shulou Source: shulou.com Published: 2022-06-02 15:04:33 11月14日 Update

This article mainly introduces the example of composer automatic generation interface document, the article is very detailed, has a certain reference value, interested friends must read it!

Install composer

1. First download Composer-Setup.exe, download address: download Composer. The installation path of PHP.exe is automatically searched, and if not, the php.exe under the path of php is found manually.

two。 In the PHP directory, open the php.ini file and open the openssl extension. Remove the semicolon (;) before extension=php_openssl.dll

3. Add the php directory to the environment variable (the path to the same level directory as php.exe) for example: d:\ apache_php\ php to the environment variable path.

4. Download composer.phar, download address: Composer.phar places the composer.phar file in the php directory, and create a new file composer.cmd in the php directory, which is written as follows:

@ php "% ~ dp0composer.phar"% * Save. Run this file, then open cmd run: composer will appear

You can run composer-- version to see the version of composer.

5. Execute on the command line: composer config-g repo.packagist composer https://packagist.phpcomposer.com

Rewrite the Packagist image to the domestic image to speed up the download.

Finally, take a look at the Chinese manual http://www.kancloud.cn/thinkphp/composer of composer on the cloud.

Automatically generate interface documents (https://packagist.org/packages/weiwei/api-doc) through composer installation software

Cmd enter the project directory and enter composer require weiwei/api-doc.

(TP5) / application/extra/view/doc.php:

Tags: Goods interfaces documents generation directories parameters files types automatic generation content pictures paths runs examples prices information global variables addresses characters Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno vpn Huawei MySQL Redmi Microsoft