Merge pull request #8431 from zmstone/0706-chore-move-api-vsn-string-to-emqx_release-header

chore: move emqx API version (in generated doc) to emqx_release.hrl
This commit is contained in:
zhongwencool 2022-07-06 21:38:51 +08:00 committed by GitHub
commit 8544acf28e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View File

@ -36,3 +36,6 @@
%% Enterprise edition
-define(EMQX_RELEASE_EE, "5.0.0-alpha.1").
%% the HTTP API version
-define(EMQX_API_VERSION, "5.0").

View File

@ -2,7 +2,7 @@
{application, emqx_dashboard, [
{description, "EMQX Web Dashboard"},
% strict semver, bump manually!
{vsn, "5.0.1"},
{vsn, "5.0.2"},
{modules, []},
{registered, [emqx_dashboard_sup]},
{applications, [kernel, stdlib, mnesia, minirest, emqx]},

View File

@ -39,6 +39,7 @@
-include_lib("emqx/include/logger.hrl").
-include_lib("emqx/include/http_api.hrl").
-include_lib("emqx/include/emqx_release.hrl").
-define(BASE_PATH, "/api/v5").
@ -59,7 +60,7 @@ start_listeners(Listeners) ->
Authorization = {?MODULE, authorize},
GlobalSpec = #{
openapi => "3.0.0",
info => #{title => "EMQX API", version => "5.0.0"},
info => #{title => "EMQX API", version => ?EMQX_API_VERSION},
servers => [#{url => ?BASE_PATH}],
components => #{
schemas => #{},