PHPackages                             adgoal/symfony-jsonrpc-http-server-openapi-doc - 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. adgoal/symfony-jsonrpc-http-server-openapi-doc

ActiveLibrary[API Development](/categories/api)

adgoal/symfony-jsonrpc-http-server-openapi-doc
==============================================

Symfony bundle for easy JSON-RPC server OpenAPI 3.0.0 documentation

v0.3.2(6y ago)02[1 PRs](https://github.com/Adgoal/symfony-jsonrpc-http-server-openapi-doc/pulls)MITPHPPHP &gt;=7.3

Since Apr 20Pushed 5y agoCompare

[ Source](https://github.com/Adgoal/symfony-jsonrpc-http-server-openapi-doc)[ Packagist](https://packagist.org/packages/adgoal/symfony-jsonrpc-http-server-openapi-doc)[ RSS](/packages/adgoal-symfony-jsonrpc-http-server-openapi-doc/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (3)Dependencies (12)Versions (8)Used By (0)

Symfony JSON-RPC Http server OpenAPI documentation
==================================================

[](#symfony-json-rpc-http-server-openapi-documentation)

[![License](https://camo.githubusercontent.com/6d82065f8bb8c79792ea393885f4b94b7b46f95669c4f562b70d1559e4547d5c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6164676f616c2f73796d666f6e792d6a736f6e7270632d687474702d7365727665722d6f70656e6170692d646f632e737667)](https://github.com/adgoal/symfony-jsonrpc-http-server-openapi-doc) [![Code size](https://camo.githubusercontent.com/f77181588531b64e13e3408f8bbd5dee3c2778d5343b608cae7b9a6c249e2cc3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f6164676f616c2f73796d666f6e792d6a736f6e7270632d687474702d7365727665722d6f70656e6170692d646f632e737667)](https://github.com/adgoal/symfony-jsonrpc-http-server-openapi-doc) [![Dependabot Status](https://camo.githubusercontent.com/ef54cb99e32413bf772ececc2f0442dca95d62ebd6be2ecbf113e93561606230/68747470733a2f2f6170692e646570656e6461626f742e636f6d2f6261646765732f7374617475733f686f73743d676974687562267265706f3d6164676f616c2f73796d666f6e792d6a736f6e7270632d687474702d7365727665722d6f70656e6170692d646f63)](https://dependabot.com)

[![Scrutinizer Build Status](https://camo.githubusercontent.com/b2023ae60a6b81683eaba63f41dcac21750a5a28e07fb57b63c67338f9ee80d2/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f6164676f616c2f73796d666f6e792d6a736f6e7270632d687474702d7365727665722d6f70656e6170692d646f632e7376673f6c6162656c3d5363727574696e697a6572266c6f676f3d7363727574696e697a6572)](https://scrutinizer-ci.com/g/adgoal/symfony-jsonrpc-http-server-openapi-doc/build-status/master) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/75c1d8a8c65c443ff263d6f678cb57b17299573bba1cdb785825c2028b6f2bfe/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6164676f616c2f73796d666f6e792d6a736f6e7270632d687474702d7365727665722d6f70656e6170692d646f632f6d61737465722e7376673f6c6f676f3d7363727574696e697a6572)](https://scrutinizer-ci.com/g/adgoal/symfony-jsonrpc-http-server-openapi-doc/?branch=master) [![Code Coverage](https://camo.githubusercontent.com/9ecadc4d2713110401c73f7b2a14860d02a1f7d8c5df312232b53236f07b621b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6164676f616c2f73796d666f6e792d6a736f6e7270632d687474702d7365727665722d6f70656e6170692d646f632f6d61737465722e7376673f6c6f676f3d7363727574696e697a6572)](https://scrutinizer-ci.com/g/adgoal/symfony-jsonrpc-http-server-openapi-doc/?branch=master)

[![Travis Build Status](https://camo.githubusercontent.com/32260168b4b275e4f95a114fe574cece961d2d8ba49708fc2b6d6d2395661d37/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f6164676f616c2f73796d666f6e792d6a736f6e7270632d687474702d7365727665722d6f70656e6170692d646f632f6d61737465722e7376673f6c6162656c3d547261766973266c6f676f3d747261766973)](https://travis-ci.com/adgoal/symfony-jsonrpc-http-server-openapi-doc) [![Travis Symfony Versions](https://camo.githubusercontent.com/71254bab032066a404d9dedfd1ceb2150847d1abdd168b01d196fee30dccaf9c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d763325323025324625323076342d3838393242462e7376673f6c6f676f3d747261766973)](https://symfony.com/)

[![Latest Stable Version](https://camo.githubusercontent.com/93d4927c30ce552e7518285dde3bd33879ac812f4102c9ad42acedf2f21ccad2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6164676f616c2f73796d666f6e792d6a736f6e7270632d687474702d7365727665722d6f70656e6170692d646f632e737667)](https://packagist.org/packages/adgoal/symfony-jsonrpc-http-server-openapi-doc) [![Packagist PHP version](https://camo.githubusercontent.com/e439ae47eaf88526cdfe1e85206b3ae189b46be6512631aaf9888e86ffa914a0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6164676f616c2f73796d666f6e792d6a736f6e7270632d687474702d7365727665722d6f70656e6170692d646f632e737667)](https://packagist.org/packages/adgoal/symfony-jsonrpc-http-server-openapi-doc)

Symfony bundle for easy JSON-RPC server OpenAPI 3.0.0 documentation

Symfony bundle for [adgoal/jsonrpc-http-server-openapi-doc-sdk](https://github.com/adgoal/php-jsonrpc-http-server-openapi-doc-sdk)

How to use
----------

[](#how-to-use)

Once configured, your project is ready to handle HTTP `GET` request on `/doc/openapi.json` endpoint. Result will be a openapi compatible file.

See below how to configure it.

Configuration
-------------

[](#configuration)

[Behat demo app configuration folders](./features/demo_app) can be used as examples.

- Add the bundles in your config/bundles.php file:

    ```
    // config/bundles.php
    return [
        ...
        Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
        Yoanm\SymfonyJsonRpcHttpServer\JsonRpcHttpServerBundle::class => ['all' => true],
        Yoanm\SymfonyJsonRpcHttpServerDoc\JsonRpcHttpServerDocBundle::class => ['all' => true],
        Yoanm\SymfonyJsonRpcHttpServerOpenAPIDoc\JsonRpcHttpServerOpenAPIDocBundle::class => ['all' => true],
        ...
    ];
    ```
- Configure `adgoal/symfony-jsonrpc-http-server` as described on [adgoal/symfony-jsonrpc-http-server](https://github.com/adgoal/symfony-jsonrpc-http-server) documentation.
- Configure `adgoal/symfony-jsonrpc-http-server-doc` as described on [adgoal/symfony-jsonrpc-http-server-doc](https://github.com/adgoal/symfony-jsonrpc-http-server-doc) documentation.
- Query your project at `/doc/openapi.json` endpoint and you will have a OpenAPI json documentation file of your server.

Event
-----

[](#event)

You are able to enhance resulting documentation by listening on `json_rpc_http_server_openapi_doc.array_created` event.

See below an example of listener service configuration:

```
  method_doc_created.listener:
    class: Full\Namespace\DocCreatedListener #
