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

ActiveLibrary[API Development](/categories/api)

micro-module/symfony-jsonrpc-http-server-openapi-doc
====================================================

Symfony bundle for easy JSON-RPC server OpenAPI 3.0.0 documentation

v1.0.2(2y ago)0133MITPHPPHP &gt;=7.2

Since Jul 24Pushed 2y agoCompare

[ Source](https://github.com/temafey/symfony-jsonrpc-http-server-openapi-doc)[ Packagist](https://packagist.org/packages/micro-module/symfony-jsonrpc-http-server-openapi-doc)[ RSS](/packages/micro-module-symfony-jsonrpc-http-server-openapi-doc/feed)WikiDiscussions master Synced 1mo ago

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

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

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

[![License](https://camo.githubusercontent.com/c89819406b783d6d7854155ac7ae3b848d83c24279faa9bae58a5a4966f98d7f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f796f616e6d2f73796d666f6e792d6a736f6e7270632d687474702d7365727665722d6f70656e6170692d646f632e737667)](https://github.com/yoanm/symfony-jsonrpc-http-server-openapi-doc) [![Code size](https://camo.githubusercontent.com/f611f6f52666bcaf208443098886e0f83d1ccc8a93f4fabd5a9d7b5a1d4f475e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c616e6775616765732f636f64652d73697a652f796f616e6d2f73796d666f6e792d6a736f6e7270632d687474702d7365727665722d6f70656e6170692d646f632e737667)](https://github.com/yoanm/symfony-jsonrpc-http-server-openapi-doc) [![Dependabot Status](https://camo.githubusercontent.com/187969fb22180409f8796522784d96aed613225a779bf31c7369f9fe2ab6278b/68747470733a2f2f6170692e646570656e6461626f742e636f6d2f6261646765732f7374617475733f686f73743d676974687562267265706f3d796f616e6d2f73796d666f6e792d6a736f6e7270632d687474702d7365727665722d6f70656e6170692d646f63)](https://dependabot.com)

[![Scrutinizer Build Status](https://camo.githubusercontent.com/040de6cc00e0af306dd60352472ce7a9284faba733ba0a94f475dc138784e346/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f796f616e6d2f73796d666f6e792d6a736f6e7270632d687474702d7365727665722d6f70656e6170692d646f632e7376673f6c6162656c3d5363727574696e697a6572266c6f676f3d7363727574696e697a6572)](https://scrutinizer-ci.com/g/yoanm/symfony-jsonrpc-http-server-openapi-doc/build-status/master) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/dff49768d25878a1fc46bbffe30d656285af228e641455bf36b6cbd0f5662575/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f796f616e6d2f73796d666f6e792d6a736f6e7270632d687474702d7365727665722d6f70656e6170692d646f632f6d61737465722e7376673f6c6f676f3d7363727574696e697a6572)](https://scrutinizer-ci.com/g/yoanm/symfony-jsonrpc-http-server-openapi-doc/?branch=master) [![Code Coverage](https://camo.githubusercontent.com/3f67deb0aed69149bc2a7d84b606566899c09ce64d0d9e57f17e8df1209b3af5/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f796f616e6d2f73796d666f6e792d6a736f6e7270632d687474702d7365727665722d6f70656e6170692d646f632f6d61737465722e7376673f6c6f676f3d7363727574696e697a6572)](https://scrutinizer-ci.com/g/yoanm/symfony-jsonrpc-http-server-openapi-doc/?branch=master)

[![Travis Build Status](https://camo.githubusercontent.com/29147394d73d6984f1d484a4e2b4d455c07500304634e03988119d11a8e6c45c/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f796f616e6d2f73796d666f6e792d6a736f6e7270632d687474702d7365727665722d6f70656e6170692d646f632f6d61737465722e7376673f6c6162656c3d547261766973266c6f676f3d747261766973)](https://travis-ci.com/yoanm/symfony-jsonrpc-http-server-openapi-doc) [![Travis Symfony Versions](https://camo.githubusercontent.com/c191258568a3cc7ad29a19ec2d6d1a0af3b337f3278330911e77b996742c74be/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53796d666f6e792d763425323025324625323076352d3838393242462e7376673f6c6f676f3d747261766973)](https://symfony.com/)

[![Latest Stable Version](https://camo.githubusercontent.com/27a2f717aec9e66f7138def93a1b474a6dd915fae97cc7c6cd385c0118c7fe6c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f796f616e6d2f73796d666f6e792d6a736f6e7270632d687474702d7365727665722d6f70656e6170692d646f632e737667)](https://packagist.org/packages/yoanm/symfony-jsonrpc-http-server-openapi-doc) [![Packagist PHP version](https://camo.githubusercontent.com/be8e6ff21068f894b1a5f53a4510b3d7cdf04dfd7434f945a5bfcc68b7aa8174/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f796f616e6d2f73796d666f6e792d6a736f6e7270632d687474702d7365727665722d6f70656e6170692d646f632e737667)](https://packagist.org/packages/yoanm/symfony-jsonrpc-http-server-openapi-doc)

Symfony bundle for easy JSON-RPC server OpenAPI 3.0.0 documentation

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

Versions
--------

[](#versions)

- Symfony v3/4 - PHP &gt;=7.1 : `^v0.X`
- Symfony v4/5 - PHP &gt;=7.2 : `^v1.0`

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 `yoanm/symfony-jsonrpc-http-server` as described on [yoanm/symfony-jsonrpc-http-server](https://github.com/yoanm/symfony-jsonrpc-http-server) documentation.
- Configure `yoanm/symfony-jsonrpc-http-server-doc` as described on [yoanm/symfony-jsonrpc-http-server-doc](https://github.com/yoanm/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 #
