From 74532a64e61845de54ac847c2a9c632a6f20f798 Mon Sep 17 00:00:00 2001 From: JianBo He Date: Tue, 18 Jul 2023 20:50:23 +0800 Subject: [PATCH] chore: update apps/emqx_management/src/emqx_mgmt_api_configs.erl --- apps/emqx_management/src/emqx_mgmt_api_configs.erl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/emqx_management/src/emqx_mgmt_api_configs.erl b/apps/emqx_management/src/emqx_mgmt_api_configs.erl index b644a7dae..4d6059d7d 100644 --- a/apps/emqx_management/src/emqx_mgmt_api_configs.erl +++ b/apps/emqx_management/src/emqx_mgmt_api_configs.erl @@ -372,7 +372,13 @@ find_suitable_accept(Headers, Preferences) when is_list(Preferences), length(Pre end end. -%% Should deprecated json v1 since 5.2.0 +%% To return a JSON formatted configuration file, which is used to be compatible with the already +%% implemented `GET /configs` in the old versions 5.0 and 5.1. +%% +%% In e5.1.1, we support to return a hocon configuration file by `get_configs_v2/1`. It's more +%% useful for the user to read or reload the configuration file via HTTP API. +%% +%% The `get_configs_v1/1` should be deprecated since 5.2.0. get_configs_v1(QueryStr) -> Node = maps:get(<<"node">>, QueryStr, node()), case