Download the PHP package dreamyi12/apidoc without Composer

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

dreamyi12/apidoc

组件介绍

它是一个Hyperf框架的 [api接口自动验证和swagger接口文档生成] 组件.
功能包括:

支持:

不支持:

介绍

一个可以大大节省开发时间的组件 在我们使用hyperf开发过程中,经常会出现的问题,而该组件能帮忙解决以下问题。接下来让我们来一一描述

1.每次开发接口都需要写详细的接口文档,并且还需要建立路由,非常麻烦

2.使用默认的验证规则可能无法达到我们现在项目的要求,而hyperf提供的自定义验证必须要定义到监听器,非常不利于管理

3.hyperf提供的枚举类无法一次获得所有的枚举类型或者,通过枚举文本获得枚举值

4.hyperf自带的Annotation收集器每次都需要循环遍历才能取到自己需要的东西,很影响执行效率

5.每次进行参数经过验证之后还需要做一系列的判断才能去做增删改查,如下代码

该组件提供主要的功能就是解决以上所有问题

一.安装插件

二.使用

1.使用注解方式生成文档

通过注解的方式自动生成API接口文档以及路由,可使用RESTful API方式进行构造

写完生成文档的注解之后,启动hyperf将会自动启动生成文档到public/swagger目录下面,使用nginx 代理到对应的目录即可展示

2.自定义验证规则

在任意目录简历自定义的验证类,并且继承Dreamyi12\ApiDoc\Validation\Rule\CustomValidatorFactory类实现 handle方法,并且在你的类上加上CustomValidator注解,如下:

这是一个验证枚举类的例子

3.枚举类更加强大

在任意地方简历你需要的枚举类并且继承Dreamyi12\ApiDoc\Enum\EnumConstants,并定义EnumClass和Constants注解

定义的枚举类型可以配合自定义验证的枚举增加到注释当中去,后续我们会讲

4.定义Annotation收集器

我们可以在任意地方(类)定义注解收集器,只需要继承Dreamyi12\ApiDoc\Annotation\Abstracts\CustomAnnotation并且 定义Annotation和Target注解

5.高级定义注解ORM操作

在这里支持查询时自动注入到ORM的操作,以控制器的注解为例,详细我们看代码

以上为基本的组件简述,如果有不懂的,可以及时留言,我会第一时间回复


All versions of apidoc with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
ext-swoole Version >=4.4
ext-json Version *
hyperf/utils Version ^3.0
hyperf/validation Version ^3.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 dreamyi12/apidoc contains the following files

Loading the files please wait ....