kayx23 commented on code in PR #12333: URL: https://github.com/apache/apisix/pull/12333#discussion_r2154130527
########## docs/en/latest/deployment-modes.md: ########## @@ -136,6 +136,8 @@ deployment: This makes it possible to disable the Admin API and discover configuration changes and reloads based on the local file system. +*Note*: When using `config_provider: yaml`, we can also use JSON, just provide the configuration in `conf/apisix.json`. Review Comment: ```suggestion *Note*: When using `config_provider: yaml`, you can also provide the configuration in JSON format by placing it in `conf/apisix.json`. ``` ########## docs/en/latest/deployment-modes.md: ########## @@ -293,7 +295,7 @@ routes: #END ``` -*WARNING*: APISIX will not load the rules into memory from file `conf/apisix.yaml` if there is no `#END` at the end. +*WARNING*: APISIX will not load the rules into memory from file `conf/apisix.yaml` if there is no `#END` at the end. But using `conf/apisix.json` eliminates the need for `#END`, as APISIX will directly parse to validate the legitimacy of the JSON. Review Comment: ```suggestion *WARNING*: APISIX will not load the rules into memory from file `conf/apisix.yaml` if there is no `#END` at the end. However, when using `conf/apisix.json`, the `#END` marker is not required, as APISIX can directly parse and validate the JSON structure. ``` ########## docs/en/latest/deployment-modes.md: ########## @@ -327,6 +329,23 @@ routes: #END ``` +```json5 +// JSON configuration can be directly translated from YAML, this is just an example. Review Comment: Presentation wise this is not the best as there are a number of examples provided for standalone configuration in parallel: https://apisix.apache.org/docs/apisix/next/deployment-modes/#standalone Better presentation is to use tabs (YAML, JSON) and add JSON configs for all examples. Can use GPT to do so if the details are all 1:1. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
