PHPackages                             simianbv/json-schema - 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. simianbv/json-schema

ActiveProject

simianbv/json-schema
====================

A utility package for creating JSON resources based on the laravel models provided, comes with a model generator and migration

v1.0.7(5y ago)02.7kMITPHPPHP &gt;=7.3|^8.0

Since Nov 12Pushed 5y agoCompare

[ Source](https://github.com/Simianbv/json-schema)[ Packagist](https://packagist.org/packages/simianbv/json-schema)[ RSS](/packages/simianbv-json-schema/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (2)Versions (9)Used By (0)

json-schema
===========

[](#json-schema)

A JSON Schema generator for Laravel models

Installation
------------

[](#installation)

To install, use:

`composer require simianbv/json-schema --dev`

next up;

`artisan vendor:publish --provider="Simianbv\JsonSchema\JsonSchemaServiceProvider" --tag=json-schema-stubs``artisan vendor:publish --provider="Simianbv\JsonSchema\JsonSchemaServiceProvider" --tag=json-schema`

to get the stubs, next up;

define your YAML
----------------

[](#define-your-yaml)

The YAML definitions are ready to be served and used to create models, controllers, resources and in the future, filters.

```
Role:                       # the name of the model
  namespace: Acl            # Define the relative namespace
  timestamps: true          # Allow timestamps for the model
  softDelete: true          # Allow softdeletes
  columns:                  # Define your columns
    id:                     # The name of the column
      type: bigInteger      # The column type
      primary: true         # Whether it's primary
      unsigned: true        # Should be unsigned
    name:                   # The name of the column
      type: string          # The column type
      nullable: false       # Nullable or not
      length: 50            # The length of the column
      unique: true          # Whether it should be unique
  relations:                # Define the relations
    Group:                  # The name of the related Model
      namespace: Acl        # Define the related Model's namespace
      type: belongsToMany   # Define the type of relation
      local: id             # Define the primary key in the related model
      foreign: id           # Define what the foreign key should be

```

Another example:

```
RoleUser:                   # The name of the pivot table
  namespace: Acl            # The relative namespace
  pivot_only: true          # Set to true if this is only a pivt table
  timestamps: true          # Whether you want timestamps
  columns:                  # Define your columns
    id:                     # The name of the column
      type: bigInteger      # The type
      primary: true         # Primary yes or no
      unsigned: true        # Whether is should be unsigned or not
    role_id:                # The name of the column ( note the _id )
      type: bigInteger      # The column type
      nullable: false       # Nullable yes or no
    user_id:                # The name of the column ( note the _id )
      type: bigInteger      # The column type
      nullable: false       # Nullable yes or no
  relations:                # The relations
    Role:                   # The name of the related Model
      namespace: Acl        # The relative namespace this model resides in
      type: hasOne          # The relation type
      local: role_id        # The local key ( note the _id )
      foreign: id           # The foreign table's primary key
    User:                   # The name of the related Model
      namespace:            # The namespace can be left blank
      type: hasOne          # The Relation type
      local: user_id        # The local column
      foreign: id           # The foreign model's column
```

To define the JSON Schema, a Resource class is generated in the `/app/Resources/Json/` directory where you can define the schema further. You can add layout elements to wrap them inside or align them horizontally or vertically.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~23 days

Recently: every ~40 days

Total

8

Last Release

1852d ago

PHP version history (2 changes)v1.0.0PHP &gt;=7.3

v1.0.4PHP &gt;=7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/80dd6fdf3d3250ac6f3b018db939ac5acdc485e26c0a8a3388a06ae452d292e5?d=identicon)[Simian-m](/maintainers/Simian-m)

---

Top Contributors

[![Simian-m](https://avatars.githubusercontent.com/u/37339938?v=4)](https://github.com/Simian-m "Simian-m (32 commits)")

---

Tags

laraveljson-schema

### Embed Badge

![Health badge](/badges/simianbv-json-schema/health.svg)

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

###  Alternatives

[laravel/sail

Docker files for running a basic Laravel application.

1.9k186.9M1.0k](/packages/laravel-sail)[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

2.9k34.0M112](/packages/darkaonline-l5-swagger)[statamic/cms

The Statamic CMS Core Package

4.8k3.2M720](/packages/statamic-cms)[knuckleswtf/scribe

Generate API documentation for humans from your Laravel codebase.✍

2.3k12.2M45](/packages/knuckleswtf-scribe)[laravel/vapor-cli

The Laravel Vapor CLI

31310.7M8](/packages/laravel-vapor-cli)[laravel/roster

Detect packages &amp; approaches in use within a Laravel project

15510.4M7](/packages/laravel-roster)

PHPackages © 2026

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