Download the PHP package yangweijie/think-scramble without Composer

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

ThinkScramble

PHP Version ThinkPHP Version

ThinkScramble 是一个为 ThinkPHP 6/8 框架设计的自动 API 文档生成扩展包,移植自 Laravel Scramble。它能够自动分析你的控制器代码,无需手动编写 PHPDoc 注解,即可生成符合 OpenAPI 3.0 规范的 API 文档。

✨ 特性

📋 系统要求

🚀 安装

PIE 安装(推荐)

使用 PIE (PHP Installer for Extensions) 安装,享受现代化的包管理体验:

Composer 安装

使用 Composer 安装扩展包:

PHAR 安装

下载预构建的 PHAR 文件:

自动发现

ThinkPHP 8.0 支持自动服务发现,安装后会自动注册服务。如果需要手动注册,请在 config/service.php 中添加:

🚀 快速开始

1. 创建 API 控制器

2. 配置路由

3. 生成文档

4. 访问文档

启动开发服务器并访问文档:

访问以下地址查看生成的 API 文档:

📱 Web 界面

📄 API 规范文件

🔧 管理接口

✅ 功能状态

已完成功能

已完成功能

高级功能

⚙️ 配置

基本配置

ThinkScramble 使用内置的默认配置,开箱即用。如需自定义配置,可以创建 config/scramble.php 文件:

📖 命令行工具

生成文档

导出文档

ThinkScramble 支持 15 种不同的导出格式,覆盖主流 API 管理平台、测试工具和文档系统:

标准格式

API 管理平台

测试工具

文档和服务

指定输出路径

📤 导出格式详解

ThinkScramble 支持 15 种不同的导出格式,满足各种使用场景:

🎯 使用场景对照表

使用场景 推荐格式 说明
开发阶段 JSON, YAML, HTML 标准格式,版本控制友好
API 测试 Postman, Insomnia, ApiPost 功能测试和调试
性能测试 JMeter, HAR 负载测试和网络分析
团队协作 Eolink, YApi, RAP, ApiFox 企业级 API 管理
文档发布 HTML, ApiDoc, ShowDoc 对外文档展示
企业集成 WSDL, JSON SOA 架构和系统集成

📋 格式特性对比

格式 文件类型 特点 适用工具/平台
JSON .json OpenAPI 标准,通用性强 各种 API 工具
YAML .yaml 人类可读,配置友好 文档编写,CI/CD
HTML .html 可视化,交互式文档 浏览器查看
Postman .json 支持测试脚本和环境变量 Postman 客户端
Insomnia .json 现代化界面,插件丰富 Insomnia 客户端
Eolink .json 企业级 API 管理 Eolink 平台
JMeter .jmx 性能测试,负载测试 Apache JMeter
YApi .json 接口管理,Mock 数据 YApi 平台
ApiDoc .json 静态文档生成 ApiDoc 工具
ApiPost .json 国产工具,中文友好 ApiPost 客户端
ApiFox .json 设计优先,协作开发 ApiFox 平台
HAR .har 网络请求记录分析 浏览器开发者工具
RAP .json 阿里开源,Mock 支持 RAP 平台
WSDL .wsdl SOAP 服务描述 企业 SOA 架构
ShowDoc .json 简单易用,快速部署 ShowDoc 平台

🚀 批量导出示例

🌟 特色功能

自动类型推断

ThinkScramble 能够自动分析您的代码并推断参数类型和响应格式:

🔄 文件上传支持

支持多种文件上传注释格式和自动代码分析:

🏷️ 注解支持

完整支持 think-annotation 的所有注解类型:

🏗️ 模型分析

自动分析 ThinkPHP 模型,生成精确的 OpenAPI Schema:

🛡️ 中间件分析

自动分析中间件配置,生成 OpenAPI 安全方案:

支持验证器

🧪 测试

运行测试套件:

📚 文档

📖 在线文档站点

访问我们的完整在线文档站点,享受更好的阅读体验:

🌐 https://yangweijie.github.io/think-scramble/

🚀 快速链接

📁 本地文档

核心文档

功能文档

更新日志

🤝 贡献

欢迎贡献代码!请查看 贡献指南 了解详细信息。

开发环境设置

贡献

欢迎提交 Issue 和 Pull Request!

许可证

MIT License. 详见 LICENSE 文件。

致谢

本项目移植自 dedoc/scramble,感谢原作者的优秀工作。


All versions of think-scramble with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
topthink/framework Version ^6.0|^8.0
nikic/php-parser Version ^4.15
cebe/php-openapi Version ^1.7
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 yangweijie/think-scramble contains the following files

Loading the files please wait ...