PHPackages                             howyi/lamb - 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. howyi/lamb

ActiveLibrary

howyi/lamb
==========

Generate API docs from JSON Schema

v0.0.1(8y ago)3321MITPHPPHP &gt;=7.0.16

Since Sep 3Pushed 8y agoCompare

[ Source](https://github.com/howyi/lamb)[ Packagist](https://packagist.org/packages/howyi/lamb)[ RSS](/packages/howyi-lamb/feed)WikiDiscussions master Synced 2mo ago

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

[![Build Status](https://camo.githubusercontent.com/60bede597162c4ab862b0ea00b64aeba19756319d962a21a5aa8bf580a26b4ae/68747470733a2f2f7472617669732d63692e6f72672f686f7779692f6c616d622e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/howyi/lamb)[![Coverage Status](https://camo.githubusercontent.com/55b6416154af7093c71c652feaf2053495ec3c6aa3ee9a141147d59edd8b0efa/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f686f7779692f6c616d622f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/howyi/lamb?branch=master)

lamb
====

[](#lamb)

JSON Schema(&amp;YAML) extension &amp; API document generator

Usable API
----------

[](#usable-api)

methodGET, POST, PUT, DELETEbodyJSONQuickstart
----------

[](#quickstart)

### Install

[](#install)

`composer require howyi/lamb`

### Config

[](#config)

Put `lamb.yml` in current working directory

```
name: LambTestAPI
version: 1.0.0

path:
  collection:  sample/collection
  environment: sample/environment
  request:     sample/request
  scenario:    sample/scenario

environment:
  host: https://example.com/v2

default:
  request:
    header:
      sessionKey:
        value: ((sessionKey))
    parameter:
      # sessionKey:
      #   required: true
      #   value: ((sessionKey))
```

API format
----------

[](#api-format)

#### YAML

[](#yaml)

sample/collection/account/settings.yml
API endpoint: https://example.com/v2/account/settings

```
POST:
  description: Updates user's settings.

  request:
    body:
      $schema: http://json-schema.org/draft-04/schema#
      type: object
      properties:
        language:
          title: user's language
          type: string
        age:
          title: age
          type: integer
      additionalProperties: true
      required: []

  response:
    body:
      $schema: http://json-schema.org/draft-04/schema#
      type: object
      properties:
        language:
          title: user's language
          type: string
        age:
          title: age
          type: integer
      additionalProperties: true
      required: [language, age]
```

#### JSON

[](#json)

sample/collection/account/update\_profile.json
API endpoint: https://example.com/v2/account/update\_profile

```
{
  "POST": {

    "description": "Updates user's profile.",

    "request": {
      "body": {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "type": "object",
        "properties": {
          "language": {
            "title": "user's language",
            "type": "string"
          },
          "age": {
            "title": "age",
            "type": "integer"
          }
        },
        "additionalProperties": true,
        "required" : []
      }
    },

    "response": {
      "body": {
        "$schema": "http://json-schema.org/draft-04/schema#",
        "type": "object",
        "properties": {
          "language": {
            "title": "user's language",
            "type": "string"
          },
          "age": {
            "title": "age",
            "type": "integer"
          }
        },
        "additionalProperties": true,
        "required" : ["language", "age"]
      }
    }

  }
}
```

Environment format
------------------

[](#environment-format)

#### YAML

[](#yaml-1)

sample/environment/sample\_env.yml

```
sessionKey: hogehogehogehoge
```

#### JSON

[](#json-1)

```
{
  "sessionKey": "hogehogehogehoge"
}
```

Generate POSTMAN Collection
---------------------------

[](#generate-postman-collection)

```
$collection = \Lamb\CollectionStructureFactory::fromDir();
dump(\Lamb\Converter\Postman::collection($collection));

$environment = \Lamb\EnvironmentStructureFactory::fromDir();
dump(\Lamb\Converter\Postman::environment($environment));
```

Generate Swagger document
-------------------------

[](#generate-swagger-document)

```
$collection = \Lamb\CollectionStructureFactory::fromDir();
$environment = \Lamb\EnvironmentStructureFactory::fromDir();

dump(\Lamb\Converter\Swagger::document($collection, $environment, 'your_env'));
```

Generate API Blueprint document
-------------------------------

[](#generate-api-blueprint-document)

```
$collection = \Lamb\CollectionStructureFactory::fromDir();

dump(\Lamb\Converter\ApiBlueprint::document($collection));
```

Generate RAML document
----------------------

[](#generate-raml-document)

```
$collection = \Lamb\CollectionStructureFactory::fromDir();
$environment = \Lamb\EnvironmentStructureFactory::fromDir();

dump(\Lamb\Converter\Raml::document($collection, $environment, 'your_env'));
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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

Unknown

Total

1

Last Release

3176d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/92410aec7c4bc9780f6edb43a440715142e0d7bb20e6562742b5538f547a5e27?d=identicon)[howyi](/maintainers/howyi)

---

Top Contributors

[![howyi](https://avatars.githubusercontent.com/u/6592938?v=4)](https://github.com/howyi "howyi (4 commits)")[![844196](https://avatars.githubusercontent.com/u/4990822?v=4)](https://github.com/844196 "844196 (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/howyi-lamb/health.svg)

```
[![Health](https://phpackages.com/badges/howyi-lamb/health.svg)](https://phpackages.com/packages/howyi-lamb)
```

###  Alternatives

[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M2.0k](/packages/behat-behat)[laravel/sail

Docker files for running a basic Laravel application.

1.9k186.9M1.0k](/packages/laravel-sail)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[neos/flow

Flow Application Framework

862.0M451](/packages/neos-flow)

PHPackages © 2026

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