judeufuoma/api-toolkit 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

judeufuoma/api-toolkit

最新稳定版本:v1.0.2

Composer 安装命令:

composer require judeufuoma/api-toolkit

包简介

A Laravel package that generates Postman-compatible API collections.

README 文档

README

Downloads ApiToolkit is a Laravel package designed to generate Postman-compatible API collections from your defined routes. It will automatically generate collections with API route details, query parameters, request bodies, headers, and authentication, making API testing and documentation easy.

Features

  • Automatically generates a Postman collection from Laravel API routes.
  • Supports routes with GET, POST, PUT, PATCH, and DELETE methods.
  • Generates query parameters, request bodies, and headers based on route documentation.
  • Supports authentication headers (e.g., Bearer {{token}}).
  • Outputs a JSON file that can be directly imported into Postman.

Installation

To install ApiToolkit, follow these steps:

1. Install via Composer

In your Laravel project, run:

composer require judeufuoma/api-toolkit

2. Generate the Postman Collection

Once installed, you can generate the Postman collection by running the following command:

php artisan api-toolkit:generate

This command will:

  • Scan your Laravel routes.
  • Generate a Postman collection JSON file.
  • Include all routes prefixed with api/

Usage

The ApiToolkit will generate a postman_collection.json file in your project’s root directory. You can then import this file into Postman to get a detailed view of your API, including routes, query parameters, request bodies, and headers.

Testing

If you’re contributing to the development of this package or need to run tests, use PHPUnit:

vendor/bin/phpunit

Alternatively, if you need to run tests within the Laravel app that uses the package, run:

php artisan test

Contributing

We welcome contributions! If you have suggestions or improvements, please fork the repository and submit a pull request. If you find any bugs or want to add a feature, please create an issue on GitHub.

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-05-07