https://github.com/yoanm/symfony-jsonrpc-http-server-doc
Symfony bundle for easy JSON-RPC server documentation
https://github.com/yoanm/symfony-jsonrpc-http-server-doc
documentation-generator json-rpc jsonrpc-server-doc-sdk php symfony-bundle symfony-jsonrpc-http-server
Last synced: 2 months ago
JSON representation
Symfony bundle for easy JSON-RPC server documentation
- Host: GitHub
- URL: https://github.com/yoanm/symfony-jsonrpc-http-server-doc
- Owner: yoanm
- License: mit
- Created: 2018-05-13T10:07:23.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-09-16T09:53:35.000Z (3 months ago)
- Last Synced: 2025-09-16T11:57:53.046Z (3 months ago)
- Topics: documentation-generator, json-rpc, jsonrpc-server-doc-sdk, php, symfony-bundle, symfony-jsonrpc-http-server
- Language: PHP
- Homepage:
- Size: 108 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Symfony JSON-RPC server documentation
[](https://github.com/yoanm/symfony-jsonrpc-http-server-doc)
[](https://github.com/yoanm/symfony-jsonrpc-http-server-doc)


[](https://scrutinizer-ci.com/g/yoanm/symfony-jsonrpc-http-server-doc/build-status/master)
[](https://scrutinizer-ci.com/g/yoanm/symfony-jsonrpc-http-server-doc/?branch=master)
[](https://www.codacy.com/gh/yoanm/symfony-jsonrpc-http-server-doc/dashboard?utm_source=github.com\&utm_medium=referral\&utm_content=yoanm/symfony-jsonrpc-http-server-doc\&utm_campaign=Badge_Grade)
[](https://github.com/yoanm/symfony-jsonrpc-http-server-doc/actions/workflows/CI.yml)
[](https://codecov.io/gh/yoanm/symfony-jsonrpc-http-server-doc)
[](https://symfony.com/)
[](https://packagist.org/packages/yoanm/symfony-jsonrpc-http-server-doc)
[](https://packagist.org/packages/yoanm/symfony-jsonrpc-http-server-doc)
Symfony bundle for easy JSON-RPC server documentation
Symfony bundle for [`yoanm/jsonrpc-server-doc-sdk`](https://github.com/yoanm/php-jsonrpc-server-doc-sdk)
See [yoanm/symfony-jsonrpc-params-sf-constraints-doc](https://github.com/yoanm/symfony-jsonrpc-params-sf-constraints-doc) for params documentation generation.
## Versions
* Symfony v4.4/5.4/6.0 - PHP ^8.0 : `^v1.0`
* Symfony v5.4/6.4/7.0 - PHP ^8.0 : `^v2.0`
## Availble formats
* Raw : Built-in `json` format at `/doc` or `/doc/raw.json`
* Swagger : [yoanm/symfony-jsonrpc-http-server-swagger-doc](https://github.com/yoanm/symfony-jsonrpc-http-server-swagger-doc)
* OpenApi : [yoanm/symfony-jsonrpc-http-server-openapi-doc](https://github.com/yoanm/symfony-jsonrpc-http-server-openapi-doc)
## How to use
Once configured, your project is ready to handle HTTP `GET` request on `/doc/{?filename}` endpoint.
See below how to configure it.
## Configuration
*[Behat demo app configuration folders](./features/demo_app/) can be used as examples.*
* Add the bundles in your `config/bundles.php` file:
```php
// config/bundles.php
return [
...
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Yoanm\SymfonyJsonRpcHttpServer\JsonRpcHttpServerBundle::class => ['all' => true],
Yoanm\SymfonyJsonRpcHttpServerDoc\JsonRpcHttpServerDocBundle::class => ['all' => true],
...
];
```
* Add the following in your routing configuration :
```yaml
# config/routes.yaml
json-rpc-endpoint:
resource: '@JsonRpcHttpServerBundle/Resources/config/routing/endpoint.xml'
json-rpc-endpoint-doc:
resource: '@JsonRpcHttpServerDocBundle/Resources/config/routing/endpoint.xml'
```
* Add the following in your configuration :
```yaml
# config/config.yaml
framework:
secret: '%env(APP_SECRET)%'
json_rpc_http_server: ~
json_rpc_http_server_doc: ~
# Or the following in case you want to customize endpoint path
#json_rpc_http_server_doc:
# endpoint: '/my-custom-doc-endpoint' # Default to '/doc'
```
* Register JSON-RPC methods as described on [yoanm/symfony-jsonrpc-http-server](https://github.com/yoanm/symfony-jsonrpc-http-server) documentation.
* Query your project at `/doc` endpoint and you will have a `json` documentation of your server.
## Contributing
See [contributing note](./CONTRIBUTING.md)