All Projects → deathkel → apitest

deathkel / apitest

Licence: MIT license
this is a tool for testing Laravel REST API

Programming Languages

CSS
56736 projects
javascript
184084 projects - #8 most used programming language
HTML
75241 projects
PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to apitest

Chn Eolinker Ams Lite 4.0 For Php
中国最大的在线API管理平台EOLINKER 旗下API管理系统开源精简版,适合个人以及微型团队使用。
Stars: ✭ 869 (+7800%)
Mutual labels:  api-documentation, testing-tools
Chn Eolinker Ams Lite 4.0 For Java
中国最大的API接口管理平台,3.x开源发行版,支持多国语言[英语、简体中文、繁体中文]
Stars: ✭ 275 (+2400%)
Mutual labels:  api-documentation, testing-tools
json-crate
📦 json-crate: a minimalistic promise-based json database
Stars: ✭ 29 (+163.64%)
Mutual labels:  testing-tools
tools
Tools used for Penetration testing / Red Teaming
Stars: ✭ 63 (+472.73%)
Mutual labels:  testing-tools
unofficial-documentation
solved.ac API를 문서화하는 커뮤니티 프로젝트
Stars: ✭ 38 (+245.45%)
Mutual labels:  api-documentation
laravel-secureheaders
🔒 SecureHeaders wrapper for Laravel.
Stars: ✭ 52 (+372.73%)
Mutual labels:  laravel-package
apidox
Generate node.js module API markdown with dox
Stars: ✭ 14 (+27.27%)
Mutual labels:  api-documentation
DebugWindow
一个在真机上测试时方便查看输出日志的小工具。(A debug tool which helps you view the console logs on the device when you test you APP.)
Stars: ✭ 36 (+227.27%)
Mutual labels:  testing-tools
aliyun-oss-laravel
Laravel 的 Aliyun OSS 扩展, 支持 Laravel 9. Alibaba Cloud Object Storage Service For Laravel.
Stars: ✭ 91 (+727.27%)
Mutual labels:  laravel-package
papermerge-core
Papermerge RESTful backend structured as reusable Django app
Stars: ✭ 103 (+836.36%)
Mutual labels:  documents
evolutio
ab testing framework with automated code removing
Stars: ✭ 15 (+36.36%)
Mutual labels:  testing-tools
mocat
🐈 Mocat is a mocking toolbar that allows you to interactively develop and test network requests.
Stars: ✭ 27 (+145.45%)
Mutual labels:  testing-tools
InternalSteamWebAPI
Documenting the unofficial and internal Steam Web API
Stars: ✭ 126 (+1045.45%)
Mutual labels:  api-documentation
ts-mock-imports
Intuitive mocking library for Typescript class imports
Stars: ✭ 103 (+836.36%)
Mutual labels:  testing-tools
laravel-spotify
Laravel-Spotify is a simple wrapper around the Spotify Web API that makes working with its endpoints a breeze!
Stars: ✭ 141 (+1181.82%)
Mutual labels:  laravel-package
meituan-pub-union
🌈 美团分销联盟 PHP-SDK
Stars: ✭ 19 (+72.73%)
Mutual labels:  laravel-package
crypton
Laravel Request & Response Encryption
Stars: ✭ 31 (+181.82%)
Mutual labels:  laravel-package
diferencia
Tool to detect regressions between services
Stars: ✭ 51 (+363.64%)
Mutual labels:  testing-tools
laravel-coming-soon
Laravel package to display Coming Soon page
Stars: ✭ 19 (+72.73%)
Mutual labels:  laravel-package
testcontainers
Selenide + TestContainers (Docker) sample project
Stars: ✭ 28 (+154.55%)
Mutual labels:  testing-tools

APITEST

轻量级laravel REST接口测试工具

用于查看和测试后端REST接口

Latest Version on Packagist Software License Total Downloads

版本要求

laravel >= 5.1,php > 7

安装

composer require deathkel/apitest

使用

请到注册服务提供者到Laravel服务提供者列表中。 方法1: 在config/app.php配置文件中,key为'providers'的数组中添加服务提供者

        'providers'=>[
            //...
            Deathkel\Apitest\ApiTestServiceProvider::class
        ]

运行 'php artisan vendor:publish'将视图文件和静态文件发布到你们的项目中,请确保文件夹resource/views/api和public/api文件夹为空。 否则请自行复制使用本项目frotend文件中的blade和静态文件

Route配置示例

请配置在debug模式开启下的路由,不要再生产环境中使用

    if (config('app.debug')) {
        Route::get('apitest','ApiTestController@index');
    }

控制器示例

    use Deathkel\Apitest\ApiReflection;
    
    class ApiTestController extend Controller{
        public function index(){
            $reflection=new ApiReflection();
            $api=$reflection->getApi();
            $apiToString=json_encode($api);
            
            return view('api.index', ['api' => $api,'apiToString'=>$apiToString]);
        }
    }

默认加载所有控制器,你可以使用setConfig()方法来手动设置要加载的控制器,

    private function config(){
        return [
            'App\Http\Controllers\IndexController',
            'App\Http\Controllers\HomeController',
        ];
    }
    
    .....
    $reflection=new ApiReflection();
    $reflection->setConfig($this->config());
    $api=$reflection->getApi();
    .....

界面示例

注释说明

@apiTest : apiTest功能标识

  • 添加了该参数才能使用该工具的其他功能。否则注释只能以文本格式展示(可用于兼容老的注释)

@param {参数格式} {参数} {简单说明} : 查询参数

  • 参数格式:自定义参数的格式名称。如(int|string|可选)等等
  • 参数名称:查询参数的名称。如name,title等等
  • 简单说明:随意写点吧

注意用一个空格分割

@{任意名称} : 任意注释

  • author version ...

注意名称和说明之间用一个空格分割

写法示例

/**
 * @apiTest
 * @param nullable|int name 名称
 * @说明 这个是index方法
 * @随便啥玩意 随便啥的说明
 * 随便啥的说明第二行
 * -#-%^&*;a'd--符号啥的也都可以
 * @又一个名称
 * 又一个名称的注释
 * @author kel
 * @version 1.0.0
 */
public function index(){

}

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].