JsonRpcBundle
Last modified by Ashterix on 2024/07/11 13:05
Package for Easy Creation of API via JSON-RPC Server
Creating RPC services for service-oriented architecture on Symfony has never been easier.
This package makes it easy to create an API using a JSON-RPC server for Symfony v.6.* and later. It is suitable for developers who want to quickly and efficiently integrate RPC functionality into their projects.
Changes in 7.0
General Changes
- Changed the API documentation format to support the OpenRpc standard
- The RPC server lifecycle now operates on events and listeners.
Configuration
- In the security block, HTTP methods are no longer protected; actions (API calls and documentation separately) are protected instead.
- The docs block no longer includes the response block; instead, all properties are now located at its level.
- Deprecated parameters have been removed (docs.response.json_schema).
- New parameters added to the docs block that are used in building the API documentation:
- project_name
- project_description
- project_version
Changes in 7.0
General Changes
- Changed the API documentation format to support the OpenRpc standard
- The RPC server lifecycle now operates on events and listeners.
Configuration
- In the security block, HTTP methods are no longer protected; actions (API calls and documentation separately) are protected instead.
- The docs block no longer includes the response block; instead, all properties are now located at its level.
- Deprecated parameters have been removed (docs.response.json_schema).
- New parameters added to the docs block that are used in building the API documentation:
- project_name
- project_description
- project_version
Key Benefits
- Ease of Integration: Integrating this package into your project is extremely straightforward. You simply need to add a special interface to any existing class, and it will automatically gain the capability to handle JSON-RPC requests.
- Flexibility: The package provides great flexibility in API creation, allowing developers to easily extend and modify server behavior without interfering with existing code.
- Efficiency: Thanks to the optimization of calls and the use of modern Symfony components, the package guarantees high performance when processing requests.
Changes in 7.0
General Changes
- Changed the API documentation format to support the OpenRpc standard
- The RPC server lifecycle now operates on events and listeners.
Configuration
- In the security block, HTTP methods are no longer protected; actions (API calls and documentation separately) are protected instead.
- The docs block no longer includes the response block; instead, all properties are now located at its level.
- Deprecated parameters have been removed (docs.response.json_schema).
- New parameters added to the docs block that are used in building the API documentation:
- project_name
- project_description
- project_version
Changes in 7.0
General Changes
- Changed the API documentation format to support the OpenRpc standard
- The RPC server lifecycle now operates on events and listeners.
Configuration
- In the security block, HTTP methods are no longer protected; actions (API calls and documentation separately) are protected instead.
- The docs block no longer includes the response block; instead, all properties are now located at its level.
- Deprecated parameters have been removed (docs.response.json_schema).
- New parameters added to the docs block that are used in building the API documentation:
- project_name
- project_description
- project_version
Functionality Provided by the Library
After installation, you immediately get:
- An entry point for your Json-RPC API that can accept both synchronous and asynchronous requests
- Automatic generation of API capability documentation in json format (see Bundle Configuration)
- The ability to subscribe to RPC server lifecycle events (see Lifecycle Events)
- Batch requests with the ability to use elements of one request's response in the body of another request in the same series (see Batch Requests)
- Requests with a response to a webhook or web-socket
- Caching of method responses that have relatively static results (see #[RPC\Cache])
Functionality Provided by the Library
After installation, you immediately get:
- An entry point for your Json-RPC API that can accept both synchronous and asynchronous requests
- Automatic generation of API capability documentation in json format (see Bundle Configuration)
- The ability to subscribe to RPC server lifecycle events (see Lifecycle Events)
- Batch requests with the ability to use elements of one request's response in the body of another request in the same series (see Batch Requests)
- Requests with a response to a webhook or web-socket
- Caching of method responses that have relatively static results (see #[RPC\Cache])
Documentation sections
You can find detailed information about every aspect of using and configuring the library in