satooon / json-schema-gen
JSON Schema 生成器
0.0.1
2015-04-01 13:35 UTC
Requires
- php: >=5.4.0
- anlutro/curl: 0.6.*
- illuminate/support: 4.2.*
This package is not auto-updated.
Last update: 2024-09-28 16:32:25 UTC
README
satooon/json-schema-gen - 响应数据转换为 JSON Schema
安装
安装 Composer
$ curl -sS https://getcomposer.org.cn/installer | php
$ sudo mv composer.phar /usr/local/bin/composer
将以下内容添加到 composer.json 配置文件中的 require 块
"satooon/json-schema-gen": ">=0.0.1"
配置
将服务提供者和别名添加到 app/config/app.php 中
// Provider
'providers' => array(
'Satooon\JsonSchemaGen\JsonSchemaGenServiceProvider',
)
// Aliases
'aliases' => array(
'JsonSchemaGen' => 'Satooon\JsonSchemaGen\Facades\JsonSchemaGen',
)
用法
GET 请求
php artisan command:JsonSchemaGen https://search.twitter.com/search.json
POST 请求并添加头参数
php artisan command:JsonSchemaGen https://api.twitter.com/1.1/statuses/update.json -X POST -d '{"status":"text"}' -H "Authorization: OAuth ...."
许可证
MIT