Download the PHP package spool/apiinfo without Composer

On this page you can find all versions of the php package spool/apiinfo. 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 apiinfo

apiinfo

介绍

PHP框架API文档生成工具, 无需生成静态文档. 动态生成. 目前完成了基于Laravel的实现.

软件架构

软件架构说明

安装教程

  1. Composer安装

我本人的开发环境是PHP7.3, 目前还没有做向下兼容的测试

运行这个命令添加资源和配置

打开 http://localhost/apiinfo/ 即可看到演示页面。

使用说明

  1. 配置说明

    framework定义使用的框架, 目前只支持Laravel和DingoApi, 以后会逐渐增加对其他框架(如:Lumen、ThinkPHP等)的支持。 default是要扫描的路由前缀分组, 如针对不同的前端有不同的api文档,可以定义多个;如果是Dingo则无所谓。

    prefix定义该分组要扫描的路径前缀, 如果有多个前缀可以定义多个, 都会包含在一个文档页面里。

  2. 配置代码

    config/apiinfo.php

  3. 页面模板

    路径在 /resources/views/vendor/apiinfo 可以修改. 另希望能有前端贡献好看的页面模板

  4. 文档生成

    样例控制器在 vendor/spool/apiinfo/src/Controllers/ExampleController.php 里面, 可以参照这个控制器来编写文档.

    为了便于文档生成, 提供了Spool\ApiInfo\Requests\BaseRequest Spool\ApiInfo\Requests\PageRequest两个请求类, 作为控制器的参数.

  5. 对比Swagger和ApiDoc

注释说明:

/**
 * 演示控制器 -- 分组名称
 */
class ExampleController extends Controller
{
    /**
     * 演示控制器get文档 -- 接口名称
     *
     * 演示控制器get方法描述 -- 接口介绍
     * 写点什么
     * 接口简介
     *
     * @param PageRequest $request 请求 -- 参数类
     *
     * @return  array {"code":1,"msg":"err"} -- 接口返回值示例json格式
     * @version 1.0.0 -- 接口版本号
     * @example {"code":0,"msg":"success"} -- 接口返回值示例json格式
     * @example {"code":1,"msg":"err"} 失败 -- 接口返回值示例json格式
     */
    public function getM(PageRequest $request): array
    {
        return ['code' => 0, 'mesg' => 'ok', 'url' => $request->getBaseUrl()];
    }
}

参与贡献

  1. Fork 本仓库
  2. 新建 Feat_xxx 分支
  3. 提交代码
  4. 新建 Pull Request

特技

  1. 使用 Readme_XXX.md 来支持不同的语言,例如 Readme_en.md, Readme_zh.md
  2. Gitee 官方博客 blog.gitee.com
  3. 你可以 https://gitee.com/explore 这个地址来了解 Gitee 上的优秀开源项目
  4. GVP 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
  5. Gitee 官方提供的使用手册 https://gitee.com/help
  6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 https://gitee.com/gitee-stars/

更新说明

v0.1.2

  1. 修复了在使用dingoapi过程中出现的部分Bug, 导致文档无法显示的问题.

All versions of apiinfo with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
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 spool/apiinfo contains the following files

Loading the files please wait ....