Download the PHP package xianrenqh/apidoc2-webman without Composer

On this page you can find all versions of the php package xianrenqh/apidoc2-webman. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package apidoc2-webman

api-doc-Webman

webman 版本的 api-doc

扒拉的 ThinkPHP ApiDoc ,改成了webman版本的,部分功能可能无法使用(去掉了缓存、多语言)。

ThinkPHP ApiDoc官网:

https://hg-code.gitee.io/thinkphp-apidoc/guide/

安装

composer require xianrenqh/apidoc2-webman

访问:

文档默认地址为:

http://127.0.0.1:8787/apidoc/index.html

可以在config里面进行更改路由:

路由配置文件地址:

\config\plugin\xianrenqh\apidoc2-webman\route.php

apidoc基本配置文件:

config/plugin/xianrenqh/apidoc2-webman/apidoc.php

Nginx反向代理问题

解决nginx反向代理后页面上的js/css文件无法加载的方法:

问题现象:

nginx配置反向代理后,网页可以正常访问,但是页面上的js、css和图片等资源都无法访问。

解决方法:

nginx配置文件中,修改为如下配置:

(宝塔的话:找到站点,设置,配置文件里修改)

需要把静态文件也添加反向代理设置。

简单使用案例:

官网教程地址:

https://hg-code.gitee.io/thinkphp-apidoc/use/

1、编辑apidoc.php文件:

找到config/plugin/xianrenqh/apidoc2-webman/apidoc.php文件并编辑:

编辑 apps键(大概第13行-20行)

增加你需要的api的controllers控制器 例如:

2、在控制器中添加注解

打开控制器: app\api\controller\UserController

引入解释文件

注意:在官网中引用的是:

use hg\apidoc\annotation as Apidoc;

我们不要引入上面的, 要引入下面的:

use xianrenqh\Apidoc2Webman\annotation as Apidoc;

换句话说, 官网只要是 use hg\apidoc\annotation, 我们都要替换为:

use xianrenqh\Apidoc2Webman\annotation

控制器注释

为控制器加上一些注释,以让文档可读性更高(当然这不是必须的)

接口注释

控制器中的每一个符合注释规则的方法都会被解析成一个API接口

基础注释

其他参数请在原官网上查看, 这里就不列举了:

https://hg-code.gitee.io/thinkphp-apidoc/use/notes/api/#%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E

✨特性

📖使用文档

ThinkPHP ApiDoc V3.x文档


All versions of apidoc2-webman with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
doctrine/annotations Version ^1.6
symfony/class-loader Version ~3.4.47
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xianrenqh/apidoc2-webman contains the following files

Loading the files please wait ....