elife/api-validator
最新稳定版本:v1.1.0
Composer 安装命令:
composer require elife/api-validator
包简介
eLife Sciences API validator
README 文档
README
This library provides a validator for the eLife Sciences API.
It checks HTTP requests/responses to make sure that they match the specification. Currently only the body of the message is validated against the schema for that media type.
Dependencies
- Composer
- PHP 7
Installation
Execute composer require elife/api-validator:dev-master.
Usage
To validate a message:
use eLife\ApiValidator\MessageValidator\JsonMessageValidator; use eLife\ApiValidator\SchemaFinder\PathBasedSchemaFinder; use JsonSchema\Validator; $messageValidator = new JsonMessageValidator(new PathBasedSchemaFinder('/path/to/api/schemas'), new Validator()); $messageValidator->validate($message);
统计信息
- 总下载量: 26.13k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-07-15