baraja-core/structured-api-doc
Composer 安装命令:
composer require baraja-core/structured-api-doc
包简介
Automatically generated documentation by parsing of Structured API endpoints.
README 文档
README
BRJ organisation
Structured API Documentation
Fully automated tool for documentation.
📦 Installation
It's best to use Composer for installation, and you can also find the package on Packagist and GitHub.
To install, simply use the command:
$ composer require baraja-core/structured-api-doc
You can use the package manually by creating an instance of the internal classes, or register a DIC extension to link the services directly to the Nette Framework.
Idea
When developing any application, developers must maintain both the source code itself and documentation describing the general functionality for others. Writing documentation in a separate system takes more time, leads to human error, and makes the documentation obsolete over time. BRJ solves this problem by allowing developers to write documentation directly into comments in the source code, and then always machine-generate the page consistently.
How to start using BRJ documentation?
- Use Structured API endpoints (implementing Baraja Structured API) to your application
- Install this package
- Open URL
/api-documentation
Sample endpoint implementation with native comments:
/** * Common API endpoint for robust article manipulation. * * @endpointName Article manager */ final class ArticleEndpoint extends BaseEndpoint { #[Inject] public ArticleManagerAccessor $articleManager; /** * @param string $locale in format "cs" or "en" * @param int $page real page number for filtering, 1 => first page ... "n" page * @param string|null $filterTitle filter by words in title? * @param string|null $filterFrom find all articles from this date * @param string|null $filterTo find all articles to this date */ public function actionDefault(string $locale, int $page = 1, ?string $filterTitle = null, ?string $filterFrom = null, ?string $filterTo = null): void { // Here is some body...
Designed for developers
We understand that maintaining data structures in PHP and on the frontend can be challenging, so the library includes a native button to export any response structure to TypeScript:
📄 License
baraja-core/structured-api-doc is licensed under the MIT license. See the LICENSE file for more details.
baraja-core/structured-api-doc 适用场景与选型建议
baraja-core/structured-api-doc 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4.51k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2020 年 04 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 baraja-core/structured-api-doc 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 baraja-core/structured-api-doc 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 4.51k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2020-04-29

