Last modified by Ashterix on 2024/07/11 09:57

From version 1.1
edited by Ashterix
on 2024/05/08 21:04
Change comment: There is no comment for this version
To version 5.1
edited by Ashterix
on 2024/07/11 09:57
Change comment: Renamed back-links.

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -Installation
1 +1. Installation
Content
... ... @@ -6,7 +6,7 @@
6 6  
7 7  To ensure that adding a package automatically configures your Symfony Flex, make the following changes to your {{code language="none"}}composer.json{{/code}}
8 8  
9 -{{code language="json"}}
9 +{{code language="json" layout="LINENUMBERS" title="composer.json"}}
10 10  {
11 11   "extra" : {
12 12   "symfony": {
... ... @@ -42,9 +42,8 @@
42 42  
43 43  Ensure that the package is automatically registered in your project's {{code language="none"}}config/bundles.php{{/code}} file:
44 44  
45 -{{code language="php"}}
45 +{{code language="php" layout="LINENUMBERS" title="config/bundles.php"}}
46 46  <?php
47 -// config/bundles.php
48 48  
49 49  return [
50 50   // ...
... ... @@ -65,8 +65,7 @@
65 65  
66 66  For manual configuration of the bundle, add to the {{code language="none"}}config/packages{{/code}} directory a file named {{code language="none"}}ufo_json_rpc.yaml{{/code}} with the following content:
67 67  
68 -{{code language="yaml"}}
69 -# config/packages/ufo_json_rpc.yaml
67 +{{code language="yaml" layout="LINENUMBERS" title="config/packages/ufo_json_rpc.yaml"}}
70 70  ufo_json_rpc:
71 71   security:
72 72   protected_methods: ['POST'] # Protection of GET and POST requests
... ... @@ -88,7 +88,7 @@
88 88  {{/code}}
89 89  
90 90  (% class="wikigeneratedid" %)
91 -A detailed overview of configuration parameters is available in the [[Bundle Settings section>>doc:docs.JsonRpcBundle.config]]
89 +A detailed overview of configuration parameters is available in the [[Bundle Settings section>>doc:docs.JsonRpcBundle.config_v7.config]]
92 92  
93 93  
94 94  
... ... @@ -100,8 +100,7 @@
100 100  
101 101  For manual configuration of the bundle, add to the {{code language="none"}}config/routes{{/code}} directory a file named {{code language="none"}}ufo_json_rpc.yaml{{/code}} with the following content:
102 102  
103 -{{code language="yaml"}}
104 -# config/routes/ufo_json_rpc.yaml
101 +{{code language="yaml" layout="LINENUMBERS" title="config/routes/ufo_json_rpc.yaml"}}
105 105  ufo_json_rpc:
106 106   resource: ../../vendor/ufo-tech/json-rpc-bundle/config/router.yaml
107 107   prefix: /api
... ... @@ -111,8 +111,7 @@
111 111  If left as is, the RPC API will be accessible at {{code language="none"}}/api{{/code}} e.g. {{code language="none"}}https://example.com/api{{/code}}
112 112  If you need to change the path, modify the route configuration as follows:
113 113  
114 -{{code language="yaml"}}
115 -# config/routes/ufo_json_rpc.yaml
111 +{{code language="yaml" layout="LINENUMBERS" title="config/routes/ufo_json_rpc.yaml"}}
116 116  ufo_json_rpc_bundle:
117 117   resource: ../../vendor/ufo-tech/json-rpc-bundle/config/router.yaml
118 118   prefix: /my_custom_api_route # specify an alternative path here
... ... @@ -136,7 +136,7 @@
136 136  A GET request at the entry point will return documentation on the available methods and the parameters they accept.
137 137  
138 138  {{warning}}
139 -The format of the documentation may vary depending on your settings. See [[Bundle Settings>>doc:docs.JsonRpcBundle.config]]
135 +The format of the documentation may vary depending on your settings. See [[Bundle Settings>>doc:docs.JsonRpcBundle.config_v7.config]]
140 140  {{/warning}}
141 141  
142 142  **{{code language="none"}}GET: /api{{/code}}**
... ... @@ -143,14 +143,20 @@
143 143  
144 144  {{code language="json"}}
145 145  {
146 - "transport": "POST",
147 147   "envelope": "JSON-RPC-2.0/UFO-RPC-6",
148 148   "contentType": "application/json",
149 149   "description": "",
150 - "target": "/api",
145 + "transport": {
146 + "sync": {
147 + "scheme": "https",
148 + "host": "example.com",
149 + "path": "/api",
150 + "method": "POST"
151 + }
152 + },
151 151   "methods": {
152 - "ping": {
153 - "name": "ping",
154 + "ping": {
155 + "name": "ping",
154 154   "description": "",
155 155   "parameters": [],
156 156   "returns": "string",
... ... @@ -182,7 +182,7 @@
182 182  }
183 183  {{/code}}
184 184  
185 -== Change [[Settings>>doc:docs.JsonRpcBundle.config]] to meet your needs ==
187 +== Change [[Settings>>doc:docs.JsonRpcBundle.config_v7.config]] to meet your needs ==
186 186  
187 187  
188 188  == Add [[Custom Procedures>>doc:docs.JsonRpcBundle.add_rpc_service.WebHome]] ==