PHPackages                             php-solution/nelmio-apidoc-yaml-bundle - 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. [API Development](/categories/api)
4. /
5. php-solution/nelmio-apidoc-yaml-bundle

ActiveSymfony-bundle[API Development](/categories/api)

php-solution/nelmio-apidoc-yaml-bundle
======================================

This bundle provides an integration of NelmioApiDocBundle with yaml extractor

v0.1(9y ago)1261MITPHPPHP &gt;=5.5

Since May 26Pushed 8y ago6 watchersCompare

[ Source](https://github.com/php-solution/sf-nelmio-apidoc-yaml-bundle)[ Packagist](https://packagist.org/packages/php-solution/nelmio-apidoc-yaml-bundle)[ RSS](/packages/php-solution-nelmio-apidoc-yaml-bundle/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

NelmioApiDocYamlBundle
======================

[](#nelmioapidocyamlbundle)

This bundle allows you to use NelmioApiDocBundle and store all apidocs on yml config files.

Bundle includes 2 new apidoc extractors:

- Chain extractor
- Yaml extractor.

Bundle change definition for standard api doc extractor and now @nelmio\_api\_doc.extractor.api\_doc\_extractor definition of PhpSolution\\NelmioApiDocYamlBundle\\Extractor\\ChainApiDocExtractor.

You can use standard ApiDocExtractor with @nelmio\_api\_doc.extractor.api\_doc\_extractor.phpdoc service name.

Chain extractor use Yaml extractor and phpdoc extractor.

Yaml extractor check all @Bundle\\Resources\\config\\api\_doc.yml and create config for apidoc.

All configuration parameters you can find on  documentation.

Using
-----

[](#using)

Example of yml config:

```
rest_api_security_login_check: # route name
    section: "Authorization"
    resource: false
    description: ""
    https: false
    deprecated: false
    tags: []
    filters: []
    output:
        class: PhpSolution\NelmioApiDocYamlBundle\Form\SimpleType
        options:
            fields:
                - {name: "token",  type: "text"}
                - {name: "expDate",  type: "integer", options: {description: "timestamp"}}
                - {name: "expDateOffset",  type: "integer", options: {description: "time offset"}}
    requirements:
        - { name: "username",  dataType: "string"}
        - { name: "password",  dataType: "string"}
    statusCodes: {"200": "Returned when successful", 401: "Returned when the user is not authorized"}
    views: []
    documentation: 'Get authorization token for access to api endpoints'
    authentication: true

```

If you want to define input options without creation new class for apidoc you can use like this:

```
requirements:
    - { name: "username",  dataType: "string"}
    - { name: "password",  dataType: "string"}

```

If yo want to define output parameters without creation new class for apidoc you can use like this:

```
output:
    class: PhpSolution\NelmioApiDocYamlBundle\Form\SimpleType
    options:
        fields:
            - {name: "token",  type: "text"}
            - {name: "expDate",  type: "integer", options: {description: "timestamp"}}
            - {name: "expDateOffset",  type: "integer", options: {description: "time offset"}}

```

Config
------

[](#config)

1. Add route to app/config/routing.yml

```
NelmioApiDocBundle:
    resource: "@NelmioApiDocBundle/Resources/config/routing.yml"
    prefix:   /rest-api/doc

```

2. If you want change default setting of bundle you can change it on app/config/config.yml:

```
    ...
    nelmio_api_doc_yaml:
        metadata:
            file_path: api_doc.yml
            defaults: ~ #path to defaults
        cache:
            enabled: false
            file: %kernel.cache_dir%/api-doc-yml.cache

```

Installing
----------

[](#installing)

1. Add to your composer.json

```
    "require": {
        ...
        "php-solution/nelmio-apidoc-yaml-bundle": "dev-master"
        ...
    }

```

2. Add to AppKernel.php:

```
    public function registerBundles()
    {
        $bundles = array(
        ...
        new Nelmio\ApiDocBundle\NelmioApiDocBundle(),
        new PhpSolution\NelmioApiDocYamlBundle\CiklumNelmioApiDocYamlBundle(),
        ...

```

3. run:

```
    composer update php-solution/nelmio-apidoc-yaml-bundle

```

TODO
----

[](#todo)

- Coverage more than 80%

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3323d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/49381ba2a061a148b9a6f7b5e80663f17d44f15047bbc5f1f38d13429de60487?d=identicon)[olesav](/maintainers/olesav)

---

Top Contributors

[![igdr](https://avatars.githubusercontent.com/u/4249152?v=4)](https://github.com/igdr "igdr (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/php-solution-nelmio-apidoc-yaml-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/php-solution-nelmio-apidoc-yaml-bundle/health.svg)](https://phpackages.com/packages/php-solution-nelmio-apidoc-yaml-bundle)
```

PHPackages © 2026

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