gammamatrix/playground-directory-api

Playground:提供一个API,无需UI即可与Playground Directory交互,这是一个用于Laravel应用程序的目录系统。

dev-develop / 73.x-dev 2024-08-16 05:12 UTC

This package is auto-updated.

Last update: 2024-09-17 20:29:41 UTC


README

Playground CI Workflow Test Coverage PHPStan Level 9

Playground:目录API包。

文档

Swagger

此应用程序提供Swagger文档:[swagger.json](https://github.com/gammamatrix/playground-directory-api/blob/HEAD/swagger.json)。

  • 端点模型支持锁定、强制删除垃圾、恢复、修订等。
  • 索引端点支持高级查询过滤。

Swagger API文档是用npm构建的。

  • npm仅用于生成文档,操作CMS API时不需要。

请参阅[package.json](https://github.com/gammamatrix/playground-directory-api/blob/HEAD/package.json)的要求。

安装npm。

npm install

构建文档以生成[swagger.json](https://github.com/gammamatrix/playground-directory-api/blob/HEAD/swagger.json)配置。

npm run docs

文档

  • 在Swagger Editor UI上预览[swagger.json](https://github.com/gammamatrix/playground-directory-api/blob/HEAD/swagger.json)。
  • 在Redocly Editor UI上预览[swagger.json](https://github.com/gammamatrix/playground-directory-api/blob/HEAD/swagger.json)。

安装

您可以通过composer安装此包

composer require gammamatrix/playground-directory-api

配置

默认情况下,所有选项都被禁用。

请参阅已发布配置文件的内容:[config/playground-directory-api.php](https://github.com/gammamatrix/playground-directory-api/blob/HEAD/config/playground-directory-api.php)

您可以使用以下命令发布配置文件

php artisan vendor:publish --provider=Playground\Directory\Api\ServiceProvider" --tag="playground-config"

Cloc

composer cloc
➜  playground-directory-api git:(develop) ✗ composer cloc
> cloc --exclude-dir=node_modules,output,vendor .
     195 text files.
     121 unique files.
      76 files ignored.

github.com/AlDanial/cloc v 1.98  T=0.24 s (504.6 files/s, 98625.1 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
JSON                             5              0              0          14524
PHP                             81            689           1139           3883
YAML                            28              5              0           3051
XML                              3              0              7            215
Markdown                         3             37              0             85
INI                              1              3              0             12
-------------------------------------------------------------------------------
SUM:                           121            734           1146          21770
-------------------------------------------------------------------------------

PHPStan

在第9级进行测试

  • config/
  • lang/
  • routes/
  • src/
  • tests/Feature/
  • tests/Unit/
composer analyse

编码标准

composer format

测试

composer test --parallel

变更日志

请参阅[CHANGELOG](https://github.com/gammamatrix/playground-directory-api/blob/HEAD/CHANGELOG.md),了解最近有哪些更改。

许可证

MIT许可证(MIT)。有关更多信息,请参阅[许可证文件](https://github.com/gammamatrix/playground-directory-api/blob/HEAD/LICENSE.md)。