PHPackages                             webnium/bear-json-schema-validation - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. webnium/bear-json-schema-validation

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

webnium/bear-json-schema-validation
===================================

Validation with json schema for BEAR Resource

122PHP

Since Jan 29Pushed 12y ago3 watchersCompare

[ Source](https://github.com/webnium/BEAR.JsonSchemaValidation)[ Packagist](https://packagist.org/packages/webnium/bear-json-schema-validation)[ RSS](/packages/webnium-bear-json-schema-validation/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

BEAR.JsonSchmaValidation
========================

[](#bearjsonschmavalidation)

- master [![Build Status](https://camo.githubusercontent.com/9be616cbf684c6d66ee28ff28295a115a50110a4c4a6cfc1da652931d32181cb/68747470733a2f2f7472617669732d63692e6f72672f7765626e69756d2f424541522e4a736f6e536368656d6156616c69646174696f6e2e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/webnium/BEAR.JsonSchemaValidation)

Overview
--------

[](#overview)

Validation with json schema for BEAR Resource

Usage
-----

[](#usage)

Install `Webnium\BEAR\JsonSchmaValidation\ValidationModule` in your AppModule. Then this validator intercepts ResourceObject methods annotated with `@Validate`.

Validation process is below:

1. Retrieve schema definition specifed via `$ro->links['describedBy']`.
2. If schema does not have `link` property or has empty link property, do nothing.
3. Search an element of `link` property under constraint that `rel` property is "self" and `method` property is called REST method(eg. `GET` when invocated method is `onGet`).
4. If found a link element, validate invocation arguments with `schema` property of it.
5. If not found, search a link element unser constraint that `rel` property is "self" and without `method` property.
6. If found that, validate invocation arguments with `schema` property of it.
7. If not found again, do nothing.

License
-------

[](#license)

This library is destributed under BSD-3-Clause license. See LICENSE file for more infomation.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e1df0504fcb9043b8646c62f3e25bd644e6bec49fc009eb5abe91982093bee3f?d=identicon)[MugeSo](/maintainers/MugeSo)

---

Top Contributors

[![MugeSo](https://avatars.githubusercontent.com/u/250446?v=4)](https://github.com/MugeSo "MugeSo (23 commits)")

### Embed Badge

![Health badge](/badges/webnium-bear-json-schema-validation/health.svg)

```
[![Health](https://phpackages.com/badges/webnium-bear-json-schema-validation/health.svg)](https://phpackages.com/packages/webnium-bear-json-schema-validation)
```

###  Alternatives

[webmozart/assert

Assertions to validate method input/output with nice error messages.

7.6k894.0M1.2k](/packages/webmozart-assert)[bensampo/laravel-enum

Simple, extensible and powerful enumeration implementation for Laravel.

2.0k15.9M104](/packages/bensampo-laravel-enum)[swaggest/json-schema

High definition PHP structures with JSON-schema based validation

48612.5M73](/packages/swaggest-json-schema)[stevebauman/purify

An HTML Purifier / Sanitizer for Laravel

5325.6M19](/packages/stevebauman-purify)[ashallendesign/laravel-config-validator

A package for validating your Laravel app's config.

217905.3k5](/packages/ashallendesign-laravel-config-validator)[crazybooot/base64-validation

Laravel validators for base64 encoded files

1341.9M8](/packages/crazybooot-base64-validation)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
