Changes for page 1. Встановлення
Last modified by Ashterix on 2024/07/11 09:57
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - 1.Installation1 +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" layout="LINENUMBERS" title="composer.json"}}9 +{{code language="json"}} 10 10 { 11 11 "extra" : { 12 12 "symfony": { ... ... @@ -42,8 +42,9 @@ 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" layout="LINENUMBERS" title="config/bundles.php"}}45 +{{code language="php"}} 46 46 <?php 47 +// config/bundles.php 47 47 48 48 return [ 49 49 // ... ... ... @@ -64,7 +64,8 @@ 64 64 65 65 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: 66 66 67 -{{code language="yaml" layout="LINENUMBERS" title="config/packages/ufo_json_rpc.yaml"}} 68 +{{code language="yaml"}} 69 +# config/packages/ufo_json_rpc.yaml 68 68 ufo_json_rpc: 69 69 security: 70 70 protected_methods: ['POST'] # Protection of GET and POST requests ... ... @@ -86,7 +86,7 @@ 86 86 {{/code}} 87 87 88 88 (% class="wikigeneratedid" %) 89 -A detailed overview of configuration parameters is available in the [[Bundle Settings section>>doc:docs.JsonRpcBundle.config _v7.config]]91 +A detailed overview of configuration parameters is available in the [[Bundle Settings section>>doc:docs.JsonRpcBundle.config]] 90 90 91 91 92 92 ... ... @@ -98,7 +98,8 @@ 98 98 99 99 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: 100 100 101 -{{code language="yaml" layout="LINENUMBERS" title="config/routes/ufo_json_rpc.yaml"}} 103 +{{code language="yaml"}} 104 +# config/routes/ufo_json_rpc.yaml 102 102 ufo_json_rpc: 103 103 resource: ../../vendor/ufo-tech/json-rpc-bundle/config/router.yaml 104 104 prefix: /api ... ... @@ -108,7 +108,8 @@ 108 108 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}} 109 109 If you need to change the path, modify the route configuration as follows: 110 110 111 -{{code language="yaml" layout="LINENUMBERS" title="config/routes/ufo_json_rpc.yaml"}} 114 +{{code language="yaml"}} 115 +# config/routes/ufo_json_rpc.yaml 112 112 ufo_json_rpc_bundle: 113 113 resource: ../../vendor/ufo-tech/json-rpc-bundle/config/router.yaml 114 114 prefix: /my_custom_api_route # specify an alternative path here ... ... @@ -132,7 +132,7 @@ 132 132 A GET request at the entry point will return documentation on the available methods and the parameters they accept. 133 133 134 134 {{warning}} 135 -The format of the documentation may vary depending on your settings. See [[Bundle Settings>>doc:docs.JsonRpcBundle.config _v7.config]]139 +The format of the documentation may vary depending on your settings. See [[Bundle Settings>>doc:docs.JsonRpcBundle.config]] 136 136 {{/warning}} 137 137 138 138 **{{code language="none"}}GET: /api{{/code}}** ... ... @@ -139,20 +139,14 @@ 139 139 140 140 {{code language="json"}} 141 141 { 146 + "transport": "POST", 142 142 "envelope": "JSON-RPC-2.0/UFO-RPC-6", 143 143 "contentType": "application/json", 144 144 "description": "", 145 - "transport": { 146 - "sync": { 147 - "scheme": "https", 148 - "host": "example.com", 149 - "path": "/api", 150 - "method": "POST" 151 - } 152 - }, 150 + "target": "/api", 153 153 "methods": { 154 - "ping": { 155 - "name": "ping", 152 + "ping": { 153 + "name": "ping", 156 156 "description": "", 157 157 "parameters": [], 158 158 "returns": "string", ... ... @@ -184,7 +184,7 @@ 184 184 } 185 185 {{/code}} 186 186 187 -== Change [[Settings>>doc:docs.JsonRpcBundle.config _v7.config]] to meet your needs ==185 +== Change [[Settings>>doc:docs.JsonRpcBundle.config]] to meet your needs == 188 188 189 189 190 190 == Add [[Custom Procedures>>doc:docs.JsonRpcBundle.add_rpc_service.WebHome]] ==